Forum Discussion

j_glaz's avatar
j_glaz
New Contributor
3 years ago

add a message or property to a specific test step?

Hi, I'm running a TestCase in which a script loops through a csv file and fires off a single REST request with different values each time, which come from the csv. This all works fine.

However, I'm trying to create a report (based on this tutorial: https://dzone.com/articles/how-to-achieve-csv-reporting-in-soapui-open-source-1 ) and I want to include (a part of) the response from each time the request is called.

 

Example: the request (let's call it Request1) is called twice by the groovy test step, first with value "name":"AAA", and then with value "name":"BBB". For the first request, the response is: "result":"hello". For the second request the response is: "result":"bye".

 

What I want is for the report to include both instances of the test step with their corresponding response, like this (csv formatting):

test case, test step, response, status

case1, request1, hello, OK

case1, request1, bye, OK

 

I tried to do this using properties but they are on the level of test case, and since the reporting script is called after the test case is finished, both requests will get the 'bye' response in the report.

I know there is something like 'messages' which is on the level of a single iteration of a test step, but I can't find a way to add a custom message. The messages I do get are from the assertions in the request.

 

Does anyone know how I can achieve this? 

No RepliesBe the first to reply