How can I pass values from my JSON response of step1 as an input to step2 in my test case

book

Article ID: 74945

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder) CA Service Virtualization (DevTest / LISA / VSE / Application Test)

Issue/Introduction

How can I pass values from my JSON response of step1 as an input to step2 in my test case.,

Need to be able to obtain two property values from a JSON response in step 1 and pass it to step 2.   

Environment

All supported releases of DevTest.

Resolution

In order to use properties from runtime to design time we ran in ITR and then choose the Properties tab at the bottom of the ITR "Export the values of these properties from runtime to design time." 

Then we were able to add two JSON Path Filters in the first step from the JSON reponse needed for the next step. 

We then got an error on the next step that it was not recognizing the Token we put in the header of the request. 

You have many Global Filters (Inject HTTP Header) for the header data you are sending in your REST step. 

The Global Filter will superceed what you have in the test step, when using Global Filters is selected under the step information, so needed to remove the Global Filter for Authorization or uncheck the Global Filters on the step. 

Then was able to execute your test case with the expected results.