Forum Discussion

Vasanth_102's avatar
Vasanth_102
New Contributor
4 months ago

Detailed Reports

I have a requirement like I need to work on 200+ test cases.I'm having huge no of data for each and every rows.So i have decided to go for to place all the data in an excel sheet. I have used 2 data sources for each request.One is for input and another one is for expected values.Input data source consists of all the inputs that needs to be passed to the post request and expected data source will consists of the expected values.I have added smart assertion to validate the response with actual response.The data source which contains expected values will supply the expected values to the smart assertions.

Now my query is if any changes made to the request body it is very difficult to change the request body for all 200+ requests.So i have decided to have one data source loop which run the request as per the data that we have in input data source.But while using data source loop the request and response for each iteration is not displayed. How to make it displayed?

 

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

    It sounds like data-driven tests have become your new best friend.  I use these extensively, though in my data source, I have the values and expected results in each row.  Not two different data sources.

    I don't use assertions/smart assertions in my data driven test as I want the test to continue to the very end so I can see all the failures, instead of the test failing after the first assertion fail.

    Instead I write groovy scripts to run for each iteration to check actual against expected and return the result of the check.

    At the end of end iteration, I then write to a data-sink step.  This step will report values from the datasource and the results of the above groovy scripts.

    Then, once the test is complete, I can use Excel to review all the results.

      • ChrisAdams's avatar
        ChrisAdams
        Champion Level 3

        Hi,

        Sorry, I'm away for two weeks, so I cannot provide a detailed solution.

        Firstly though, take a look at data sinks.  These are the opposite of datasources and allow you to write details of a loop iteration to csv, text file, whatever.