Forum Discussion
aLostDawg
12 years agoOccasional Contributor
I can't really talk to the point of using the Tested Applications to kick off a batch file.
Is the batch file shutting down TestExecute, or is TestExecute shutting itself down? I'm wondering if this is the issue. What I have found when I'm using batch files to start up TestExecute is that if TestExecute is running when the batch file tries to start TestExecute it throws an error. Sometimes this error pops up on the screen and sometimes it doesn't. This could be tied into whether or not you're running it in SilentMode.
Here's what I do to break up my test run.
1. I use a command line argument and a command line argument parser. You can read a little more here or see the "BuiltIn.ParamCount" and "BuiltIn.ParamStr' help topics.
2. I set up a batch file similar to the following:
- pull date and time from system and put them into a couple of variables.
- Call TestExecute using
start /wait "TestExecute" "C:\Program Files[your specific location for test execute]\TestExecute.exe" [.pjs file location] /r /p:[project name] /e /SilentMode "Server=[server location]" "testcase=[TestCaseName]"
- Copy the tcResults1.mht to another file using batch copy command and postpending the system date/time to the end so that if I run it on another server at about the same time it will have a unique name.
Copy "C:\Users\[username]\AppData\Local\Temp\tcResults1.mht" "[new location]\[new name]"
- Kill the IE instance that has the test results open
taskkill /f /im iexplore.exe
In the above the italics is code. Stuff in [brackets] should be replaced by your info. This should give you some more things to try.