Forum Discussion

anuassi's avatar
anuassi
Occasional Contributor
13 years ago

Property Expansion not happening from the Temp Property

Hi,

I am following the URL http://www.soapui.org/Scripting-Propert ... nsion.html where the session ID is passed to temp property and then the temp Id is used in the test step for execution.

I am following the same steps. I see the id getting passed to temp property, however the value is not getting replaced in the next test step.
Following is the way i am referring it in the next test step <brid:instanceId>${#CreateVideo#TempInstanceId}</brid:instanceId>

But the value is not getting replaced when i execute the test step.
Can someone let me know what may be going wrong?

Thanks.

5 Replies

  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    Can you try:

    <brid:instanceId>${CreateVideo#TempInstanceId}</brid:instanceId>

    Let me know if this works.

    Regards,
    Deepesh Jain
  • anuassi's avatar
    anuassi
    Occasional Contributor
    Thanks Deepesh for the reply. I did try that, but that too did not work for me.
    Some additional information, the property TempInstanceId is defined at the test case level which has two test steps to it.
    The value to TempInstanceId property is being passed from one more property which has been added
    to the first test step. And I need to utilize this temp property for second test step.
    Let me know if you have something else that i can try.
  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    Hi,

    I don't think you need to set the property at a test case level. If you have a property at test step 1, then
    1. Either you should be able to access that from test step 2 directly as :
    <brid:instanceId>${TEST_STEP_2#TEMP_PROPERTY_OF_TEST_STEP_2}</brid:instanceId>
    2. OR if the above does not workl, you can use a property transfer step and a properties step to transfer the above property to properties step and then use the command in the above step same way for properties step.

    Let me know if this works.

    Thanks,
    Deepesh Jain
  • anuassi's avatar
    anuassi
    Occasional Contributor
    Adding of new Property transfer did work.
    However I wanted to avoid that, since SOAP allows the property set at Test Case level and allowing the property to be used in the test step.

    I am not sure why its not working for me. I have attached a screen shot which will give the details of how the property is being called.
  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    I believe what is happening is that the test request is not reading the updated property once it has been updated by the other test step. Can you try disabling the test step which sets the property at test case level, make sure the property is set correctly and kick of the test case to see if it gets passed. Also, the original statement that you were using should work:

    ${#Test_Case#Property}