End To End Testing

  • Posted March 31, 2014

I am having difficulties setting upp an environment that executes end-to-end tests. This is probably because i dont get the whole concept yet, but this is what i want to achive:

Have the jenkins server, that is installed on the droplet, run my selenium-protractor-jasmine end-to-end tests when there is new stuff in the repo. I have the hook and all set up, and jenkins detects new content, but how do i get the tests to run…? I need to be able to spawn a browser, so i installed xorg, if i ssh -X to the droplet i can start a browser, but how do i get the tests (or perhaps Jenkins) to do that?

Is it possible for a service so spawn a browser within the droplet itself, since it cannot ssh -X, if so how?

Or, do i have to place jenkins in another droplet, and ssh -X jenkins into the droplet where the tests are, and spawn a browser in that way?

Any help would be greatly appreciated!



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You might want to look into using the xvfb-run command. It sets up a virtual X server environment. It’s very useful for running tests of GUI programs in a headless environment. It’s provided by the xvfb package in Ubuntu and Debian. <br> <br>In the scripts that Jenkins runs to drive your tests, you should be able to prepend xvfb-run to commands requiring X. There is also a Jenkins plugin that might help simplify things for you. <br> <br>