Forum Discussion

JahnaviAkkineni's avatar
JahnaviAkkineni
Occasional Contributor
8 years ago
Solved

using property transfer to pass properties from one test case into another

Hi,

I am using SOAP UI Pro and I am trying to call a test case within another test case. My reusable test case generates a string that I want to use in TC1. I wrote a groovy script to generate a string and added a property transfer step to the reusable test case.

 

When I run my TC1 though, the reusable test case property is not being passed into the request. Please see attachment, any help would be appreciated!

  • This has been resolved. There was no need to transfer a property in my scenario, so I removed it.

     

     For anybody who is new to using properties in SOAP UI and calling test cases within a test case. Within the reusable test case, set a run-time property value like below:

     

    testRunner.testCase.setPropertyValue("tceid", eid)
    testRunner.testCase.setPropertyValue("tceis", eis)

     

    run your groovy script test case before you attempt to call it in another test case.

     

    In the actual test case where you are calling the reusable test case, you will see a prompt for the properties that will need to be returned from the called test case, check ones that are applicable (see screenshot) and you should be good.

1 Reply

  • JahnaviAkkineni's avatar
    JahnaviAkkineni
    Occasional Contributor

    This has been resolved. There was no need to transfer a property in my scenario, so I removed it.

     

     For anybody who is new to using properties in SOAP UI and calling test cases within a test case. Within the reusable test case, set a run-time property value like below:

     

    testRunner.testCase.setPropertyValue("tceid", eid)
    testRunner.testCase.setPropertyValue("tceis", eis)

     

    run your groovy script test case before you attempt to call it in another test case.

     

    In the actual test case where you are calling the reusable test case, you will see a prompt for the properties that will need to be returned from the called test case, check ones that are applicable (see screenshot) and you should be good.