cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to determine if a custom property is static or if it has been created dynamically

SOLVED
Highlighted
Frequent Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: Is it possible to determine if a custom property is static or if it has been created dynamically

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


Anastasia
Customer Care Team


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓



Participate in the API Testing vs. UI Testing online community event to win great prizes!

1 REPLY 1
Moderator

Re: Is it possible to determine if a custom property is static or if it has been created dynamically

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


Anastasia
Customer Care Team


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓



Participate in the API Testing vs. UI Testing online community event to win great prizes!

New Here?
Join us and watch the welcome video:
Join the Online Event to Win
Top Kudoed Authors