Ask a Question

Using Task Scheduler to schedule test complete runs does not work with spaces in the task arguments

SOLVED
ThomasCasserly
Contributor

Using Task Scheduler to schedule test complete runs does not work with spaces in the task arguments

Hi. I was setting up a scheduled task using Windows task scheduler and following the steps on the Smartbear help page

 

https://support.smartbear.com/testcomplete/docs/testing-with/running/scheduling.html#:~:text=In%20th....

 

The page says that if the path to the .pjs or . mds file contains spaces that when adding the Arguments for the scheduled task to enclose the path in quotes "

 

When I did enclose the argument path in quotes and ran the task I continually got an error saying that the project suite (.pjs)/project (.mds) file with path ******** was not found.

The only way to get the scheduled task to run was to edit the path (I changed 1 folder name) to have no spaces and then remove all quotes from the scheduled task argument.

 

So it appears that the help page listed above is incorrect, and should be updated to indicate that spaces in the path for scheduled task arguments are not supported. Or Testcomplete has a bug and should be able to read the path with quotes but isn't.

 

Took me a while to figure out what was happening so posting this for anyone else with the same issue of getting windows scheduled tasks for testcomplete to run.

 

Example of failing scheduled windows task details;

Scheduled task: Action tab

Program/script: "C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\TestComplete.exe"

Add arguments (optional): "C:\Users\casserlyt\Documents\TestComplete 12 Projects\ChromeSpeedIssue\ChromeSpeed\ChromeSpeed.mds" /r

 

Example of successful task details;

Scheduled task: Action tab

Program/script: "C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\TestComplete.exe" (same as above,no change, quotes appear to be effective here allowing a path that contains spaces)

Add arguments (optional): C:\Users\casserlyt\Documents\TestComplete12Projects\ChromeSpeedIssue\ChromeSpeed\ChromeSpeed.mds /r (spaced removed from path by renaming folder, which then removes needs for quotes, which are also then removed, task runs, testcomplete launches and enabled project test items are executed as expected)

1 ACCEPTED SOLUTION

Accepted Solutions
ThomasCasserly
Contributor

Re: Using Task Scheduler to schedule test complete runs does not work with spaces in the task argume

Ok,

so today its running fine with the quotes and spaces in the filename path 🤔🤔🤔

I had tried this 4 or 5 times on Monday, editing the path and folder name and to remove spaces and quote (successful run) and then adding them back in again to verify the issue but now there's no problem at all.

 

Only thing I know that has changed was a windows update during the week, so maybe, or maybe I just dreamt the whole thing😶😶.

 

Oh the help documentation I found clear enough to follow, was just that the steps didn't work for me at the time.

 

Thanks

View solution in original post

3 REPLIES 3
hkim5
Staff

Re: Using Task Scheduler to schedule test complete runs does not work with spaces in the task argume

hey @ThomasCasserly 

 

I just tried to replicate the error that you receieved, and it worked fine for me (both with and without spaces)

So when you are referring to:  The page says that if the path to the .pjs or . mds file contains spaces that when adding the Arguments for the scheduled task to enclose the path in quotes "

 

So the initial portion when you said you were getting an error (i pretty much followed the same syntax) and it worked fine.

additional arguments: "C:\Users\casserlyt\Documents\TestComplete 12 Projects\ChromeSpeedIssue\ChromeSpeed\ChromeSpeed.mds" /r /e

( added in the spaces into the testcomplete 12 projects section of that path).

 

the only difference between what you and I did was that I supplied it the .pjs file extension path instead (although that shouldn't really matter)

 

I do agree that the documentation could be a bit more helpful, and I'll contact the docs team to see if we can add in any screenshots or something; but as far as the error itself, it doesnt seem to be a testcomplete issue, seeing as I could find the path whether or not i had the space included within the path specified by the quotation marks.

Best,
Justin Kim
ThomasCasserly
Contributor

Re: Using Task Scheduler to schedule test complete runs does not work with spaces in the task argume

Ok,

so today its running fine with the quotes and spaces in the filename path 🤔🤔🤔

I had tried this 4 or 5 times on Monday, editing the path and folder name and to remove spaces and quote (successful run) and then adding them back in again to verify the issue but now there's no problem at all.

 

Only thing I know that has changed was a windows update during the week, so maybe, or maybe I just dreamt the whole thing😶😶.

 

Oh the help documentation I found clear enough to follow, was just that the steps didn't work for me at the time.

 

Thanks

View solution in original post

hkim5
Staff

Re: Using Task Scheduler to schedule test complete runs does not work with spaces in the task argume

classic windows. either way I'm glad that it fixed itself 🙂

Best,
Justin Kim
cancel
Showing results for 
Search instead for 
Did you mean: