- Introduction
- Features
- Pre-requisites
- Dependencies
- Quick start
- IDE setup
- Where do I see reports?
- Report Samples
- How to utilize Jenkins pipeline feature?
- How to utilize Selenium grid feature?
- Developer guide
- License
Opinionated baseline to bootstrap selenium and cucumber based web application test automation projects
- Selenium + Cucumber based automation test examples for automationpractice.com
- Demonstrates use of BDD style tests using cucumber
- Demonstrates use of Selenium Grid via docker-compose (almost zero configuration)
- Supports various modes - headless, grid, incognito, normal (default)
- Support feature level parallelization. (Recommended not to use scenario level parallelization)
- Utilities to deal with test data in properties, yaml format
- Utilities to deal with driver, finders
- Externalized selector configuration
- Almost zero setup overhead - driver setup is automated via webdrivermanager
- TODO support for BrowserStack, SauceLabs
- TODO support to trigger emails from the tests
- Fully functional Jenkinsfile that can be used to setup a Jenkins pipeline
- Sample API tests using RestAssured
JDK 8
docker, docker-compose - Optional for local development. Recommended for CI setup.
Jenkins - 2.88+
- Cucumber - 1.2.5
- Selenium - 3.8.1
- Courgette - 1.4.3
- WebDriverManager - 2.0.1
- RestAssured - 3.0.6
- SnakeYaml - 1.8
- docker - 17
- docker-compose - 1.17
$ git clone https://github.com/mindstix-labs/selenium-accelerator.git $ cd selenium-accelerator $ ./gradlew clean buildAbove steps will execute the tests in Chrome hitting www.automationpractice.com portal. It would take approximately 1 or 2 minutes to complete. At the end of this, you will see build failed. Do not panic! We have intentionally added one failing test as a sample.
$ ./gradlew idea (for IDEA) $ ./gradlew eclipse (for Eclipse)Import the project in IDE after above steps generate required project setup files.
Open:
build/reports/cucumberreport/index/index.html
Alternatively, open courgette reports:
target/courgette-report/index.html
The best reports are generated once you setup Jenkins with cucumber-reports plugin. We are working on getting these reports generated even for local builds. See Issue 19
Courtesy: https://github.com/damianszczepanik/cucumber-reporting
There is a feature overview page:
And there are also feature specific results pages:
And useful information for failures:
If you have tags in your cucumber features you can see a tag overview:
And you can drill down into tag specific reports:
- Setup Jenkins 2.88+. Refer https://jenkins.io/doc/pipeline/tour/getting-started/
- Install cucumber-reporting plugin by going to Manage Jenkins -> Manage Plugins -> Available -> Search for cucumber-reporting. Select the cucumber-reporting plugin. Click on Install (without restart works just fine)
- Install Blue Ocean plugin in similar way as above. Things will be much more beautiful this way!
- Create a new pipeline job. Name it properly. Go to Pipeline section. Select pipeline script from SCM. Give the github URL. Add credentials using Add new or select existing.
- Branches to build: keep default - master.
- Script path: Jenkinsfile-minimal (good to start with, later you could try Jenkinsfile that is fully featured with docker-compose based selenium grid)
- Save.
- Go to Job page. Build the job. Keep default parameters if asked.
- Once the job is complete, go to the specific build page. You would see Cucumber reports menu. Click to see report.
- For email triggers to work from Jenkins, you will need to change the target email address in Script (Jenkinsfile-minimal or whichever you pick in Script path above).
Too much just to get build run on Jenkins? We are working on simplifying it for you! See Issue 30
- Install docker using: https://docs.docker.com/engine/installation/#server
- Install docker-compose using: https://docs.docker.com/compose/install/
- Once you have above installed, you can go ahead and setup Jenkins pipeline with grid capabilities (Jenkinsfile).
- For reference on commands fired from Jenkins pipeline, refer to docker-compose commands in Jenkinsfile.
Refer readme.txt
Licensed under MIT license





