Skip to main content
Fixed typo
Source Link

My suggestion here would be a 'script assertion'. A script assertion allows you to use Groovy script or Java to create your own custom assertion.

Within such a step you can 'pull in' data from another step and assign the data to a variable. In youyour script, right-click and select 'Get Data'.

So, I use 'Get Data' to get data from another step and use XML Slurper (loads of examples on Stack Overflow) to be able to iterate over the data. Also within the script asserionassertion, I use JDBC to pull data from the db. With scripting, I can then compare each item from the API response with the db response to decide whether it is a pass of a fail.

My suggestion here would be a 'script assertion'. A script assertion allows you to use Groovy script or Java to create your own custom assertion.

Within such a step you can 'pull in' data from another step and assign the data to a variable. In you script, right-click and select 'Get Data'.

So, I use 'Get Data' to get data from another step and use XML Slurper (loads of examples on Stack Overflow) to be able to iterate over the data. Also within the script asserion, I use JDBC to pull data from the db. With scripting, I can then compare the API response with the db response to decide whether it is a pass of a fail.

My suggestion here would be a 'script assertion'. A script assertion allows you to use Groovy script or Java to create your own custom assertion.

Within such a step you can 'pull in' data from another step and assign the data to a variable. In your script, right-click and select 'Get Data'.

So, I use 'Get Data' to get data from another step and use XML Slurper (loads of examples on Stack Overflow) to be able to iterate over the data. Also within the script assertion, I use JDBC to pull data from the db. With scripting, I can then compare each item from the API response with the db response to decide whether it is a pass of a fail.

Source Link

My suggestion here would be a 'script assertion'. A script assertion allows you to use Groovy script or Java to create your own custom assertion.

Within such a step you can 'pull in' data from another step and assign the data to a variable. In you script, right-click and select 'Get Data'.

So, I use 'Get Data' to get data from another step and use XML Slurper (loads of examples on Stack Overflow) to be able to iterate over the data. Also within the script asserion, I use JDBC to pull data from the db. With scripting, I can then compare the API response with the db response to decide whether it is a pass of a fail.