Forum Discussion

krogold's avatar
krogold
Regular Contributor
8 years ago

Problems to get a property value in Test Step

Hello,

 

I'm trying to transfer and use properties from a Test Case to another:

  • In TC1 I perform a REST request and extract a value from the response, I set it to a property DeviceUID
  • In TC1 I do a property transfer from TC1 DeviceUID to TestSuite DeviceUID (ok)
  • In TC2 I do a property transfer from TestSuite DeviceUID to TC2 DeviceUID (ok, seen in Custom Properties)
  • In TC2 I perform a REST request that takes in input parameter DeviceUID and it fails, it seem to not make the link between the custom property of TC2 and the DeviceUID parameter, ok, my mistake

 

So, in TC2, I set request's DeviceUID with ${#[TestSuite#TestCase 2]#DeviceUID} but it fails. When I look to the raw request, I don't see the information about DeviceUID as if it was empty. When I look at custom properties of TC2, I have a functional value for DeviceUID. Is there a problem with my syntax ? I copied it from the syntax found in the ReadyAPI (SOPA UI Pro) version ?

 

Thank you

  • sanj's avatar
    sanj
    8 years ago

    ${#TestCase#DeviceUID}

    That should work

     

  • sanj's avatar
    sanj
    Super Contributor

    It its per TC

    I would just use ${TestCase 2#DeviceUID}

    • krogold's avatar
      krogold
      Regular Contributor

      unfortunately, it doesn't work :smileysad:

      • sanj's avatar
        sanj
        Super Contributor

        ${#TestCase#DeviceUID}

        That should work