Forum Discussion
rraghvani
2 years agoChampion Level 3
For example,
$TestCompleteFilePath = "C:\Temp"
$myTestProjectName = "SmartBear"
$myTestName = "Hello World"
$myVariables = @('One', 'Two', 'Three')
Write-Host 'C:\Program Files (x86)\SmartBear\TestComplete 15\Bin\TestComplete.exe' -ArgumentList """$TestCompleteFilePath"" /project:""$myTestProjectName"" /test:""$myTestName"" /pv:"$myVariables[0]" /pv:"$myVariables[1]" /pv:"$myVariables[2]" /run " -Wait
Will output,
PS C:\Users\SmartBear> C:\Temp\Untitled1.ps1
C:\Program Files (x86)\SmartBear\TestComplete 15\Bin\TestComplete.exe -ArgumentList "C:\Temp" /project:"SmartBear" /test:"Hello World" /pv: One /pv: Two /pv: Three /run -Wait
When using PowerShell, you need to ensure that your variables are quoted correctly, using either single or double quotes
Related Content
- 12 years ago
- 9 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago