Hello Folks,
In last post, we have seen the requirements of TestNG in Selenium webdriver. We will learn how can we install TestNG in eclipse.
TestNG is a jar file. Any JAR file stands for Java ARchive which is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file for distribution.
We can install TestNG in different ways given below:
Above ways are scenario dependent and I will explain when and which way to follow.
When:
How:
You can download TestNG jar files from below sites:
Some direct link I can give you below:
Major disadvantage of using this approach is that you may or may not get the latest version of TestNG and also any upgrade need manual effort to download and add again to build path. Remember you must remove old version from build path.
Steps to follow:
4. Now you need to ad dthis jar file in to build path, so that Java Compiler will be aware of this. To add into build path, right click on testng jar file and Mouse hover on Build Path and select “Add to build path”.
Right Click —> Build Path —>Add To Build Path
5. Once you add jar file into build path, you can verify it by checking in “Referenced Libraries” folder. Expand it and you should see tesng.jar file in that.
6. You can also verify correct installation by using any one of the tag ( @Test etc) in any script. When you type @Test and mouse hover on it, you can see options to import it from TestNG package.
We will see other ways in upcoming posts.
More about TestNG in upcoming posts. Stay tuned.
If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.
#ThanksForReading
#HappySelenium
My name is Amod Mahajan and I am an IT employee with 4+ years of experience in Software testing and staying in Bengaluru. My area of interest is Automation testing. I started from basics and went throw so many selenium tutorials. Thanks to Mukesh Otwani as his tutorials are easy and cover basics to advance. I have habit of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and now I am here. #KeepLearning #ShareLearning
Hello folks, When we parametrize methods in a TestNG class, we must need to pass parameter values from testng xml.…
Hello Folks, In this post we will learn an important concept of parameters in TestNG. We know that we can…
Problem statement: Write a Java program to reverse position of words in given string i.e. word at first position in…
Hello Programmers, "Java Program to Reverse Every Word of a String" is frequently asked programming interview questions to freshers and experienced. I…
Hello folks, TestNG allows us to create parameterized methods in a TestNG class. A TestNG class may contain more than…
Hello Folks, We have seen previously that how can we parameterize methods in a TestNG class. The approach of using…