Install TestNG in IntelliJ | TechGeekNext

Install TestNG in Intellij (2024)

In this tutorial, we will learn the steps for installing the TestNG plugin in IntelliJ. Before going to the steps of the install TestNG plugin in IntelliJ, let us have a brief idea about TestNG.

What is TestNG?

  • In TestNG, NG is for Next Generation. TestNG is an open-source automated TestNG framework.

  • When actual development of the framework from scratch level is done TestNG framework plays a very important role.

  • Another name for the TestNG is the testing framework as it provides full control over the test cases and execution of test cases.

  • TestNG is easier and frameworks are having more functionality. After JUit and NUint, the TestNG framework was developed.

  • The limitations of the older framework were removed by the TestNG Framework.

  • TestNG gave the ability to write flexible and significant tests to the developers with the help of annotations, sequencing, parametrizing, and grouping.

Now after having a brief idea about what is TestNG, let us go through to the installation of the TestNG plugin in IntelliJ.

How TestNG is installed in the Intellij?

In IntelliJ external dependencies have to be downloaded. If it is a maven project IntelliJ requires a direct link for dependency. On our system, we have to download an external TestNG Jar File as we are running Tests on Java.

How TestNG Jar is downloaded?

TestNG Jar can be downloaded easily from the site Maven Repositories https://mvnrepository.com/ by searching TestNG in the search bar.

maven testNG repository

What is Maven Repository?

A directory of packaged Jar File with pom.xml file is known as Maven Repository. The dependencies in the repositories are searched by Maven. Maven Repository is of three types:

  1. Local Repository

  2. Central Repository

  3. Remote Repository.

Steps for installing the TestNG in IntelliJ

Following are the steps for installing the TestNG plugin in IntelliJ.
  • Version: After searching the TestNG in the search bar. Select the latest version which is available there. Here we will go to the latest version 7.5.

testNG plugin version
  • Link: To download TestNG on the local system select the Jar link.

testNG jar link

Clicking on the jar tab downloading the TestNG Jar file will be done on your system.

  • Adding: For learning further steps of installation of TestNG jar files in IntelliJ we have to add this Jar in Intellij.

  • Setup of Jar file in IntelliJ: After downloading TestNG Jar Files following steps for the setup of Jar files in IntelliJ has to be followed:

Steps for setting up TestNG Jar in IntelliJ.

  1. Project Structure: In IntelliJ Go to File -> Project Structure and the direct keyboard shortcut is Ctrl + Alt + Shift +S.

intellij project-structure

2. Modules: Click to Project structure->Modules.

3. Adding Dependencies: Click to the Modules and below screen will be visible of dependency where dependency can be added.

Click the sign + to add a new dependency and then select JARs or Directories.

testNG jar-dependency

4. Select Path: After downloading the JARs or Directories, Navigate directly through the graphical user interface (GUI) for selecting the path or write the Path where you downloaded the JARs.

testNG select-jar

Now select the OK tab and TestNG is downloaded.








Recommendation for Top Popular Post :