Forum Discussion

joan_fisher's avatar
joan_fisher
Occasional Contributor
15 years ago

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?

Thanx! 

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    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
    ......
    log.info ( companyId )


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

    regards Nebojsa