Forum Discussion

白夜有点黑's avatar
白夜有点黑
Contributor
5 years ago
Solved

How to make it works well if I used project properties in request key?

For Example, I have API like: https://www.baidu.com/s?wd=test

 

And I want to make querystring key like wd which defined as project properties and then referer it in teststeps, but it not work as expect:

 

Expect Link: https://www.baidu.com/s?wd=test
Actual Link: https://www.baidu.com/s?%24%7B%23Project%23key%7D=test

 

How to make it possiable, please help.

 

Details as below:

9 Replies

  • Radford's avatar
    Radford
    Super Contributor

    I'm not sure if you can use a property expansion as a Method Param name.

     

    Usually where you can use a propety expansion you can right click and use the "Get Data" menu item. e.g. in the Method Param value:

     

     

    I'm not an expect with REST requests, so perhaps someone else could provide more detail, or correct me.

    • richie's avatar
      richie
      Community Hero
      Hi,

      This isn't possible in ReadyAPI!/SoapUI.

      I needed to do exactly this (parameterise a REST request's query parameter name rather than the value) about 6 months ago and spent a lot of time trying to find a way around the issue.
      I raised a ticket with Smartbear to see if they could help but they confirmed it was impossible using the out the box functionality and to rely on groovy to build my REST requests instead.
      I also raised a feature request so it might appear in the future, but i wouldnt hold my breath waiting! :)

      Cheers,

      Richie