在 Jenkins 上运行 nodejs 测试用例时找不到 java

时间:2021-04-21 18:15:50

标签: jenkins jenkins-pipeline webdriver-io

我在 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)

0 个答案:

没有答案
相关问题