SELENIUM BASICS:


SELENIUM WEBDRIVER:


TESTNG:


REPORTS:


BUILD & CONTINUOUS INTEGRATION TOOLS:


CROSS BROWSER TESTING:


MOBILE TESTING:


AUTOMATION FRAMEWORKS:


API Testing:


INTERVIEW QUESTIONS:


SAMPLE RESUME:

TestNG Introduction | TestNG Tutorial

TestNG Introduction:

Definition of TestNG as per its documentation is as follows:

TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing to integration testing.

Writing a test is typically a three-step process:

  • Write the business logic of your test and insert TestNG annotations in your code.
  • Add the information about your test (e.g. the class name, the groups you wish to run, etc…) in a testng.xml file or in build.xml.
  • Run TestNG.xml.

Later in this tutorial, we will discuss about TestNG Annotations, testng.xml.

TestNG is a framework for Java, so the very first requirement is to have JDK installed in your machine.

Verify Java Installation in your system

Output:

Set Java Environment:

Set the JAVA_HOME environment variable to point to the base directory location, where Java is installed on your machine. For example,

Set the environment variable JAVA_HOME to C:\Program Files\Java\jdk1.8.0_101

Append the string C:\Program Files\Java\jdk1.8.0_101\bin at the end of the system variable, ‘Path‘.

Setup TestNG:

Click on this link to read How to setup TestNG

Click the below Video on How to Install TestNG

Please be patient. The video will load in some time.

Click on this link to read How to run TestNG test using CMD

TestNG can be invoked in three different ways:

  • Using command prompt
  • Using testng.xml file
  • Using ANT

Click here to read How to create testng.xml file manually

Click the below Video on How to create testng.xml file

Please be patient. The video will load in some time.

You could find the complete TestNG tutorial here.

TestNG Complete Tutorial

If you are not regular reader of my blog then I highly recommend you to signup for the free email newsletter using the below link.

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

Leave a Comment

Your email address will not be published. Required fields are marked *

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook

DOWNLOAD FOR FREE