admin管理员组文章数量:1434909
I try to execute jar web-application in Jenkins job and start Selenoid tests If i execute command "java -jar app.jar" in pipeline Jenkins - i get exception
2024-11-18 13:54:16,203 [main] [INFO] () [r.s.c.w.a.RemoteApplication]: Started RemoteApplication in 4.282 seconds (JVM running for 4.498) 2024-11-18 13:54:16,248 [main] [WARN] () [r.s.c.w.r.SimpleUrlBrowser]: Please open the following address in your browser: 2024-11-18 13:54:16,249 [main] [WARN] () [r.s.c.w.r.SimpleUrlBrowser]: http://localhost:20080 java.lang.Exception: No web browser found
and Jenkins job freezes endlessly, until I manually abort the build.
This is how I see the solution:
- curl jar from remote server
- execute jar by "java -jar app.jar"
- start Selenoid UI tests.
- stop the job
Is there any way to run jar bypassing this exception?
I try to execute jar web-application in Jenkins job and start Selenoid tests If i execute command "java -jar app.jar" in pipeline Jenkins - i get exception
2024-11-18 13:54:16,203 [main] [INFO] () [r.s.c.w.a.RemoteApplication]: Started RemoteApplication in 4.282 seconds (JVM running for 4.498) 2024-11-18 13:54:16,248 [main] [WARN] () [r.s.c.w.r.SimpleUrlBrowser]: Please open the following address in your browser: 2024-11-18 13:54:16,249 [main] [WARN] () [r.s.c.w.r.SimpleUrlBrowser]: http://localhost:20080 java.lang.Exception: No web browser found
and Jenkins job freezes endlessly, until I manually abort the build.
This is how I see the solution:
- curl jar from remote server
- execute jar by "java -jar app.jar"
- start Selenoid UI tests.
- stop the job
Is there any way to run jar bypassing this exception?
Share Improve this question asked Nov 18, 2024 at 12:50 rustCohlerustCohle 11 bronze badge1 Answer
Reset to default 0The Jenkins node where the job is running has no browsers installed, or if it does then Selenoid cannot find any.
Here's something we've done to run Selenide tests on Jenkins:
docker.image('selenium/standalone-chrome').withRun('-v /dev/shm:/dev/shm -p 4444:4444') { c ->
def selenideRemote = "http://0.0.0.0:4444/wd/hub"
sh "mvn test -Dselenide.headless=true -Dselenide.remote=${selenideRemote} -DscreenshotsEnabled=true"
}
The combination of the Docker image, which has the proper browser etc. installed, and the headless option should make it work.
本文标签: javaJenkins job freezes on executing jar web applicationStack Overflow
版权声明:本文标题:java - Jenkins job freezes on executing jar web application - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745616876a2666452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论