Submitted by harrydev on Mon, 09/05/2016 - 02:11
Listeners facilitates viewers to view responses generated by samplers in the form of tables, graphs, trees or simple text in some log files and also give pictorial access to the data collected by JMeter about those test cases as a Sampler component of JMeter is executed.
To view the details of sampler requests and responses, add either "View Results Tree" or "View Results in table" Listeners to a test plan which displays basic HTML and XML representations of the response. To view the response time graphically, add Graph Results which plots the response times on a graph.
Submitted by harrydev on Thu, 12/31/2015 - 03:22
When ever weexecute tests with TestNG, it will generate a default html report with basic information.
TestNG has provided an ability to implement 'IReporter' an interface which can be implemented to generate a customized report by users. It has 'generateReport()' method which will be invoked after all the suite has completed its execution and gives the report into the specified output directory.
Syntax for generateReport() method:
Submitted by harrydev on Mon, 12/28/2015 - 07:45
Webdriver events are helpful to view the events triggered by webdriver. It also plays an important role in analyzing results and helps us in debugging issues if we encounter any.
Selenium webdriver has ability to track different events such as 'beforeNavigateTo' , 'afterNavigateTo' , 'beforeClickOn' , 'afterClickOn', 'onException' and so on. When ever we develop test scripts we can write our own implementation for handling events during the execution.
Submitted by harrydev on Mon, 01/26/2015 - 01:47
In this tutorial, we will see taking a screen shot with test name and placing it in a folder by creating a folder with Test Class Name.
As we are taking screen shots on failure, we need to add logic in creating a screen shot and naming it with test name and place it in its test class name respectively.
We can get the test class name using 'result.getInstanceName()'. Test class name looks some thing like "com.pack.sample.HomePage". But we need to create a folder name with test class name i.e 'HomePage'.
Submitted by harrydev on Mon, 12/29/2014 - 00:59
We have discussed about simple way of taking a screen shot earlier. Now in this tutorial, we will see how to take screen shot ONLY for failed tests.
Submitted by harrydev on Wed, 09/24/2014 - 14:44
In TestNG we can generate logs with the help of Listeners. Listeners implement the interface "org.testng.ITestListener". There are methods which gives you a real time information.
You can either extend 'TestListenerAdapter' or implement Interface 'ITestListener' which is a listener for test running.
What are Listeners in TestNG : -