有谁知道这个日志输出是什么意思
do anyone know what this log output mean
我正在尝试 运行 使用 jenkins 针对浏览器进行自动化测试,我正在使用 webdriverIO 框架。
当我使用命令提示符时它可以工作但是当使用 jekins 触发作业时我收到一个错误我认为与 jenkins execute shell feature ,
我已经下载了 nodejs 插件并将 jenkins 设置为使用自定义工作区:C:/Users/Dell/Desktop/WebDriverio/node_modules/.bin
在 shell 命令中我输入:
npm 安装
npm 测试
喜欢这个维基:https://wiki.jenkins.io/display/JENKINS/NodeJS+Plugin
在 jenkins 系统配置中,我用程序文件中的 npm bin 文件的路径填充了环境变量字段
这是日志输出:
Running as SYSTEM
Building in workspace C:/Users/Dell/Desktop/WebDriverio/node_modules/.bin
[.bin] $ sh -xe C:\Users\Dell\AppData\Local\Temp\jenkins4703594410706272745.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Users\Dell\Desktop\WebDriverio\node_modules\.bin"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:250)
at hudson.Proc$LocalProc.<init>(Proc.java:219)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
at hudson.Launcher$ProcStarter.start(Launcher.java:455)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1853)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Build step 'Execute shell' marked build as failure
Finished: FAILURE
提前致谢
要Windows机器上的运行脚本,需要使用执行Windows批处理命令而不是执行shell 除非你使用 Cygwin,这是另一回事。
我正在尝试 运行 使用 jenkins 针对浏览器进行自动化测试,我正在使用 webdriverIO 框架。 当我使用命令提示符时它可以工作但是当使用 jekins 触发作业时我收到一个错误我认为与 jenkins execute shell feature ,
我已经下载了 nodejs 插件并将 jenkins 设置为使用自定义工作区:C:/Users/Dell/Desktop/WebDriverio/node_modules/.bin
在 shell 命令中我输入:
npm 安装 npm 测试
喜欢这个维基:https://wiki.jenkins.io/display/JENKINS/NodeJS+Plugin
在 jenkins 系统配置中,我用程序文件中的 npm bin 文件的路径填充了环境变量字段
这是日志输出:
Running as SYSTEM
Building in workspace C:/Users/Dell/Desktop/WebDriverio/node_modules/.bin
[.bin] $ sh -xe C:\Users\Dell\AppData\Local\Temp\jenkins4703594410706272745.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Users\Dell\Desktop\WebDriverio\node_modules\.bin"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:250)
at hudson.Proc$LocalProc.<init>(Proc.java:219)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
at hudson.Launcher$ProcStarter.start(Launcher.java:455)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1853)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Build step 'Execute shell' marked build as failure
Finished: FAILURE
提前致谢
要Windows机器上的运行脚本,需要使用执行Windows批处理命令而不是执行shell 除非你使用 Cygwin,这是另一回事。