TestNG Introduction
TestNG, where NG stands for “Next Generation” is a testing framework inspired by JUnit (in Java) and NUnit (in C#). It can be used for unit, functional, integration, and end-to-end testing. It mainly uses Java annotations to configure and write test methods. TestNG was developed by Cedric Beust. He developed it to overcome a deficiency […]
Understanding testng.xml file
Understanding testng.xml file will discuss in detail about the xml configuration file. testng.xml file is a configuration file in TestNG. It is used to define test suites and tests. It is also used to pass Parameters to the test methods. It provides different options to include packages, classes and independent test methods in our test suite. […]
Running testng.xml using Command Prompt
Running testng.xml using command prompt will discuss about how to execute xml file from the command prompt. In our previous blogs we just created testng.xml file but did not verified it by running testng.xml file. In this blog will discuss how to run testng.xml configuration file. There are multiple ways of running the testng.xml file. […]
Running testng.xml using Eclipse
In our previous blog we have learnt how to run testng.xml using command prompt. Now, in this blog will learn running testng.xml using eclipse IDE. This is one of the ways to execute the automation scripts using testng.xml configuration file. Below are the steps to running testng.xml using Eclipse: 1. Open Eclipse. 2. Go to […]
Creating testng.xml file with multiple tests
In our previous blog, we have created a testng.xml file with only one test in a suite. But, TestNG allows to define multiple tests in a single suite. This way we can segregate our tests and can create different tests based on our requirement (i.e. smoke tests, sanity tests and integration tests etc…). Now we’ll […]
Adding Packages to testng.xml file
Adding Packages to testng.xml file, will explain you about creating and configuring TestNG test suite with packages which are developed/created in the java project. A Package may contain one or more classes in it. With this testng.xml configuration file we can include all the classes belongs to a particular package or its subpackages to the […]
Adding Classes to testng.xml file
Adding Classes to testng.xml file, will explain you about creating and configuring TestNG test suite with classes which are developed/created in the java project. A Class may contain one or more methods in it. With this testng.xml configuration file we can include all the methods belongs to a particular class to the test suite. Below […]
Adding Methods to testng.xml file
Adding methods to testng.xml file, will explain you about creating and configuring TestNG test suite with methods which are developed/created in the java project. A Class may contain one or more methods in it. With this testng.xml configuration file we can include all the methods belongs to a particular class to the test suite. Below […]
TestNG Annotations
Annotation is a feature introduced in Java 5 and is used to add metadata to Java source code. This will allow you to add information to an existing data object in your source code. It can be applied for Classes, Methods, Variables and Parameters. Java allows users to define their own annotations too. TestNG made […]
Before And After Annotations
Before and After Annotations are very useful while writing the selenium programs. These will control the execution flow of your program. What should execute what time and which statement or block of code should execute first and which should be last. One of the important thing is the order of writing the annotations is not […]