Coder Social home page Coder Social logo

narvar_testng_dataprovider_allscreenshot's Introduction

My Company Inc. [Selenium Tests]

This repository contains Selenium tests for the My Company Inc., GitHub Account.

My Company Inc.

Make sure you have Git installed on your system. For check use the commands below:

git -v

Make sure you have access GitHub Account:

git clone https://github.com/ACCOUNT/REPOSITORY

Make sure you have Maven installed on your system. For check use the commands below:

mvn -v/--version

Make sure you have Java installed on your system, if not follow the vendor instructions for installing them on your operating system.

java -version

Need download driver from GeckoDriver and drop in folder: For Mac - ./src/main/resources/geckodriver/mac/ff/geckodriver For Win - ./src/main/resources/geckodriver/mac/ff/geckodriver.exe

Instruction - SeleniumHQ/selenium#2990

Need download chromedriver from GeckoDriver and drop in folder: For Mac - ./src/main/resources/geckodriver/mac/ch/chromedriver For Win - ./src/main/resources/geckodriver/win/ch/chromedriver.exe

To run the framework using basic options and their syntax:

mvn [clean] [test/site] [-DdriverType=FF] [-Ptest1/-Ptest2/-Ptest3] [-Dtestngfile=testng_xml_file]

To clean the folders from test data from the previous run use the command [clean]

mvn clean

To run the framework for execution you need to choose the desired option [test/site]

To run tests without getting a report use option test

mvn clean test

To run tests with getting a report use option site

mvn clean site

To run the framework in a particular browser, to need to specify the name of the browser as a parameter of the option of [-DdriverType]

To run in Firefox use -DdriverType=FF, below:

mvn clean site -DdriverType=[FF/ff/FIREFOX/FireFox/firefox/FOX/Fox/fox]

To run in Chrome use -DdriverType=CHROME, below:

mvn clean site -DdriverType=[CH/ch/CHROME/chrome/GOOGLE/google]

To run in Internet Explorer use -DdriverType=IE, below:

mvn clean site -DdriverType=[IE/ie]

If you don't specify this parameter, default option -DdriverType = ff

mvn clean site -DdriverType=ff

In order to use a profile to run tests specify the desired option [-Ptest1/-Ptest2/-Ptest3]

Use option -Ptest1 to run the default profile

  • if you specify a profile -Ptest1, then the following option [-Dtestngfile=testng_Tests_All.xml] should not be specified.

Use option -Ptest2 to run the profile where to need specify just testng_xml_file use option [-Dtestngfile=testng_Tests_All.xml]

Use option -Ptest3 to run the profile where to need specify full path and testng_xml_file use option [-Dtestngfile=!testngxml!/testng_Tests_All.xml]

If you don't specify this parameter default option profile = -Ptest1

  • if you specify a profile -Ptest1, then the following option [-Dtestngfile=testng_Tests_All.xml] should not be specified.

If specified the previous option, it is necessary to specify what of file need to run test, specify the option [-Dtestngfile=testng_xml_file]

testng_Tests_All.xml - run all tests

testng_Tests_Group_Error.xml - run test of error group

testng_Tests_OneMethod.xml - run test

In project exist 3 kind of reports:

The SureFire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application.

To open the browser and in the address bar enter the path:

./target/site/surefire-report.html

Allure is open-source framework designed to create test execution reports clear to everyone in the team.

To open the browser and in the address bar enter the path:

./target/site/allure-report/index.html

JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team based on the lessons learned from using and integration existing libraries for many years.

[Not Implement yet]

mvn clean site -DdriverType=FF -Ptest1 -> full path = '!testngxml!/testng_Tests_All.xml'

mvn clean site -DdriverType=FF -Ptest2 -Dtestngfile=testng_Tests_All.xml -> full path = '!testngxml!/testng_Tests_All.xml'

mvn clean site -DdriverType=FF -Ptest3 -Dtestngfile=!testngxml!/testng_Tests_All.xml -> full path = '!testngxml!/testng_Tests_All.xml'

mvn clean site -DdriverType=FF -Ptest3 -Dtestngfile=!testngxml!/testng_Tests_TestRest.xml -> full path = '!testngxml!/testng_Tests_TestRest.xml'

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.