jenkins - 有谁知道这个日志输出是什么意思
问题描述
我正在尝试使用 jenkins 对浏览器运行自动化测试,我正在使用 webdriverIO 框架。当我使用命令提示符时它可以工作,但是当使用 jekins 触发作业时,我收到一个错误,我认为这与 jenkins 执行 shell 功能有关,
我已经下载了 nodejs 插件并将 jenkins 设置为使用自定义工作区:C:/Users/Dell/Desktop/WebDriverio/node_modules/.bin
在我输入的shell命令中:
npm 安装 npm 测试
就像在这个维基:https ://wiki.jenkins.io/display/JENKINS/NodeJS+Plugin
在詹金斯系统配置中,我用程序文件中的 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$1.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
先感谢您
解决方案
推荐阅读
- angular - 模板驱动表单中的角度材料日期选择器验证问题
- java - 如何 flatMap 自定义创建的类?
- javascript - 如何按值 JavaScript 对 JSON 数据进行排序?
- python - 无法在 Python 中解压不可迭代的方法对象错误
- typo3 - TYPO3 8 中的排版日期格式
- apache-spark - 无法批量反序列化具有不同数量项目的 PairRDD
- r - 私人组织中的 R 包 - 如何在组织内安装私人依赖项?
- python - 如何在 Python 的 HeatMap 中指定我自己的标准
- javascript - 使用 javascript jquery 3.5.1 获取所有表格元素的值,包括 td、textarea 或 innerHtml 值
- c - _flushall() 在清除缓冲区时不起作用