Forum Discussion

praveenskg's avatar
praveenskg
Contributor
3 months ago

how to run custom scripts after project suite Run is completed

We have developed custom code in python to generate html based Summary report using the data available in the TestComplete provided Junit summary report xml file. At the end of execution i want to  generate Junit summary report xml file and then I want to run this custom code.

I am not sure when and where i can trigger this custom code after all the test execution is completed? Also it should get triggered in both commandline and using Test complete GUI. 

Any thoughts how to achieve this?

  • JDR2500's avatar
    JDR2500
    Frequent Contributor

    We use our build system (Jenkins) to accomplish something similar to what you’re describing.  After execution of the TestComplete project finishes Jenkins runs a “teardown” build step that publishes our results and copies test artifacts to the network.  The “teardown” step runs PowerShell scripts to make all that happen.

    • praveenskg's avatar
      praveenskg
      Contributor

      Agreed but we have built the custom code using python within Test complete, so i am looking for some way to achieve it within Testcomplete

    • praveenskg's avatar
      praveenskg
      Contributor

      we have built the custom code using python within Testcomplete, so i am looking for some way to achieve it within Testcomplete. I also looked into all the Events, i dont think any suitable event for my need. both Onstop Test & Onstop Testcase happens after each test/testcase. Since it is within Testcomplete, i cannot go for powershell or batch file

      • rraghvani's avatar
        rraghvani
        Champion Level 3

        I use PowerShell to generate the following email report, based on the xml summary report generated by TC.

        Works without issues.

    • praveenskg's avatar
      praveenskg
      Contributor

      On the local machine we are using Run project option or by tag. In CICD, it is commandline and using tag

  • I am also working on similar approach using PowerShell to generate html file and to send email, looking for options within Testcomplete to invoke the powershell instead of it as a new step to run the powershell command