views:

2951

answers:

7

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.

+2  A: 

Well, although I have not used TestComplete I have used a competing package called QA Wizard Pro. Since you are asking this question I am assuming that it isn't something that is natively supported by TestComplete. QA Wizard is the same way and they expect it to be run manually instead of automatically, though there are test run files that can be run. For QA Wizard I created a batch file that was run nightly from the task scheduler. The account to run the software must be able to interact with the desktop and a user must be logged in with a display. I used a free piece of software called AutoHotKey to automate the running of the tests and then some Cygwin tools to parse the results and trigger an email through Blat with the results. It isn't a perfect solution but it does work.

pdavis
+2  A: 

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.

Fabio Gomes
A: 
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run("""C:\Program Files\Automated QA\TestComplete 6\Bin\TestComplete.exe"" ""C:\Documents and Settings\My Documents\TestComplete 6 Projects\abc\abc.pjs(your script path)"" /r /p:(Project Name) /u:(Unit Name) /rt:(Method to be executed) /e /SilentMode")

Copy above lines in Notepad and save it as .vbs file.
Make a .bat file and put it on your integrated server.
Browse the path of above mentioned .vbs file through bat file your TestComplete exe.

For bat file you can write directly these lines in Notepad as

C:\WINDOWS\system32\cmd.exe
WScript.Echo ""
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run("""C:\Program Files\Automated QA\TestComplete 6\Bin\TestComplete.exe"" ""C:\Documents and Settings\My Documents\TestComplete 6 Projects\abc\abc.pjs"" /r /p:prj1 /u:Unit1 /rt:Test1 /e")

Save this txt file with .bat extension. Afterwards generate a task through your CI server.

+1  A: 

You should also look at using TestExecute. This is a (much cheaper) program from Automated QA that will execute TestComplete scripts.

This will save you from having to have a full TestComplete license for your build/test server.

Alistair Ward
A: 

if you have TestExecute, try this. works everytime....

C:\PROGRA~1\AUTOMA~1\TESTEX~1\Bin\TestExecute.exe "path\Project.pjs" /r /e
A: 

I have multiple project suite.. How to let them run one after another?

Please help if anyone knows...Thanks in advance...

ScheduleTest
For a follow-up question like this it would be better to ask it as a new question ("Ask Question" button in the top right of the page), not post it here in an old thread. More people would see it and try to solve your problem.
sth
A: 

HI,

There are different methods to do this activity. The Best and Most powerful method is using Cruise control.NET for Continuous integration of testing/Development Cycle.

Second Method is create a batch file to run Test complete script using command line parameter. Schedule the running of this batch file . Also Include one simple application (which will update test result in Excel/Test Cases) as testApp. and call this after every test case/scenario run. create a mailer function to send this result after completing the TC run.

I already using this two methods,

for more details contact me

Regards, RATHISH MM [email protected] Senior Test Engineer +91 9387127473

RATHISH M M