Forum Discussion

Cata's avatar
Cata
Occasional Contributor
3 years ago
Solved

Can you modify a REST Resource path at a test step level?

Hi, So I have the following resource path for a REST request: /api/task/7/initialize. The '7' is a dynamic value that is based on a number of tasks that are being created with a previous request. ...
  • richie's avatar
    richie
    3 years ago
    Hey Cata,

    Oh i think youre confusing the two issues. Just cos you have a parent/child relationship between api and teststep doesnt preclude you from updating a value in the teststep's URI during execution. This is standard stuff in ReadyAPI!/SoapUI.

    Firstly, you need to create the api with a parameter placeholder (either a RESOURCE/URI/TEMPLATE parm or a QUERY/MATRIX parm)

    You stated that the previous teststeps in your test generate the value you want to pass onto the relevant parameterised teststep right?

    Then thats exactly what you do when the testcase.executes. there arw multiple ways for a request to source a dynamically generated value. Im typing this out on my phone, but ir no one provides detailed instructions by time im in front of laptop, i will.

    Cheers

    Rich