Silent Script not working
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Silent Script not working
I had these scripts forever throughout my test cases and the y never broke until now.
Not sure what has changed.
This script I am using to "not save changes before closing" because i am running multiple test cases scheduled during the night.
Here is a script:
function SetSilentMode()
{
var rmNormal = 0;
var rmErrorAndWarning = 1;
var rmErrorOnly = 2;
var rmSilent = 3;
var tcManager = Sys.OleObject("TestComplete.TestCompleteApplication").Manager;
tcManager.RunMode = rmSilent;
Here is an error:
JavaScript runtime error. Server execution failed, ClassID: {990BBECC-B5F4-478C-9E90-1758B3CE814C} Error location: Unit: "CCCS ES SUITE\CDN CACHE\Script\Silent" Line: 9 Column: 23.
Server execution failed, ClassID: {990BBECC-B5F4-478C-9E90-1758B3CE814C}
Error location:
Unit: "CCCS ES SUITE\CDN CACHE\Script\Silent"
Line: 9 Column: 23.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I ran TC 12.50 and went to the object browser, in the Sys node there, I can, in the OleObject property, put that parameter in. When I do so, I get first a message "TestComplete is already running" and, if I close that, I get the error.
So.... why it used to work and doesn't now I don't know... If you upgraded TestComplete recently, that might have something to do with it.
However... I question the need for this script. If you are running the tests overnight unattended, you can trigger execution via commandline and, in the commandline, add the switch "/SilentMode" which will do what you want without needing to run any script code at all.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see, I have them set up in Task Scheduler to run overnight.
I also been getting the error that TC is already running
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right... so, two things:
1) before leaving the machine at night, make sure you close TestComplete so that you don't get the error... command line of TestCOmplete launches a new instance of TestComplete to run the test run.
2) In your command line in your task scheduler, include /SilentMode.
Reference for commandline
https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/...
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You the BOSS!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, so im back at it again.
I had disabled the scripts and added additional arguments to my task scheduler at the end thinking it would work.
"D:\TC\PROJECTS\CCCS_ES\CCCS ES SUITE\CCCS ES SUITE.pjs" /r /e/ SilentMode
What am i doing wrong here?
All I did was adding "SilentMode" at the end expecting it to do the same what the script was suppose to do- close TC after running w/o asking to save so the next scheduled test case runs with no issues.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't tell you what you're doing wrong until you tell me what's NOT happening. At first glance, you are missing a space after the /e and you have an extra space before SilentMode but it's hard to tell if that's just a typo or if that's your actually command line.
The FULL commandline genrated by Windows Task Schedulur should be something like
cmd.exe /c "%programfiles%\SmartBear\TestComplete 12\bin\testComplete.exe" "D:\TC\Projects\CCCS_ES_CCCS ES SUITE\CCCS ES SUITE.pjs" /r /e /SilentMode
so... what's going wrong? Please post your FULL command line exactly as you have it entered... if necessary, post screenshots.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
