Giter VIP home page Giter VIP logo

gladsonantony / webautomation_allurewdm Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 12.0 95 KB

This is a Selenium Hybrid Framework written in JAVA using TestNG framework.. Supports Multiple Browsers and is Cross-Platform. Used Allure Reporting for Visually appealing and easy to understand report. Uses WebDriver Manager to auto download required WebDriver Binmaries.

License: Apache License 2.0

Java 100.00%
selenium selenium-webdriver selenium-java selenium-testng-framework monte-repack ashot webdrivermanager testng-dataprovider allure-report chrome-headless

webautomation_allurewdm's Introduction

WebApp Automation Framework with Webdriver Manager Support

N|Solid

This is a Selenium Hybrid Framework.

  • Written in JAVA
  • Implemented using TestNG
  • Build Toold - Maven
  • Implemented Page Object Model Design Pattern
  • Excel TestNG @DataProvider
  • Video Recording - Monte Repack
  • WebDriver Manager - Auto Download of required drivers.
  • AShot - Captures Entire Webpage Screenshot

Browsers Supported

  • Mozilla Firefox
  • Google Chrome
  • Opera
  • Microsoft Edge Chromium

Headerless Support

  • Firefox Headless
  • Chrome Headless

Platform Support

  • Windows
  • Linux
  • Macintosh

Reporting


Usage

$ git clone https://github.com/GladsonAntony/WebAutomation_AllureWDM.git
$ mvn clean test

Browser Setup

  • Navigate to WebAutomation\src\main\resources change BrowserType in the ApplicationConfig.properties or use Maven to invoke different browsers
$ mvn clean test -DBrowserType=Chrome			    #Chrome
$ mvn clean test -DBrowserType=Chrome_Headless		#Chrome Headless
$ mvn clean test -DBrowserType=Firefox			    #Mozilla Firefox
$ mvn clean test -DBrowserType=Opera			    #Opera Blink
$ mvn clean test -DBrowserType=Edge			        #Microsoft Edge

Report Generation

$ mvn site

Navigate to /target/site/allure-maven-plugin.html

  • Supported Only on Mozilla Firefox

To Open Results in other Browsers do

$ mvn jetty:run -Djetty.http.port=9988

@DataProviders

Method 1:

  • Use TestData.xlsx file as your dataproviders. The Sheet Name should be the name of your Method Name.
  • To use different xlsx file, Create a new @DataProvider method and change the workbook name.
@DataProvider(name="multiSheetExcelRead", parallel=true)
public static Object[][] multiSheetExcelRead(Method method) throws Exception
{
	File file = new File("./src/test/resources/Excel Files/TestData.xlsx");
	String SheetName = method.getName();
	System.out.println(SheetName);
	Object testObjArray[][] = ExcelUtils.getTableArray(file.getAbsolutePath(), SheetName);
	return testObjArray;
}

Method 2:

  • Create Excel Workbook with the same name as your method Name.
@DataProvider(name="excelSheetNameAsMethodName",parallel=true)
public static Object[][] excelSheetNameAsMethodName(Method method) throws Exception
{
	File file = new File("./src/test/resources/Excel Files/"+method.getName()+".xlsx");
	Object testObjArray[][] = ExcelUtils.getTableArray(file.getAbsolutePath());
	return testObjArray;
}

@DataProvider Usuage

To Use Method Name as Excel Workbook Name, Use the following:

@Test(dataProvider="excelSheetNameAsMethodName", dataProviderClass=ExcelDataProvider.class)

To use a Single Workbook with multiple @DataProvidersheets, Use:

NOTE:SheetName should be same name as Method Name

@Test(dataProvider="multiSheetExcelRead", dataProviderClass=ExcelDataProvider.class)

webautomation_allurewdm's People

Contributors

gladsonantony avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

webautomation_allurewdm's Issues

Can we generate Allure pdf report from allure test results

Can the Allure test results be used to generate an Allure PDF report? I need to create an Allure PDF report using the results of my Allure test as well as screen grabs. Is this feasible? If so, could you please provide me the code or instructions on how to create an Allure report?

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.