Forum Discussion

Binary's avatar
Binary
New Contributor
6 years ago

Cannot pass transfered property (REST)

Hi all,

 

we managed to transfer the value from the response of a REST call intro a property but we are not able to place it into the next RESt call.

 

So we have the following structure:

 

- TestSuite 1

- - TTS

--- Test Steps

---- createTTS (Property)

----- uid (Property)

 

So we passed the value from the first call into the uid but we cannot use it in the second rest call.

 

In the second rest call we just placed it in the params and tried

${#createTTS#uid}

${#TestCase#createTTS#uid}

${#TTS#createTTS#uid}

and similair combination but none worked.

 

We would be happy for any idea.

 

Thank you!

 

 

  • hi Binary ,

     

    It should work, just keep in mind that you must use:

     

    1. ${#TestCase#yourProperty} or ${#TestSuite#yourProperty} and so on - if you reffer to the level your property exists

    2. ${NameOfAStepOrTestCase#yourProperty} - when you reffer to a specific test step or test case.

  • Lucian's avatar
    Lucian
    Community Hero

    hi Binary ,

     

    It should work, just keep in mind that you must use:

     

    1. ${#TestCase#yourProperty} or ${#TestSuite#yourProperty} and so on - if you reffer to the level your property exists

    2. ${NameOfAStepOrTestCase#yourProperty} - when you reffer to a specific test step or test case.

    • Binary's avatar
      Binary
      New Contributor

      Thanks a lot. In my case removing the "#" at the first item was the solution.

      So it was ${createTTS#uid}

      • Lucian's avatar
        Lucian
        Community Hero

        Glad I could help. It is a pretty common mistake. I did it a couple of times as well... :smileytongue: