Forum Discussion
- Cizo89Frequent ContributorOh ok, try this script:
//Get properties from all TestSteps in current TestCase
for (testStep in testRunner.testCase.getTestStepList()){
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
log.info(testStep.getName() + " has property " + prop.getName())
}
} else{
log.info(testStep.getName() + " doesn't have properties!")
}
}
//Get properties from one specific TestStep
def testStep = testRunner.testCase.testSteps["XXX"]
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
log.info(testStep.getName() + " has property " + prop.getName())
}
} else{
log.info(testStep.getName() + " doesn't have properties!")
}
Regards,
Marek - Cizo89Frequent ContributorHi,
could you be, please, more specific?
You mean all properties in all TestSteps in your project/TestSuite/TestCase or all properties in your Properties TestStep?
Regards,
Marek - itaykaldiContributorAll properties from test step of current test case
- itaykaldiContributor10x,
Will it work with loadTestRuuner? - SmartBear_SuppoSmartBear Alumni (Retired)Hi,
It should work with loadTestRunner, check the soapui log it should be logged there. Also make sure you have the option for do not disable groovy, File > Preferences > UI setting .
You can add the following script in set up script
for (testStep in loadTestRunner.getLoadTest().getTestCase().getTestStepList()){
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
log.info(testStep.getName() + " has property " + prop.getName())
}
} else{
log.info(testStep.getName() + " doesn't have properties!")
}
}
Thanks,
Jeshtha
Related Content
- 8 years ago
Recent Discussions
- 9 days ago