How can we do Data-driven testing in Selenium? One way is to use Parameters. As we know, we can run our tests with input(Parameter) to verify whether it is valid or invalid. For this, we can use Parameters in TestNG. But what if we want to run the same test for multiple inputs and check if we can cover different scenarios for that one...
TestNG is a Java Framework to set up the execution flow of the code and for reporting purpose. Annotations used in TestNG: Annotation Description @BeforeSuite BeforeSuite annotation method runs only once before all tests from the suite. @AfterSuite AfterSuite annotation method runs only once after all tests from the...
Automation Testing, Technology
Taking screenshots during testing is often considered a good practice. Adding a screenshot to the test reports provides complete clarity and visibility of the application such as if the application is working smoothly or something in the application needs to be fixed. It also makes the report meaningful and presentable. While carrying...
Automation Testing, Technology
Assertions are used to perform various kinds of validations in the tests and help us to decide whether the test has passed or failed. There are two types of assertions in Selenium that we can place in our test scripts using TestNG: Hard Assertions Soft Assertions Hard Assertions: As the name suggests, these assertions put a...