我必须运行包含testng.xml的 shell 命令,如果我从eclipse运行相同的测试,则该测试运行得很好,但是当我在Jenkins上运行该测试时,Chrome浏览器未启动,并且测试用例失败。请建议如何启动浏览器,以便我的测试可以在Jenkins上运行
Jenkins控制台输出:
Building in workspace /home/dev2/eclipse-workspace/weeklytask
[weeklytask] $ /bin/sh -xe /tmp/jenkins78454396605546237.sh
+ ./maptest.sh
[TestNG] Running:
/home/dev2/eclipse-workspace/weeklytask/maruf.xml
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 2972
Only local connections are allowed.
===============================================
Suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================
Build step 'Execute shell' marked build as failure
Finished: FAILURE