Automation testing framework (UI) - an example. Based on Java, Junit, Cucumber, Selenium, PageFactory
This is an almost fully functional testing framework based on Java programming language, Cucumber, and Selenium.
Main points:
- Uses POM (Page Object Model), PageFactory, DriverFactoryUtil.
- Automatically adds a screenshot into a test report if there is a failure in a scenario.
- Supports by default 2 most popular browsers, you may extend this behavior via adding new driver into DriverFactoryUtil class.
- Automatically by default generates a test report in HTML format, you may extend or change this behavior in RunCucumberTest class.
JDK 12, Junit 4.12, Cucumber 4.2.6,
Selenium 3.141.59, gekodriver 0.26.0, chromedriver 77.0.3865.40,
Mozilla Firefox 70.0, Google Chrome 77.0.3865.120,
Maven (software project management)
-- automaton-v14
|-- .gitignore
|-- .travis.yml
|-- LICENSE
|-- pom.xml
|-- README.md
`-- src
`-- test
`-- java
`-- cucumberselenium
|-- RunCucumberTest.java
|-- Steps.java
|-- DriverFactoryUtil.java
`-- pages
|-- Page.java
|-- DuckDuckGoPage.java
|-- DuckDuckGoResultPage.java
`-- resources
`-- cucumberselenium
|-- DuckDuckGoTest.feature
- Install Java
- Install and configure IDE
- Create a project folder
- Clone or copy (download) the repository into the project folder
- Install Firefox or/and Chrome web browser/s
- Download, extract and move geckodriver/chromedriver into a specific folder
- Point proper path to drivers folder (step 6) in pom.xml file properties section (lines 17-18)
- Open a terminal session
- Move to the project folder
- Execute
mvn clean test
- will run tests for Firefox browser (by default) - Execute
mvn clean test -D browser=chrome
- will run tests for Chrome browser - Check a test report (by default a test report generates into src/target/SystemTestReport/html folder)
- Create a feature file in src/test/resources/cucumberselenium folder
- Add content into the feature file (follow Gerkin syntax language)
- Add step definitions into Steps.java class
- Add pages (follow an example for DuckDuckGo)
- Run tests
Under construction