【发布时间】:2017-01-10 15:13:07
【问题描述】:
我在 Octopus Deploy 中有一个流程步骤,可以通过调用 PowerShell 脚本来运行一些 Selenium WebDriver 测试,但这会导致错误。
PowerShell脚本如下:
set nunitPath="C:\AutomatedTests"
cd %nunitPath%\
nunit-console SiteCore.nunit /include:BulkyWasteTests
当部署发生并且运行脚本的 Process Step 发生时,会出现以下错误:
Set-Location : Cannot find path 'C:\Octopus\Work\20170110115049-7\%nunitPath%\' because it does not exist.
At C:\Octopus\Work\20170110115049-7\Script.ps1:2 char:3
+ cd %nunitPath%\
+ CategoryInfo : ObjectNotFound: (C:\Octopus\Work...-7\%nunitPath %\:String) [Set-Location], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
The remote script failed with exit code 1
我不明白为什么错误报告的位置与 PowerShell 脚本中指定的位置不同。 非常感谢任何帮助。
【问题讨论】:
标签: powershell selenium selenium-webdriver continuous-integration octopus-deploy