che_chethan
13 years agoContributor
Issues faced in test complete
Hi,
I have the following requirements that needs to be achieved using test complete:
- How can i run test complete batch tests (we can create a group of test cases in the project suite) group in command line ?
- We have been using Cruisecontrol .net from a long time to manage builds. Is there a way we can integrate test complete automation test cases execution with cruise control .net.
Kindly help !
I have the following requirements that needs to be achieved using test complete:
- How can i run test complete batch tests (we can create a group of test cases in the project suite) group in command line ?
- We have been using Cruisecontrol .net from a long time to manage builds. Is there a way we can integrate test complete automation test cases execution with cruise control .net.
Kindly help !
 Hi Chethan,
 
 Here's how you can execute the specified group item:
 
 1. Create a RunTestItemGroup.js file with the following contents:
 
 - var testItemGroup, project; 
 
 var projectSuite = objArgs(0);
 var objArgs = WScript.Arguments;
 
 for (i = 1; i < objArgs.length; i++)
 {
 if (objArgs(i).search(/\/testitemgroup:/i) != -1)
 {
 testItemGroup = objArgs(i).replace(/\/testitemgroup:/i, "");
 }
 if (objArgs(i).search(/\/p:/i) != -1)
 {
 project = objArgs(i).replace(/\/p:/i, "");
 }
 if (objArgs(i).search(/\/project:/i) != -1)
 {
 project = objArgs(i).replace(/\/project:/i, "");
 }
 if (objArgs(i).search(/\/project:/i) != -1)
 {
 project = objArgs(i).replace(/\/project:/i, "");
 }
 }
 
 var tc = new ActiveXObject("TestComplete.TestCompleteApplication.9");
 
 var tci = tc.Integration;
 tc.Visible = true;
 tci.OpenProjectSuite(projectSuite);
 ProjectTestItems = tci.TestSuite(project);
 tci.RunProjectTestItem(project, testItemGroup);
 
 2. To open a TestComplete project and run a group of test items, run the RunTestItemGroup.js script with the appropriate command-line arguments, e.g. the following command line will open the "C:\Users\<UserName>\Documents\TestComplete 9 Projects\TestProject1\TestProject1.pjs" project suite in TestComplete 9 and execute the Group1 test items group in the TestProject1 project:
 
 RunTestItemGroup.js "C:\Users\<UserName>\Documents\TestComplete 9 Projects\TestProject1\TestProject1.pjs" /p:TestProject1 /testitemgroup:Group1
 
 BTW, to learn about the logic of the external RunTestItemGroup.js script, please refer to the "Working With TestComplete via COM - Overview" article and those related.