Giter Site home page Giter Site logo

gudivadabala / java-maven-testng-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qualityworkscg/java-maven-testng-starter

0.0 0.0 0.0 3.56 MB

This is a simple project that would allow anyone to get up and running with Java, Maven, Selenium and TestNG

License: MIT License

Java 100.00%

java-maven-testng-starter's Introduction

QualityWorks

Java Maven TestNG Automation Starter

This is a simple project that would allow anyone to get up and running with Java, Maven, Selenium and TestNG. It also explains how to execute a simple test that will assert the title of a page.

Currently the project has one test that will navigate to http://www.qualityworkscg.com/ and verify the title matches QualityWorks Consulting Group

Table of Contents

There are a few things we need before running the tests. These are:

  1. Java Installation / Update

  2. Setting up Eclipse

  3. Running the Project

  4. Special Notes

Java Installation / Update

Check your system to see if you have the latest Java version installed.

Command:

$ java -version

If you do not have the latest Java installed, find out how to install Java here.

Ensure your JAVA_HOME environment to the location of the installed JDK. Find out how to do that here.

Setting up Eclipse

Navigate to the Eclipse download page and download eclipse for Java EE developers.

Installing TestNG

  1. Installing a Plugin:

    • Inside Eclipse, click on the Help menu
    • Select Install New Software.

    Install New Software-1

  2. Locating the Plugin:

    Install New Software-2

  3. Selecting the Plugin:

    • Ensure the TestNG checkbox is selected

    • Click the "Next" button to the right bottom

      Install New Software

  4. Finishing up:

    • Accept the terms of the license agreement
    • Click on the Finish button

    Install New Software

Setting up Maven

  1. Download Maven here.

    Maven Installation

  2. Unzip the distribution archive to the directory you wish to install Maven. I extracted maven to my Documents folder

  3. Add Maven to the PATH. More information can be found in the README.txt in the zip folder.

    • Here's an example of how I added Maven to my PATH on MacOS. I added the folowing to the ~/.bash_profile.
    $ export PATH=/Users/admin/Documents/Software/apache-maven-3.5.0/bin:$PATH
    
    • Then sourced (execute) the content of the ~/.bash_profile
    $ source ~/.bash_profile
  4. Verify Maven was correctly installed

    • Command:
    $ mvn –version

    Maven dependencies are crucial to running any Maven project.

    Maven dependencies contains key references to libraries that a Maven project needs to execute. The pom.xml in the root of a Maven project file stores the dependencies (similar to the package.json for Node and gemfile for Ruby) for a project.

Running the Project

From Eclipse

  1. Import this project into Eclispe
  2. Right click the project then select Run As then Maven Tests
  • Running Tests

    Following the above steps executes the configurations found in the testing.xml file by default.

From the Command Line

Navigate to the location of project then execute mvn test.

Expected output:

Expected Test Output

Special Notes

  • Ensure FF version 48 or higher is installed

Contributing

Feel free to submit a pull requests! For specifics on how to contribute to this project, check out the contributing file.

License

This project is released under the MIT License.

java-maven-testng-starter's People

Contributors

romarioraffington 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.