Coder Social home page Coder Social logo

paramdl / webdriver-testng-archetype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barancev/webdriver-testng-archetype

0.0 0.0 0.0 57 KB

Archetype for a Maven project that can be used as a start point to develop tests in Java with WebDriver and TestNG

License: Apache License 2.0

Java 100.00%

webdriver-testng-archetype's Introduction

WebDriver TestNG Archetype

This archetype generates a new Maven project that can be used as a start point to develop tests in Java with Selenium WebDriver and TestNG.

To create a project from this archetype:

mvn archetype:generate -DarchetypeGroupId=ru.stqa.selenium -DarchetypeArtifactId=webdriver-testng-archetype -DarchetypeVersion=4.5 -DgroupId=<mygroupId> -DartifactId=<myartifactId>

where mygroupId is a group id of the project you are creating, and myartifactId is an artifact id of the project you are creating.

Project Structure

The project follows the standard Maven structure, so all the tests go in the src/test/java folder. Tests should inherit from the TestNgTestBase class that performs common setup and teardown tasks. This class uses WebDriverFactory to manage drivers.

SampleTestNgTest class (in src/test/java) is an example of a test class for testing the homepage of a web application. In the setup method of this class, the PageFactory class is used to help supporting the PageObjects pattern.

Project Configuration

The project uses Maven profiles to set configuration parameters. There are three profile groups: 1) to specify a browser, 2) to specify the target application properties, 3) to specify Selenium Grid location.

For example, to run tests in Chrome on the localhost without grid use this profile set:

mvn -P chrome,localhost,nogrid test

Default profile set is firefox,localhost,nogrid

The target application URL and the grid location should be specifies in the pom.xml file in the corresponding profiles.

Driver capabilities can be tuned in the files src/test/resources/*.capabilities.

webdriver-testng-archetype's People

Contributors

barancev avatar elfelli 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.