Is it possible to determine if a custom property is static or if it has been created dynamically
Hello,
I trying to find out if it is possible to know if a custom property is dynamic or static, I mean :
- is the custom property set by another testcase that is calling my current test case
- is the custom property created by a teststep as a return value by a calling testcase
- is a custom property set "manually" at test creation in order to be used in the test steps
And also, on the caller's side, in the 'run test case' step, how to know if the custom property is an input or an output (using direct data and not refering to a testsuite or project property)
Let's say that I have a testCase TC1 with a step that calls TC2, it provides a parameter and catches the response
So far, I can parse groovy scripts of TC2 and determine that properties are created (finding the line testRunner.testCase.setPropertyValue("myProp",myVal)) but in the testcase TC1 that calls TC2, I can't find PROGRAMMATICALLY which parameter is an input or an output. Though, at creation I select the checkbox of the properties that I want to get as output parameters.
Is there a possibility to find out which property has been selected as output ?
thank you
Alex
Hi Alex,
You can get the properties which are selected as "Return Properties" using the below script:
def tCase = testRunner.testCase.testSuite.testCases["TestCase1"] //TestCase name def tStep = tCase.testSteps["Run_TestCase"] //Run TestCase test step name log.info tStep.getReturnProperties()
Don't forget to change the Test Case and Test Step names.
Please see the "WsdlRunTestCaseTestStep" class details here: https://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/WsdlRunTestCaseTestStep.html