GithubHelp home page GithubHelp logo

burhanh / automaton-v14 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 40 KB

Automation testing framework (UI) - an example. Based on Java, Junit, Cucumber, Selenium, PageFactory

License: MIT License

Java 93.36% Gherkin 6.64%
java junit pagefactory cucumber selenium automation

automaton-v14's Introduction

Automaton-v14

Automation testing framework (UI) - an example. Based on Java, Junit, Cucumber, Selenium, PageFactory

GitHub Build Status

Quick review

This is an almost fully functional testing framework based on Java programming language, Cucumber, and Selenium.

Main points:

  1. Uses POM (Page Object Model), PageFactory, DriverFactoryUtil.
  2. Automatically adds a screenshot into a test report if there is a failure in a scenario.
  3. Supports by default 2 most popular browsers, you may extend this behavior via adding new driver into DriverFactoryUtil class.
  4. Automatically by default generates a test report in HTML format, you may extend or change this behavior in RunCucumberTest class.

Requirements

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)

Project structure

-- 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

How to prepare an environment

  1. Install Java
  2. Install and configure IDE
  3. Create a project folder
  4. Clone or copy (download) the repository into the project folder
  5. Install Firefox or/and Chrome web browser/s
  6. Download, extract and move geckodriver/chromedriver into a specific folder
  7. Point proper path to drivers folder (step 6) in pom.xml file properties section (lines 17-18)

How to run tests

  1. Open a terminal session
  2. Move to the project folder
  3. Execute mvn clean test - will run tests for Firefox browser (by default)
  4. Execute mvn clean test -D browser=chrome - will run tests for Chrome browser
  5. Check a test report (by default a test report generates into src/target/SystemTestReport/html folder)

How to add tests

  1. Create a feature file in src/test/resources/cucumberselenium folder
  2. Add content into the feature file (follow Gerkin syntax language)
  3. Add step definitions into Steps.java class
  4. Add pages (follow an example for DuckDuckGo)
  5. Run tests

How to debug / troubleshoot

Under construction

automaton-v14's People

Contributors

burhanh avatar

Watchers

 avatar  avatar

automaton-v14's Issues

Make the solution easy to use

Make the solution easy to use.
e.g.:
Add tags and how to use them
A user should able just add new feature file, extend or add steps definition into Steps or create a new class with steps, extend or add more pages.
Add a schema about POM, PageFactory, DriverFactory into readme file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.