Forum Discussion

aalbitar's avatar
aalbitar
New Contributor
8 years ago

I need to find what data causes the assertion to fail. I would like to write the data to a file.

How can I do this in a groovy script?

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Current assertions will be part of log files, I believe. Have you checked?
    Not enough details. Can give an example of your data and current assertion? And why do you need to write into file, by the way?
  • aalbitar's avatar
    aalbitar
    New Contributor

    Here is my test case:

    DataSource, DataGen, SOAP Request, and DataSource Loop

     

    I start the test case, I read data from csv file using Datasource, for every value I call SOAP web service in my test case.  On the soap request I added assertions to ensure I am getting valid expected data on the soap response.  When any of the assertion fails I would like to record the value I used in the SOAP request that caused it. 

     

    I hope this helps

     

    Thanks