在Jenkins中构建Testng测试时出现NoClassDefFoundError

时间:2018-08-24 09:13:56

标签: java eclipse selenium jenkins testng

我正在使用TestNg,并且在Eclipse IDE中通过命令提示符成功执行了测试,但是通过在Jenkins中执行TestNg测试,我得到了NoClassDefFoundError。请找到以下错误:

FATAL: org/jenkinsci/plugins/workflow/job/WorkflowRun
java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/WorkflowRun
    at org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:750)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE

我正在使用批处理文件在Jenkins中执行。在lib文件夹中,我添加了Selenium,java-client,testng和chromedriver jar。

0 个答案:

没有答案