Selenium
How to Take Screenshot in Selenium WebDriver
Screenshot in Selenium Webdriver A Screenshot in Selenium Webdriver is used for bug analysis....
Report generation is very important when you are doing the Automation Testing as well as for Manual Testing.
Selenium web driver is used for automating the web-application, but it won't generate any reports.
In this tutorial, you will learn-
The output report of testng will look like below if both the classes are passed:
Consider the scenario in where you are intentionally failing the test case i.e. DemoB class. Then convert both the classes into testng.xml suite file and run it. Then the result will look like this. It will show the failed test cases.
This is result for DemoB class:
Similarly, result for the Class DemoA will look like this:
The result will look like this:
Along with these report generated methods, you can use object.properties file to store the system generated logs as well as user generated logs. But one of the simplest ways to store log information in testing is using Reporter Class.
Reporter is a class present in TestNG. It provides 4 different methods to store log information they are:
Example:
Create Two classes such as DemoA and DemoB and write the following code inside the classes.
For Class DemoA;
For Class DemoB:
Similarly, you will have an Output for Demo B project as well.
2. In test-output folder open the index.html. It will look like:
Click on reporter output. It will open logging info whatever written in the test methods.
Click on the Times. It will going to show how much time it took to run the test method present in class.
Screenshot in Selenium Webdriver A Screenshot in Selenium Webdriver is used for bug analysis....
In this tutorial, we will learn How to deal with file uploads and downloads. Uploading Files For...
What are Broken Links? Broken links are links or URLs that are not reachable. They may be down or...
What is Ajax? AJAX stands for Asynchronous JavaScript & XML, and it allows the Web page to...
In Selenium, "Waits" play an important role in executing tests. In this tutorial, you will learn...
During test automation of web-based application, there comes a need for the page to be refreshed...