In this article we will see how to install TestNG in Eclipse. Installing TestNG is very easy in eclipse. Please follow step-to-step screens in this tutorial to install it in Eclipse.
Automation framework design requires a well-defined approach.Based on short-term goals as well as long term goals kept in mind, in order to reap maximum benefits of automation. Any automation framework benefit is its ability to increase the test coverage, increase the efficiency of test resources, increase the quality and reliability of the software application under […]
TestNG DataProvider Basic Example. What is DataProvider ? @DataProvider allows a @Test method which uses the data provider to be executed multiple times. By using DataProvider the @Test method would be executed using the same instance of the test class to which the test method belongs.
What is @Factory Annotation ? TestNG Factory annotation feature allows us to create tests dynamically at run-time.Factory will execute all the @Test methods in the test class using a separate instance of the test class.
In this post, we will see how to customize SoftAssert in TestNG Framework. Sometimes, we might write more than one assert in a @Test method and want to make all the asserts run even if one or more fails. This can be achieved using SoftAssert in TestNG ( SoftAssert in TestNG Framework ).
In this article, we will discuss TestNG custom listener example. First of all, a custom listener can be created, that implements TestNG API ITestListener interface. Also, a custom listener is for listening tests running. Furthermore, we may want to perform some custom actions, after each test is success, failed etc.
To get started, let’s use this article to demonstrate specifically customized screen shot capture feature in TestNG Automation framework. An awesome capability is to capture screenshot when an Assert fails with TestNG Framework. You can write custom assertions in TestNG by overriding the onAssertFailure() method in the Assert lifecycle. The capability hooks this method to […]
In this post we will discuss SoftAssert. Using SoftAssert when an assertion fails, it doesn’t throw an exception but records the failure. Invoking .assertAll() method, will cause an exception to be thrown if at least one assertion fails. Also,soft assert allows all assertions to run, no matter if they pass/fail. Also, if there are failures, […]
If we write tests using TestNG framework perhaps we use the Assert class. But, most of the methods on this class are static, and the constructor is protected. So, in this post, we will explore how to write our own custom assertions to get more handle on the operations.
In this post, we will see how to customize SoftAssert in TestNG Framework. Sometimes, we might write more than one assert in a @Test method and want to make all the asserts run even if one or more fails. This can be achieved using SoftAssert in TestNG ( SoftAssert in TestNG Framework ). However, we […]