我在 Jenkins 中运行了 Node js 回归测试用例,但遇到了“找不到 java 的问题”,我假设那是因为我没有实现 Java,但是我尝试了“安装 Java”、“安装 Javac”并且都失败了.是否有任何解决方案,或者我应该在 Jenkins 中配置 Java?你能帮我一把吗? 我使用的命令如下:
./node_modules/.bin/wdio config/e2e.js --selenium-started --suite myestSuite
配置如下:
const wdioConf = { specs: [],
suites: {
myestSuite: [ './test/regression/mytest-overview-flow.js ]
}
}
测试用例如下:
describe('OI Overview Page ', function () {
const landingPage = new OverviewPage(true);
it(`Should Load`, function () {
landingPage.addLocalStorage();
........//omit here
});
})
错误日志如下:
A service failed in the 'onPrepare' hook
Error: not found: java
at getNotFoundError (/home/jenkins/agent/workspace/node_modules/selenium-standalone/node_modules/which/which.js:10:17)
at Function.whichSync [as sync] (/home/jenkins/agent/workspace/selenium-standalone/node_modules/which/which.js:121:9)
at Object.start (/home/jenkins/agent/workspace/node_modules/selenium-standalone/lib/start.js:56:27)