search cancel

Passing values from JSON response of step 1 as an input to step 2 in test case

book

Article ID: 74945

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

How can I pass values from a JSON response of step 1 as an input to step 2 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 DevTest releases.

Cause

N/A

Resolution

In order to use properties from runtime to design time run 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 were able to add two JSON Path Filters in the first step from the JSON response needed for the next step. 

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

There are many Global Filters (Inject HTTP Header) for the header data are sending in the REST step. 

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

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