Test Plan not executing when using Command Line and Windows Task Scheduler
Hello,
Let me start by defining what it is I actually want to achieve: in a nutshell, all I need to be able to do is automatically run specific test cases through TestComplete on a weekly basis. I am currently attempting to accomplish that by using the Windows Task Scheduler to run a BAT file that opens TestComplete via the Command Prompt and includes several command line parameters. Just to clarify that last point, the command line parameters are included as part of the BAT file, NOT as part of the Scheduled Task.
According to Windows Task Scheduler, this task is being executed normally. However, there are several things I've noticed that indicate to me that TestComplete is not actually executing any test cases:
- First, according to the History in the Windows Task Scheduler, the entire task completes in less than one second; I know from experience that running all of the test cases manually takes over an hour.
- Second, there are no log files in TestComplete that correspond to when the Scheduled Task is supposed to run.
- Third, I have a SQL database that stores data which should be affected when the test cases are executed. This database is updated 100% of the time when the test cases are executed manually, but there's no sign whatsoever that it has been touched since I created the Scheduled Task.
What is interesting is if I execute the BAT file manually (i.e. if I click on it with my cursor) TestComplete opens and runs the test cases normally. So something fishy is going on when the Task Scheduler actually tries to perform the task.
Now, you may be wondering why I'm opening TestComplete through a BAT file instead of pointing the Windows Task Scheduler itself directly at the TestComplete executable. I tried that first since it seemed like the more elegant solution and ran into a roadblock where the Task Scheduler was throwing a variety of error messages indicating TestComplete couldn't even be opened. If this method is the preferred one for executing test cases through TestComplete using the Windows Task Scheduler I can attempt it again and create a separate ticket documenting the error messages I encounter (if it happens again).
Below I've included screenshots including the actual BAT file itself as well as how I've configured the Schedule Task. I would appreciate any advice for how I can set this up to work correctly because I really have no clue where to start.
Content of the BAT file
Windows Task Scheduler - Edit Action
Windows Task Scheduler - Actions