Forum Discussion

zdanov's avatar
zdanov
Contributor
13 years ago

Exporting Test Complete test results in bulk

Hello,

Could anyone please let me know if there is a way to export a project's log results in bulk, instead of one by one? If I have 10 or 20 test logs in a project, when I highlight all of them there is no option to export; only if I do it one by one. Can I export all at once somehow, either MHT or unpacked storage format.



Thanks!

Serge.

6 Replies

  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    You can do it through scripts. Add the Log.SaveResultAs call to the OnStopTest event handler, something like this:



    Sub dynacom_OnStopTest(Sender)

        Log.Message "Logging path : " & Project.Variables.ResultsPath

        Log.SaveResultsAs Project.Variables.ResultsPath, 1

    End Sub




    This will export your logs automagically everytime a test ends. You will have to construct your own ResultsPath variable, of course. Personally I would suggest a folder structure something  like this:



    .\<PRODUCT>\<VERSION>\<DATE>\<TESTNAME + CONFIG + ITERATION>



    Where CONFIG would be any specific variant for a particular test, and ITERATION would just be a counter, for situations where the same test runs multiple times.



    In my case, my log paths look like this:

    \\devsvr\TCLog\DYNACOM\11.6.16.792\VMTESTSRV01\Results 2013-06-17\INI-001 ERP SQL 1

  • Hi Srdjan,


     


    There is no option to export all test logs. Actually, I don't see the reason to do this.


    You can easily export a failed log after the test execution via TestComplete's GUI. Or, you can use the SaveResultsAs method to save the log to the needed format from script, and send it to the responsible person for analysis.

  • Hi Tanya,

    thank you for your reply. The reason I was looking for this option is that with every Regression test cycle we have to store the test results in the release directory for compliance and audit purposes.  It would be very beneficial and convenient if I could simply select all test logs for a particular project and export them in bulk to this release directory for archiving. There is no analysis needed for failed cases, since I'm the only one running the scripts and doing the automation, so before the final pass, I make sure all failures are fixed, so that the clean, cumulative test log is saved.  But if there is no option, I will just have to continue exporting them one by one.



    Thanks!

    Serge.
  • Thank Hugo,

    I assume I could do this with keyword scripts as well, since all my scripts are keyword, correct? Using the run script routine with the event handler?



    Thanks!

    Serge.
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    I do not personnally use keyword tests, but yes I would expect it to work the same.