Hi nmrao
I have attached a single test case ReadyAPI! project.xml with the one test case in which includes the comparison groovy script I've been trying to use - I created some VIRTs for each of the requests on the project so you should be able to load the project file in, start the VIRTs and execute the test case to see the requests and response - but just to make it clear in case I have provided screenshots of the relevant steps below as well
The test hierarchy is as follows:
REST POST(login) - to get an authorization token for later use
Datasource (directory - sourcing a single file)
POST (creating a new record in endpoint)
GET (queries endpoint to confirm POST created record correctly)
Prop Transfer1 (grabs value from the GET)
Properties1 (stores value grabbed from GET)
GET2 (queries endpoint)
Prop Transfer2 (grabs another value from GET2 response)
Properties2 (stores value grabbed from GET2)
Groovy (compares values stored in separate Properties steps)
This has been hanging over my head for a while - I found this approach to compare 2 discrete step responses via stackoverflow as it has minimal groovy - hence why I could really do with working out why this doesn't work properly.
Essentially when I run the groovy script it returns a null for the fn;s
Really, really appreciate any/all help anyone can provide - Im gonna need to use this step result comparison approach multiple times going forward, so I need to work out what I'm doing wrong!
thanks so much to all,
rich