Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

Executing Test Group using command prompt

$
0
0

Hi folks,

 

I am facing an issue while executing a Test Group using command prompt.

 

I have a project which has three Test Groups having sub-folders with TestSteps in it. View image: TestGroups.png

 

I have to launch TestComplete using command prompt and execute anyone of these Test Groups at a time.

 

I am using the following two approaches:

 

1. Using command prompt directly and executing the following command to launch and execute the SECOND Test Group:

 

"C:\Program Files (x86)\SmartBear\TestComplete 10\Bin\TestComplete.exe" "D:\GitShared\qatestautomation\eWorkspace\IbexAutomation\IBEXGlobal\IBEXGlobal.pjs" /r /projectSmiley Tongueortal /testitemgroup:"USPayroll"

 

This launches TestComplete successfully. However, it executes the first Test Group instead of the mentioned Second Test Group. I have to manually disable the first Test Group in order to launch the second Test Group. 

 

What am I missing here?

 

2. Using ActiveX to do the same as above:

 

The second approach is about launching TestComplete using ActiveX and executing the above, using a JS file. However, I am getting an message.

 

The JS file contents are:

http://support.smartbear.com/viewarticle/54654/

 

// RunTestItemGroup.js

var testItemGroup, project;

var objArgs = WScript.Arguments;
var projectSuite = objArgs(0);

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.10");

var tci = tc.Integration;
tc.Visible = true;
tci.OpenProjectSuite(projectSuite);
ProjectTestItems = tci.TestSuite(project);
tci.RunProjectTestItem(project, testItemGroup);

 

//End of File

 

I am using the following command to launch this JS file:

 

"D:\GitShared\qatestautomation\eWorkspace\IbexAutomation\IBEXGlobal\RunTestItemGroup.js" "D:\GitShared\qatestautomation\eWorkspace\IbexAutomation\IBEXGlobal\IBEXGlobal.pjs" /pSmiley Tongueortal /testitemgroup:"USPayroll"

 

Executing this is giving me the following error message: View image: Error.png

 

What is missing here.

 

Help needed.

 

Regards,

 

OS

 

 

 

 

 


Viewing all articles
Browse latest Browse all 20755

Trending Articles