Unique ID (1) – for multi users

If you want to generate a Unique ID, in this case (1) I’ll present a way to generate one based on text & time milliseconds. This is your better choice if you share your XML project with others.


def targetStep = testRunner.testCase.getTestStepByName( "Properties" )
def time = System.currentTimeMillis()
// processPath is a field in the called Property
targetStep.setPropertyValue( "processPath", "soap" + time + context.ThreadIndex)

Result = soap13353005392950
Each time the script is run the digits (time) will always change.
You can even remove the quote section and simply go with time.