Ask a Question

how to type out response content when a test case runs?

Occasional Contributor

how to type out response content when a test case runs?

I want my test case run to be verbose in that as the request is run in a test case that is looping thru data
it prints out or displays  or asserts(?)the content of each  of the response values?

for example I have a data source containing the values of 10 company id's.
my test case executes a request for each of these id's. each request execution returns in the response
a tax return Id particular to that companyId. I would like it if for each execution of the request that that
returnId is displayed somehow in the test execution output....can someone help me out?

SmartBear Alumni (Retired)


you can use groovy script test case to print this verbose data.
So, put Groovy Test step after receiving respone, than use right click on Groovy script editor and choose Get Data -> 'your test step' ,than choose Response and than properties you want to output. You will get something like this :

def companyId= context.expand( '${Test Request: companies#Response#//sam:company[1]/companyId[1]' )// for every property you choose
...... ( companyId )

Hope this helps.
BTW in order to get faster response (on forum) post your questions on our soapUI Pro Support forum .

regards Nebojsa

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Showing results for 
Search instead for 
Did you mean: