Forum Discussion

LZhang's avatar
LZhang
Frequent Contributor
17 years ago

display XML requests/responses for all test runs

Hi:

There is a "create a test report for the last run of this test case" button when we click on a test case.  It would be very helpful to create a test report for all runs of the test case.  We usually have many scenarios for one test case and most of the time, we need to look at all XML requests/responses for all runs for one single test case.  So creating an option to display requests/responses for all runs is a great feature to be added on the next release.  It can either be a report style or display in a screen style in which the default is in collapsed format and let the user expand it later.


Thanks,
Li

8 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Thanks Li,

    so if I understand you correctly, you want to aggregate testcase-run information over time? Ie compare to the run-results from "yesterday" in one report?

    regards!

    /Ole
    eviware.com
  • LZhang's avatar
    LZhang
    Frequent Contributor
    Hi:

    I think I need to clarify a little bit.  I don't want to compare to yesterday's test runs.  I have a lot of datasources/dataloops for each testcase.  So each testcase doesn't just run once, it runs in a loop to execute different values.  Therefore, each testcases might have 4, 5, ..., 20 runs. 

    For example, if a test request has the following fields:
    SourceId
    ProgramId
    title
    startTime
    duration
    status

    I can have 5 different values for each field and run the datasource in a loop.  Then I should get 5 unique XML requests/responses.

    Currently, SoapUI has no way of displaying all the XML requests/responses but only the last run.  What I did was I used groovy script below to output them.  Can you implement something that enables us to display ALL runs of XML requests/responses for each test case?

    import java.text.SimpleDateFormat;
    SimpleDateFormat dateFormat = new SimpleDateFormat("MMddhhmmss");
    Date date = new Date();

    def fileLocation="C:\\Workspace\\QA\\Automation\\soapUI_Scripts\\Phase2.5\\Integration_Environment\\RemoteRecord\\Tivo\\ScheduleRecording_GetRecordings\\Output\\"

    def msg1=context.getProperty("GetRecordings_AfterUnlink#Request")
    new File(fileLocation + "GetRecording_AfterUnlinkRQ" + dateFormat.format(date) + ".txt").write(msg1)

    def msg2=context.getProperty("GetRecordings_AfterUnlink#Response")
    new File(fileLocation + "GetRecording_AfterUnlinkRS" + dateFormat.format(date) + ".txt").write(msg2)

    I hope I didn't confuse you more.


    Thanks,
    Li
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Li,

    ok.. If I understand you correctly, you can actually view each unique message-exchange within the execution of a TestCase by double-clicking its corresponding entry in the TestCase Log, which will bring up a window showing that specific requests xml messages.. so if you have a DataDriven test and your TestCase Log contains X entries for a certain request (each for a request with different values), you can double-click that entry which will show its request/response XML.. One thing to note is that you will probably need to unselect the "Discard OK Results" option in the TestCase Options dialog to "keep" all requests/responses in memory for viewing.. so use with care if you have DataDriven test that runs hundreds/thousands of requests..  (which will otherwise fill up memory..)

    Hope this helps!

    regards,

    /Ole
    eviware.com
  • LZhang's avatar
    LZhang
    Frequent Contributor
    Hi, Ole:

    I finally saw that log and was able to view each XML request/response for each entry.  However, in the case if I run over 50 entries, it gets very difficult to keep track of the log to open the ones I want to view since there are so many steps.  Is there a way you can filter out the XML requests/responses in a list (all I care is the request/response but not other steps), arranged by number of run, i.e.,
    Run 1: LinkAccounts request/response
              GetDVRDevices request/response
              GetProfileOptons request/response
    Run 2: LinkAccounts request/response
              GetDVRDevices request/response
              GetProfileOptions request/response
    Run 3: LinkAccounts request/response
              GetDVRDevices request/response
              GetProfileOptions request/response

    By clicking on each request/response, I can open them in a new windows and know exactly which one I open and the run number.  That way it is much more organized but of course requires more GUI effort. 

    Hope this is not too difficult to implement.

    Thanks,
    Li
  • alibaba82's avatar
    alibaba82
    Super Contributor
    Hello Ole,
    I would like to add on to what Li has said. I think there is a fairly simple and easy way to accomplish this. soapUI already has the option 'launch testrunner' to 'export all results'. The problem with this is that there are way too many files to sort through. It would be better if you can create the folder structure and put the results in the respective folders instead of dumping all results in one folder. So if a project has TestSuite1 (with Testcase A,B,C) and the root folder is C:\results

    The export should create a folder 'Testsuite1' with subfolder testcase A,B,C. This way all the result are logically organized just like in the project. If testcaseA has some datasource loop then TestcaseA should have subfolder Iteration1, Iteration2...

    Also there should be an option for discarding property transfers etc during export. We are just interested in the request/response.

    This feature is important because it lets us keep track of what test were run and what were their results. We can always go back and pull up request/response of previous builds.

    For example today I discovered that one of my testcases was failing and this testcase passed in our last release. Development says they have not touched the code and that it should always have been failing. If I have the records I can show developement that the testcase was indeed passing before.


    Thanks

    Ali
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Li and Ali

    Thanks for your detailed info/feedback.. Maybe the initial solution would indeed to structure the output of the command-line runner into folders as you suggest.. We'll look into this for the next snapshot..

    regards!

    /Ole
    eviware.com
  • LZhang's avatar
    LZhang
    Frequent Contributor
    Just want to follow up on this.

    Have you found a solution for displaying requests/responses?


    Regards,
    Li
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Li,

    unfortunately we haven't gotten around to this.. sorry for delay.. I'll let you know..

    regards,

    /Ole
    eviware.com