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, […]
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 go through difference between Implicit Wait and Explicit wait in Selenium WebDriver.In addition , we would go through some code example about both of them. Furthermore, this is frequently asked testing interview question. Also, in some testing interviews you might even be asked to write code snippets.
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.
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 ).
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.
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 […]