build-automationautomated-testsfinalbuilderdailybuildstestcomplete

How to automate the test running process using TestComplete?


We are trying to integrate tests in our daily builds using TestComplete, so far we have a machine dedicated for testing and our build script copies to this machine everything TestComplete needs for its tests (Application, Database, Test script project and source files, etc).

Basically we can open the TestComplete project manually and run the tests.

Now we want to automate that process, so how do you do it? Or how do you think would be the simplest and best way to make this automation?

Keeping it short, we want to automate the process of opening TestComplete after each build, run all the tests and send an email with the test results.

Anyone can share some experience about this?

Thanks.


Solution

  • Answering my own question:

    The solution was writing a little C# application which sits on the system tray and monitors a folder.

    When a new folder (containing the tests source code) are added to the monitored folder TestComplete is called using the command line, then the application catch its ExitCode and send an email with the Log file generated attached to it.

    Depending on the ExitCode I know what happened in the tests, the possible ExitCodes are:

    0 - The last test did not produce errors or warnings.
    1 - The last test results include warnings but no errors.
    2 - The last test results include errors.
    3 - The test cannot be run because of an error

    More information about the ExitCodes can be found on TestComplete's Help file.