Forum Discussion

gtaub's avatar
gtaub
Occasional Contributor
2 years ago
Solved

MHT Report creation post script execution automatically

Use Case: We are executing tests using scripts and would like to have the MHT report automatically generated at the end of the full testing cycle.

 

Can someone please share how we can do this? We know we can do it manually after the tests complete by exporting the logs. we would like to have that happen automatically.

  • I use a PowerShell script to run my entire automation, which fetches the latest source files from TFS; kills any existing web browsers; executes TC and runs the execution plan of the project suite; finally, summary result is emailed to the team.

     

    The email summary looks like this,

    They then click on a link that takes them directly to the detailed results (.mht results)

    The script is called by Task Scheduler on a weekly basis.

     

     

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See TestComplete Command Line to run your automation and export the logs once completed. 

     

    The command will be similar to this,

    C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe' C:\Sandbox\TestComplete\Test\Test.pjs /run /exit /DoNotShowLog /ExportLog:C:\Sandbox\Log\Test\index.html /project:Test

     change index.html to the format you require i.e. index.mht

    • gtaub's avatar
      gtaub
      Occasional Contributor

      thank you for sharing. We would like to extend this even further. we have a dependency that would have to happen post that command completing which is to call an API that will email the results to our team. This would not happen from the command line as provided. This is why we are trying to get the report created post execution and being able to chain the api call right after testing is completed to complete the full process.

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I use a PowerShell script to run my entire automation, which fetches the latest source files from TFS; kills any existing web browsers; executes TC and runs the execution plan of the project suite; finally, summary result is emailed to the team.

     

    The email summary looks like this,

    They then click on a link that takes them directly to the detailed results (.mht results)

    The script is called by Task Scheduler on a weekly basis.