October 2018
Intermediate to advanced
192 pages
5h 12m
English
A second approach to implementing listeners is to extend the TestListenerAdapter class.
The following code shows a sample listener class:
public class SampleListener1 extends TestListenerAdapter { public void onTestSuccess(ITestResult testResult) { System.out.println(testResult.getName() + " was a success"); } public void onTestFailure(ITestResult testResult) { System.out.println(testResult.getName() + " was a failure"); } public void onTestSkipped(ITestResult testResult) { System.out.println(testResult.getName() + " was skipped"); }}
The test class for the preceding listener will not change. The output is shown here:
Title is : #1 Free CRM software in the cloud for sales and servicecheckListeners was ...
Read now
Unlock full access