3

This is a an open-ended question, and if there's a better place to post it just let me know.

I have a large amount of selenium tests that I want to run using Jenkins. Currently, I have Jenkins running the selenium grid plugin and therefore functioning as the hub, and a Windows VM running the selenium server as node that I access using remote desktop (Jenkins runs in linux, and I need to test with IE, so I can't use the Jenkins box as the node). I tried to run the selenium server as a service, but that didn't work (apparently you can't do that).

So, I currently have a command prompt perpetually open while logged in to the VM as myself. I'm not a fan of this solution, as it's reliant on a command prompt staying open and me always logged in. But I can't seem to find a better solution, nor can I even find anything on best practices regarding long-term use of the node.

4
  • 1
    "Best" is problematic, because you did not defined how you want to measure "best". Each method has pros and cons. Good you provided one way to do it, and the "con" you do not like. Let's hope that Closing Mafia will not close it. Aug 21, 2017 at 20:02
  • If you use Linux utility screen you can disconnect and close the terminal window and reconnect to it later so your "con" is not a problem at all. Will that answer your concern? Aug 21, 2017 at 20:04
  • As I have the same problem with my windows VM and am curious how to fix it, can you explain how to keep the windows session active using screen?
    – dag
    Jul 19, 2018 at 10:22
  • Maybe this is our best option: sqa.stackexchange.com/questions/34549/…
    – dag
    Jul 19, 2018 at 10:27

2 Answers 2

1

Jenkins as Hub??? Why not simplify the process by letting the Selenium Grid Hub manage the real-time orchestration of tests under different nodes(lightweight dockerised containers) in a single Jenkins job.

Selenium Grid reduces the task of managing of selenium execution from Jenkins and you can parallelize execution of tests in a single Jenkins job.

Why Should you use Selenium Grid over Jenkins plug-in?

  • you can easily specify browser capabilities
  • you can parallelize tests executing on a single job
  • you can more easily scale up(lightweight containers) and can have more stable test execution.

you can simplify the process by offloading the heavyweight testing processes (CPU, Memory, and Network I/O) from your Jenkins slaves and run more concurrent jobs.

0

The Jenkins Selenium grid plugin reports remote nodes connected to its grid. You can alternatively run the grid with docker-compose. There are no containers for IE, but you can connect a VM running as Selenium node to such a grid just as easy as to the grid on Jenkins. At modern.ie you can download multiple versions of IE to run in a variety of hypervisors.

This repo has automation in Ansible, Vagrant, docker-compose, and scripted downloads: https://github.com/dockpack/base_grid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.