Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 30, 2021 06:12 pm GMT

Maven Build Tool (for Selenium Java)

What is Maven?

  • Softwareproject-Management-Tool to maintain and manage the project
  • Build-Management-Tool for Java Frameworks

Why?

  1. Central Maven Repository to get Dependencies
    Maven visits the website, downloads the needed jars and places it in the build path.
    e.g. Selenium Jars
    just find Selenium Repository
    Selenium Repo Search

  2. Maintaining common structure for all
    One common template across the organisation
    this is the empty skeleton:
    Selenium Repo Search

  3. Flexiblity in integrating with CI Tools
    e.g. Maven Commands wich are supported by Jenkins

  4. PlugsIns for Test Framework execution
    TestNG, JUnit

Vocablary

groupId : unique identifier (e.g. Selenium)
artifactId: sub-project of Group ID (e.g. Selenium-Java, a jar name)

<dependency>    <groupId>org.seleniumhq.selenium</groupId>    <artifactId>selenium-java</artifactId>    <version>3.141.59</version></dependency>

You can pass all this details and publish it in Maven, then other persons can simply clone it with groupId and artifactId

Create Maven Project in Eclipse

create Maven Project
Let it use default Workspace
Use maven-archetype-quickstart template
create Maven Project

Fill your POM.xml -File

  1. Get the Dependencies from Maven RepositoryGo to the maven repository and get each Dependency and put it inside the Dependencies
  2. find sureFire Pluginto execute all your testcases in your project

Original Link: https://dev.to/annequinkenstein/maven-gi8

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To