Running TestExecute Using A PowerShell Script
I'm trying to create a PowerShell script that kicks off our automated tests in TestExecute every time there's a deploy.
I can run commands using the Command Line and I can launch TestExecute and run the tests from the Command Line with no problem. But when I take the same commands and try to launch TestExecute using a PowerShell script, I'm getting an error where it complains the project file being invalid. After messing around with it, I got it to launch TestExecute once, but none of the tests in the suite would run.
Anyone know what could be causing the PowerShell script to error when I run it?
Solved! Go to Solution.
Can you provide examples of your powershell script and OS version? That would be very helpful.
Click the Accept as Solution button if my answer has helped
Thanks for the reply; however, I don't think that that's what we're looking for.
The link to that article seems to be regarding running PowerShell from TestComplete. We're actually trying to do the opposite of that, and run TestComplete/TestExecute from PowerShell.
This is the PowerShell script that I'm trying to run:
PS C:\Users\kevin.burdett> Start-Process
cmdlet Start-Process at command pipeline position 1
Supply values for the following parameters:
FilePath: PS C:\Users\kevin.burdett> Start-Process -FilePath “C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestEx
ecute.exe” “X:\QA\Automated Testing\Vortex\Vortex.pjs” /r /p:Vortex”C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\
TestExecute.exe” “X:\QA\Automated Testing\Vortex\Vortex.pjs” /r /p:Vortex
Start-Process : A positional parameter cannot be found that accepts argument ‘/r’.
At line:1 char:1
+ Start-Process -FilePath “C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\Tes ...
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
This doesn't work when I try to run it from PowerShell, but if I take that same file path and enter it into the Command Prompt, it will launch TestExecute and run all of the tests in our Vortex suite. I haven't been able to figure out why this works in the Command Prompt but not from a PowerShell script.
> Start-Process : A positional parameter cannot be found that accepts argument ‘/r’.
I understand the above message as that Start-Process cannot process the '/r' parameter. Actually, this parameter must be processed by TestExecute and for me this means that command line for Start-Process lacks some quotation(s).
My guess that the command line should look like this:
start /wait "ps "Start-Process -FilePath "“C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestEx
ecute.exe” “X:\QA\Automated Testing\Vortex\Vortex.pjs” /r /p:Vortex"""""
but this is a wild guess that must be verified and corrected.
/Alex [Community Champion]
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Thanks everyone for all of the suggestions.
I actually stumbled across the solution to my issue in this thread: https://community.smartbear.com/t5/TestComplete-General-Discussions/Running-Test-Execute-file-from-p...