- 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?
- How to utilize Redis and Jedis feature?
- How to utilize Elasticsearch, Logstash and Kibana feature?
- Developer guide
- Feedback
- License
A cloud-scale, opinionated, test automation framework for Web, APIs, and Micro Services. Strongly aligned with the DevOps-way of doing things
Aim is to provide out-of-box patterns and reference implementation to accelerate test automation and to drive best practices
Disclaimer: This is work in progress at this stage.
- 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
- 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
- Support for Redis for coordination of user data across tests
- Support for ELK (Elasticsearch, Logback and Kibana)
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.5.1
- WebDriverManager - 2.0.1
- RestAssured - 3.0.6
- SnakeYaml - 1.8
- docker - 17
- docker-compose - 1.17
- Jedis - 2.4.2
- Logback-Logstash-Encoder = 4.9
- Logback-Classic-Version = 1.2.3
$ git clone https://github.com/mindstix-labs/qa-automation-accelerator.git
$ cd qa-automation-accelerator
$ ./gradlew clean build
Above 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.
- Test scenarios do not share the data while executing in parallel.
- We are using Redis for synchronizing the user data across tests.
- Redis is used with the grid. When you hit command
$ docker-compose up -d
it will start the Redis container. You may not require Redis while executing tests locally or when you do not want to share data across the tests. - In this project we are using Redis to distribute users across each test. Please refer scenario @signingusingredis in signin.feature.
- While executing
@usercheck
setup, after creating a user it adds that user in redis set after that while running the test it pops one user from the set. - For information about Redis please refer
selenium-accelerator/src/main/java/com/mindstix/cb/utils/RedisUtility.java
- Please refer elk\README.md for more information.
Refer Wiki here
For more topics related to development and design aspects, please refer Home page of wiki Home
Licensed under MIT license
MIT License
Copyright (c) 2018 Mindstix Software Labs, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.