Back to Course
TestNG & Maven

Adding Dependencies In Maven Project

What is a Dependency?

A dependency is an external library (like Rest Assured or TestNG) that your project needs; Maven downloads and manages these automatically based on entries in pom.xml.

Example

<dependencies>
  <dependency>
    <groupId>io.rest-assured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>5.4.0</version>
  </dependency>
</dependencies>

Why This Matters

Rather than manually downloading jar files, Maven automatically fetches the correct dependency (and its own dependencies) from a central repository the moment it's declared.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course