Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium testing with CircleCI

Im using CircleCI and I want to run Huxley tests.

But for that i need selenium server running.

I was trying to run selenium server standalone jar. Thats not solution.

Please help if you know something.

like image 251
Michael Czolko Avatar asked Feb 25 '14 17:02

Michael Czolko


People also ask

How do I run Selenium on CircleCI?

install selenium-hub – launch of Selenium-hub, within the grid net, with forwarding of port 4444 to connect our application to it during tests launch; install selenium-node – launch of selenium-node, within the grid net, and connection of it to the previously launched selenium-hub.

What is CircleCI test?

Introduction. CircleCI allows you to automatically test your code before changes are merged. You can integrate testing tools and frameworks such as Jest, Mocha, pytest, JUnit, Selenium, XCTest, and more.


1 Answers

Most browser-testing frameworks will include Selenium for you. If you need to run a standalone Selenium server, you can add the following to a circle.yml in your repo's root directory:

dependencies:
   post:
      - wget https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
      - java -jar selenium-server-standalone-2.44.0.jar:
            background: true

That will download the latest standalone Selenium jar and run it in the background. Note the colon at the end of the second command and the 4 space indentation of "background: true". That tells YAML to treat background as a modifier to the command.

More documentation here:

https://circleci.com/docs/background-process

https://circleci.com/docs/installing-custom-software

NOTE: if you update the link to JAR in this answer, please, make sure that it is HTTPS. It's generally considered dangerous to download something over unsafe HTTP and just run it without checking the checksumms, because of possibility of man-in-the-middle attack resulting in the JAR replacement/tampering.

like image 52
Daniel Woelfel Avatar answered Sep 20 '22 19:09

Daniel Woelfel