Ask a Question

How to get all the properties and its values at the test step level using groovy script?

SOLVED
Harinadh
New Contributor

How to get all the properties and its values at the test step level using groovy script?

 
1 REPLY 1
Harinadh
New Contributor

//It is the working code

def testStep = testRunner.testCase.testSteps["***Enter your testStepName***"]
if (testStep.getPropertyCount() > 0)

{
 for (prop in testStep.getPropertyList())

 {
   log.info( prop.getName()+" = "+prop.getValue())
  }
 }

 else

 {
  log.info(testStep.getName() + " doesn't have properties!")
 }

cancel
Showing results for 
Search instead for 
Did you mean: