Forum Discussion

jorge_montano's avatar
jorge_montano
New Contributor
15 years ago

Need to execute a testproject from a C# Console app created on VS2010

Hello,



I need to execute a testproject created on Test Complete 8.5 from a C# Console app created on VS2010.



I tried the following:



1. Create a project test on TestComplete

2. Create a Test script related to Application "X"

3. Executed test script from Test Complete and the test case runs fine

4. Created C# Console app, added references to AutomatedQA.TestComplete and AutomatedQA.script.

5. On the main method, added the following:



                Connect.RunTest("TestLog", "ProjectName","PathOfTestProject.pjs");

                Connect.StopTest();



The test case is not executed, the playback window is displayed and do nothing.



BTW on the same C# console application launched succesfully the "Hello" Connected App sample.



What I'm doing wrong, please help me.



Regards,

Jorge

2 Replies

  • Hi,



    RunTest doesn't actually start anything in TestComplete. It just switches TC to the script-running mode to make its run-time objects available in your connected application (via Connect). To run a test in TC, use the RunTestByName or RunRoutine/RunRoutineEx method.