Giter Club home page Giter Club logo

e2e-selenium's Introduction

e2e Automation

A generic framework based on POM (Page Object Model) which takes care of Mweb, Web and Mobile Platforms(iOS and Android).

Libraries used:

  1. Appium
  2. Selenium WebDriver
  3. Java
  4. Cucumber-java, Cucumber-junit
  5. jUnit
  6. Log4j
  7. Gradle

External dependencies

  1. imagemagick

How this framework works:

This framework is built in BDD style using cucumber framework and scenarios will be run using cucumber-junit runners.

Scenario tagging:

@web - for web tests
@mweb - for Mweb tests
@android - for Android tests
@ios - for iOS tests
@ignore - to ignore certain tests
@visual - to include visual tests

Visual Testing

-   Tests can be executed in two modes 
    1. tulna.mode='build'
    2. tulna.mode='compare'
    
- What's build or compare?
    1. If you need to capture fresh baselines, then run it in build mode
    2. If you want a comparison, then run it in compare mode

Running tests for the first time:

  • Running tag based features

    gradle clean test -Pplatform=web -Pbrowser=chrome -Penv=qa -Ptulna.mode=compare -Ptulna.platform=web -Ptags="@home"

  • Execution on different platforms

    • FOR Web:

      gradle clean test -Pplatform=web -Pbrowser=chrome -Penv=qa -Ptulna.mode=<build/compare> -Ptulna.platform=web -Ptags="@tag1,@tag2"

    • FOR MWeb:

      gradle clean test -Pplatform=mweb -Pbrowser=chrome -Penv=qa -Ptulna.mode=<build/compare> -Ptulna.platform=mweb -Ptags="@tag1,@tag2"

    • FOR Android:

      gradle clean test -Pplatform=android -Ptulna.mode=build -Ptulna.platform=android -Ptulna.platform=mweb -Ptags="@tag1,@tag2"

    • FOR iOS:

      gradle clean test -Pplatform=iOS -Ptulna.mode=build -Ptulna.platform=iOS -Ptulna.platform=mweb -Ptags="@tag1,@tag2"

Reports and Results:

  • Test Report Location - /cucumber-report/index.html

  • Execution with visual mode as 'build':

    • All the baselines are stored in Baselines directory (/web/baseline_images)
  • Execution with visual mode as 'compare' :

    • In case a test fails, actual and difference images are generated in Baselines directory under sub-directory 'actual_images' (/web/actual_images)

Masking:

  • Want to mask some dynamic content during visual comparison?

    • Add the co-ordinates for the image which you want to mask in tulna.yaml
      (Ex. homepage: {from_date: [x1, x2, y1, y2]})
    • Add locators for elements which needs masking in tulna.yaml
      (Ex. homepage: ["css:div.highlight__decoration[style^=\"top\"]"])
    • Tool you can use to find co-ordinates - GIMP

Note: Want to run it in non-headless mode??

- Comment `options.addArguments("headless");` in DriverManager class.

Contributing

Fork the project, make a change, and send a pull request! Danke!

e2e-selenium's People

Contributors

imrohitsinghal avatar

Watchers

 avatar

Forkers

craigrisiag

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.