我正在设置Selenium脚本的jenkins,并且在运行 jenkins,它在无头浏览器上运行脚本。 当我在local上运行mvn test命令时,它将打开浏览器并启动脚本。 但是在詹金斯上,它只显示下面的控制台,而无需启动浏览器
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
1554541558637 mozrunner::runner INFO Running command: "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\WINDOWS\\TEMP\\rust_mozprofile.T3HA3HnEMbw5"
1554541560097 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1554541560097 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1554541560097 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
1554541567733 Marionette INFO Listening on port 58226
[Child 56144, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1554038299/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
1554541568018 Marionette WARN TLS certificate errors will be ignored for this session
Apr 06, 2019 2:36:08 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.171 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.523 s
[INFO] Finished at: 2019-04-06T14:36:12+05:30
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
答案 0 :(得分:0)
在Jenkin上运行Automation Suite时,它不会实际启动Browser。 Jenkin以无头模式执行测试。您可能无法在浏览器上查看结果。