Forum Discussion

nnarla's avatar
nnarla
New Contributor
12 years ago

How to make assertions for csv/data response?

I am trying to figure out how can I assert the values in the csv/data format response ?

Request: restapi call
Response : csv/data format
Header - Content-Type: text/csv; charset=UTF-8

1. How can I make assertions for such below response.?

HTTP/1.1 200 OK
Date: Thu, 04 Apr 2013 13:53:38 GMT
Server: Apache/2.2.16
Vary: Authorization
Connection: close
Content-Type: text/csv; charset=UTF-8
"start_day","end_day","client_id","spend","spend_cpa","total_cpc","total_spend_cpm"
"2013-03-06","2013-04-04","110819","2148.17","14.42","1.54","2.72"

2. I am using soapUI Pro trail version for now. Is there a better look for csv to assert individual contents?

3. I was able to use groovy script to save an output file in csv on my machine. Do I have to do data source of that csv and check thru property transfer? but seems that is not the way.

4. Does anyone have their ideas or experiences to share how to assert csv/data format response in SoapUI?

Please let me know
  • nnarla's avatar
    nnarla
    New Contributor
    can some @smart bear or anyone with groovy goodness can help me in method of getting the output and assert from the CSV/Text repsonse..
    I'm able to split into rows. But how can I assert those rows with header?

    Please help asap!