在类路径中找不到类-通过Jenkins在Linux中使用TestNG

时间:2018-07-10 20:46:27

标签: java selenium jenkins testng

文件夹结构:

enter image description here

构建步骤详细信息:

enter image description here

Jenkins控制台输出:

+ java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
+ uname -a
Linux jenkins2.spikes.eng 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
+ id
uid=498(jenkins) gid=498(jenkins) groups=498(jenkins) 
context=system_u:system_r:unconfined_java_t:s0
+ pwd
/var/lib/jenkins/workspace/testing
+ cd CC_Regression
+ chmod -R 777 /var/lib/jenkins/workspace/testing/CC_Regression
+ java -cp './bin:./lib/*' org.testng.TestNG testng.xml
[TestNG] [ERROR] 
Cannot find class in classpath: testCases.LoginPage
Build step 'Execute shell' marked build as failure
Finished: FAILURE

testng.xml

<suite name="Suite">
<test name="Test">
<classes>
<class name="testCases.LoginPage"/>
<class name="testCases.Forgot_Password"/>
<class name="testCases.Dashboards"/>
</classes>
<classes>...</classes>
</test>
<test name="Test">...</test>
<!-- Test -->
</suite>
<suite name="Suite">...</suite>
<!-- Suite -->

注意: 1)添加了chmod,因为之前已获得许可被拒绝。

请指出出了什么问题

0 个答案:

没有答案