- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ashish Anand has Published 213 Articles
Ashish Anand
157 Views
TestNG Listeners have the capacity to listen to a specific incident. It is basically an interface that changes the nature of the system. TestNG Listeners are used for logging purposes and creating reports. TestNG can be configured with the Listeners which can change the default behavior of the TestNG. ... Read More
Ashish Anand
791 Views
TestNG is an open−source automation testing framework. It can be used along with build tool such as maven, Gradle, ant and even with snapshot. However, user can separately download the TestNG jar file and configure it with the project without using build tool. In this article, we will see how ... Read More
Ashish Anand
140 Views
testng.xml has a format as where we define what all test classes should be executed. There is no any specific way to provide regular expression in a class in . But there are work arounds those are useful to run specific @Test from a class. TestNG supports regular expression ... Read More
Ashish Anand
121 Views
TestNG is a powerful testing framework, an enhanced version of JUnit which was in use for a long time before TestNG came into existence. NG stands for 'Next Generation'. TestNG framework provides the following features − Annotations help us organize the tests easily. Flexible test configuration. Multiple test ... Read More
Ashish Anand
98 Views
TestNG supports multiple exceptions in single @Test method. It is similar to the catch exception in Java where user can mention multiple exception class those are possible to be thrown. Ex: Syntax in catch exception is: catch(IOException | InterruptedException ex) { Similarly, syntax in TestNG is: @Test(expectedExceptions={NullPointerException.class, IllegalArgumentException.class }) public ... Read More
Ashish Anand
155 Views
TestNG supports multiple ways to skip or ignore a @Test execution. Based on requirement, user can skip a complete test without executing it at all or skip a test based on specific condition. If condition meets at the time of execution, it skips remaining code in the test. There are ... Read More
Ashish Anand
549 Views
User may encounter Cannot find class in classpath exception while executing tests in TestNG framework. The meaning of this error is TestNG unable to find the class as mentioned in testng.xml. This can be caused because of the following reasons − In the TestNG XML, the class tag having ... Read More
Ashish Anand
360 Views
TestNG supports Assertion class that is used for validation. assertTrue() and assertEquals() are supported functions of this class. assertEquals() This function is used to assert whether 2 data values are equal or not. Data types can be used to assert are String, int, Boolean etc. The user should make sure ... Read More
Ashish Anand
111 Views
JUnit and TestNG are the most popular testing frameworks for Java applications or Selenium. Both frameworks are easy to use. So, when it comes to choose the testing framework for your application, it’s better to have a high−level idea of what features are present in one or the other and ... Read More
Ashish Anand
125 Views
A TestNG class can have various @After TestNG methods. Such as: @AfterTest @AfterSuite @AfterClass @AfterMethod etc. This article will explain the order of execution of different TestNG methods. TestNG consists of following @After methods to support main @Test method. The order of execution of @After methods should be as following: ... Read More