Using /exit does not close TestComplete when running from a batch File
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018
02:58 AM
04-23-2018
02:58 AM
Using /exit does not close TestComplete when running from a batch File
Hi,
I am currently running groups of Tests using a combination of a Jscript file:
// 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, ""); } } var tc = new ActiveXObject("TestComplete.TestCompleteX64Application.12"); var tci = tc.Integration; tc.Visible = true; tci.OpenProjectSuite(projectSuite); ProjectTestItems = tci.TestSuite(project); tci.RunProjectTestItem(project, testItemGroup);
and then calling this from a batch file:
Wscript.exe "C:\RunGroup.js" "\TestComplete\ProjectSuite\ProjectSuite.pjs" /r /p:TestRun001 /testitemgroup:Other /exit /silentmode Exit
Does anybody know how to exit TestComplete in this scenario.
Solved! Go to Solution.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018
04:49 AM
04-23-2018
04:49 AM
Hi,
You are manually starting an instance of TestComplete as a COM object in your code. Started TC instance has no clue about parameters that were passed to the script file (RunGroup.js) used to instantiate it thus you must handle this in your code.
https://support.smartbear.com/viewarticle/54655/ illustrates well what you need.
Regards,
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018
05:10 AM
04-23-2018
05:10 AM
Thank you Alex 🙂
