MechaStorm
MechaStorm

Reputation: 1482

What is the right flow on a Continuous Integration Flow (Jenkins) with automated UI tests (selenium saucelabs)

What is the right build flow for a web development project (in my case PHP) with Jenkins and Selenium tests?

I am pretty new to CI in general but I was looking into how to integrate Selenium tests (via Saucelabs) on Jenkins in general.

My confusion is when do I deploy the changes to a remote server so that Jenkins can execute it, is my assumption right to say it should be the following for a website?

I assume I have to deploy my changes to a separate enviroment since the selenium scripts have to touch a server or some sort.

I could also do away with the deploy step if I did my Jenkins server on the same server as the website as well?

Upvotes: 2

Views: 555

Answers (1)

rafaborrego
rafaborrego

Reputation: 600

If your team does more than one push per day, the executions of the UI tests may collide because when you have many selenium tests their execution takes a lot of time (usually some hours). So I would recommend not to launch them after every push, only run the unit tests and deploy on the staging server at that time.

The Selenium tests can be executed every night and before deploying on a production server (or on a pre-production server where the client checks the changes before deploying on the production one).

I would also add an extra step: when the full test execution is successful, tag the version (this can be done with jenkins), so when a test fail you can undeploy and deploy the last successful one.

Upvotes: 1

Related Questions