Forum Discussion

rg2018's avatar
rg2018
Occasional Contributor
6 years ago
Solved

parameterize json rest api request

Was wondering if anyone had input on best solution for parameterizing a json rest api request?   Here is what I'd like to parameterize: (sample request below) MDOC_PRESENTED_QUESTION_ID QUEST...
  • HimanshuTayal's avatar
    6 years ago

    Hi rg2018,

     

    I think using Grid is the best way if your TestData is static and never gonna change too frequently.

     

    But, if your Test Data changes too frequently then you must save your Data into the Excel sheet and just write the groovy code to import the sheet and import the data of that sheet into Properties Step so that you can use that data in your Request by parameterizing it.

     

    You can have a look at this link, to get an idea how to read data from excel via groovy.

     

    Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

     

    Thanks and Regards,

    Himanshu Tayal