rfortune
15 years agoContributor
Comparing a datasource with a REST Response
Hi all,
I need to compare the results of a REST response with results from a datasource( i.e. a system export in an xls file). My initial approach was to create a blank REST response, property transfer values from the datasource into the blank response so that I am in-effect creating the "ideal" response that I'm looking to compare my test-environment response with.
Each row in the data source doe not necessarily equate to a new message, infact multiple rows might roll up into one message (should their identifiers match). Hence my desire to "construct" a message and then compare the response.
My problem is that I have no satisfactory container for the "temporary" message that I construct. My ideal approach would be
1) construct "ideal" XML from datasource
2) store temporary xml message
3) GET response from endpoint (under test)
4) using groovy compare XML response with temporary xml message
5) return to step 1 until end of datasource is reached.
Is this an approach you guys would take? Am I eating my own tail here?
Thanks all for any input you might have,
- Richard
I need to compare the results of a REST response with results from a datasource( i.e. a system export in an xls file). My initial approach was to create a blank REST response, property transfer values from the datasource into the blank response so that I am in-effect creating the "ideal" response that I'm looking to compare my test-environment response with.
Each row in the data source doe not necessarily equate to a new message, infact multiple rows might roll up into one message (should their identifiers match). Hence my desire to "construct" a message and then compare the response.
My problem is that I have no satisfactory container for the "temporary" message that I construct. My ideal approach would be
1) construct "ideal" XML from datasource
2) store temporary xml message
3) GET response from endpoint (under test)
4) using groovy compare XML response with temporary xml message
5) return to step 1 until end of datasource is reached.
Is this an approach you guys would take? Am I eating my own tail here?
Thanks all for any input you might have,
- Richard