Forum Discussion

smakkerlak's avatar
smakkerlak
Occasional Contributor
8 years ago

asserting unique ids

I would like to find sort of a "best practice" solution to this problem.   I need to have an unique id with all my requests. I have to assert that the response contains the same id. If i make a sm...
  • HKosova's avatar
    8 years ago

    You can use property expansion to refer to the current request:

    ${Test Step Name#Request#<json path expression>}

    For example, if the request body is

    {"id": "${#TestCase#ID}"}

    the assertion can refer to the request field "id" as:

    ${TestStep Name#Request#$.id}