简体   繁体   English

如何在Jenkins中使用Windows批处理脚本在后台运行Selenium服务器?

[英]How to run selenium server in the background using windows batch script in Jenkins?

I am running protractor tests on a server machine through Jenkins. 我正在通过Jenkins在服务器计算机上运行量角器测试。 I need to start the selenium web driver before running the tests. 在运行测试之前,我需要启动Selenium Web驱动程序。 ie "webdriver-manager start" and run the tests while the server is running and shut it down once tests are run. 即“ webdriver-manager start”并在服务器运行时运行测试,并在测试运行后将其关闭。 How do I do this using batch script? 如何使用批处理脚本执行此操作?

I am using start, cmd commands in the batch file to achieve it but once the selenium server starts, I am unable to go back to the prompt unless I stop it. 我正在批处理文件中使用start,cmd命令来实现它,但是一旦硒服务器启动,除非停止它,否则无法返回到提示符。

How to I make it run in the background by staying in the same command prompt window rather than opening up the new command prompt window selenium server starts? 我如何通过留在同一命令提示符窗口而不是打开新的命令提示符窗口来让它在后台运行硒服务器启动?

you should run webdriver-manager start as shell script. 您应该将webdriver-manager start作为shell脚本运行。

Make sure 确保

1 - Node.js installed on jenkins 1-在jenkins上安装Node.js

2 - provide correct path to webdriver-manager 2-提供正确的webdriver-manager路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM