These selenium tests are written using protractor along with cucumber. Cucumber allows stakeholders like Product Owners, Business analysts to describe test scenarios in plain English.
Framework features:
-
In addition to this , this framework produces a html report which can be shared with stakeholders and also helps in debugging. The html reports can be found under htmlReports directory.
-
Ability to capture screenshots on failure which are later attached to the report.
-
Sends message to slack on completion of test execution.
- Navigate to
moo-e2e
folder - Do
npm install
- Run
npm run webdriver-update
(This updates all the selenium drivers) - Run
npm run webdriver-start
(This starts the selenium server) - You can confirm this by visiting this URL
- Open a new terminal window and run
npm test
which runs all the tests. - To shut the selenium server just press
ctrl+c
in terminal window where the selenium server is running.
Alternatively if you don't want to run the tests in a local chrome browser or you do not have chrome installed on your machine you could run the tests in a docker selenium grid. For this to happen , make sure you have docker installed on your system.
Now run docker-compose up -d
, this should spin up a docker selenium grid with one chrome node.
If you are impatient and would like to speed up the test execution increase the chrome nodes by
docker-compose scale chromenode=2
and then run npm run paralleltest
All the above commands have been tested on OsX, have not really checked that these work on other platforms.(Linux should be fine , Windows not really sure)