Hello GJ,
You can run a specific test item via COM. Here is a sample Windows Script Host script file that opens a specific project in TestExecute and runs a test item in it. Save the below code to a js file and run the file by double-clicking it in Windows Explorer:
var projectSuite = "c:\\ProjectSuite\\ProjectSuite.pjs";
var project = "Project";
var testItem = "ProjectTestItem";
try {
var te = GetObject("", "TestExecute.TestExecuteApplication");
}
catch(e) {
te = new ActiveXObject("TestExecute.TestExecuteApplication");
}
openProjectSuite(projectSuite);
runTestItem(project, testItem);
te.Quit();
function openProjectSuite(projectSuitePath)
{
var integration = te.Integration;
if (projectSuitePath != integration.ProjectSuiteFileName) {
integration.CloseProjectSuite();
integration.OpenProjectSuite(projectSuitePath);
}
}
function runTestItem(projectName, testItemName)
{
var integration = te.Integration;
integration.RunProjectTestItem(projectName, testItemName);
while (integration.IsRunning())
WScript.sleep(100);
}
Also, we have a suggestion in our database to make it possible to run individual test items via the command line, and your request has increased its rating. Thank you.