Git Product home page Git Product logo

oneframework's Introduction

OneFramework

If you've application in android, ios & web platforms and want to automate with single code base? This framework is for you.

This is a generic Page Object Model which solves all your automation needs with single codebase.
We often tend to create different test frameworks for different platforms and it's very difficult for anyone to serve all platform needs in one test automation framework.

OneFramework solves all your needs. You just give the locator and leave the rest to OneFramework.

Contents:

Features:

  • Easy to automate any type of application
  • Cross platform(mobile & web) support with single codebase
  • Page Object Model
  • TestNG integration
  • Image Comparison
  • Allure Reporting
  • Robust in nature
  • Many configurations

Libraries Used:

  1. Appium
  2. Selenium WebDriver
  3. Java
  4. TestNG
  5. Gradle
  6. WebDriverManager
  7. AShot
  8. Allure Report

Prerequisites Installations:

  1. JAVA 1.8 - Install Java and set the JAVA_HOME path on your machine.
  2. Node & NPM - Download & install node from https://nodejs.org/en/download/.
  3. Gradle - Install Gradle.
  4. Android - Install Android Studio & set ANDROID_HOME path.
    • Downloading the Android SDK
    • Download the Android SDK tools such as
      1. Build tools
      2. Platform tools
      3. Android Emulator
      4. Intel HAXM installer etc.....
      5. Create an emulator device from AVD manager
  5. iOS - Install XCode on your machine & download required iPhone/iPad simulators.
  6. Allure Report - Install Allure Report library on your machine. Please follow below link to install it on MAC.
    Similarly install allure-report installer on your respective machine. https://docs.qameta.io/allure/#_installing_a_commandline

Note: If you want to run only on WEB, you don't need anything except JAVA.
Mentioned installations Node, Android & iOS are for mobile app automation & Rest like Gradle & Allure are for framework level

Appium Setup:

  • Install Appium
 $ sudo npm install -g [email protected] --unsafe-perm=true --allow-root 
  • Appium Doctor - which is used to see if the appium setup is correctly done or not. Run it and fix the issues as per that.
 $ sudo npm install -g appium-doctor --unsafe-perm=true --allow-root
 $ appium-doctor

How This Framework Works:

This framework is built in Page Object Model style using TestNG framework.
We have "testng.xml" file which has tests for each and every platform in cross browser/device testing fashion.

Here are the minimal things you have to do:
  • Create your tests
  • Create your Page Object class w.r.t test that you have written, if not created already (Take the reference from org.oneframework.pageObjects).
    For e.g, SignIn button locators for web, ios & android set as shown below.

- If mobile app, Set the android, ios device details in corresponding files in resources directory as shown below.

- If web app, Set web app URL in BaseTest

How To Run Tests:

  1. Clone the repo.
    https://github.com/srinu-kodi/OneFramework.git
  2. Build the JAR and run it.
$ gradle clean build
$ java -jar build/libs/Automation-1.0-SNAPSHOT.jar capture
$ java -jar build/libs/Automation-1.0-SNAPSHOT.jar compare

Note:capture & compare are the image capture and compare modes.

How To See Allure Result Report:

Once test execution is complete, allure-results directory gets generated. I assume you have already installed allure on your machine. If not, install it. If yes, run below command to see the report.

$ allure serve <allure-results path>

Image Comparison Output:

Once image comparison is complete, all the images w.r.t platforms are published into local baselineImages directory at root level. Now go to specific directory and get the image comparison resulted images.

difference image is created only when there is a difference in actual vs expected images. Below is the sample output.

expectedImage actualImage differenceImage

Pending Tasks:

  1. Image masking on certain co-ordinates
  2. Parallel test execution
  3. Integration with CI i.e. Jenkins (or) Travis (or) Circle CI (or) Go
  4. Recording of test execution

Moreover I will incorporate if anything pops up in mind, going forward.

How To Contribute?

  1. Raise a PR, if you already add any new feature or fix any issues in this framework.
  2. Raise an issue, if you face any code related issues(genuine ones) with this framework.

oneframework's People

Contributors

srinukodi avatar srinu-kodi avatar imrohitsinghal avatar

Stargazers

Chetan avatar

Watchers

James Cloos avatar

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.