Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:27:07+00:00 2026-06-02T20:27:07+00:00

I am looking for concrete steps to customized the report by using ITestListener interface

  • 0

I am looking for concrete steps to customized the report by using ITestListener interface & TestListenerAdapter class methods following two methods.

Where to change in the following resources?

@override
onTestfailure( ITestResult tr)
{
 log("Failed");
}

@override
onTestSuccess( ITestResult tr)
{
 log("Passed");
}

1-Test Class

public class Mytest()
{
 @Parameters({ "first-name" })  
 @Test 
 public void testSingleString(String firstName) {   
  System.out.println("Invoked testString " + firstName);  
  assert "xxx".equals(firstName);  
 } 
}

2- testng.xml

<suite>
<listeners>
</listeners>
<parameter name="first-name"  value="xxx"/> 
<test name="MyTest">
<classes>  
<class name="example1.Mytest"/>  
</classes>  
</test> 
</suite>

Note: I run my testng eclipse using Run As TestNg.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:27:10+00:00Added an answer on June 2, 2026 at 8:27 pm

    You need to add the listener class in the xml.

    <suite>
    <listeners>
    <listener class-name="packagename.classname.which contains ontestfailure and success"/>
    </listeners>
    <parameter name="first-name"  value="xxx"/> 
    <test name="MyTest">
    <classes>  
    <class name="example1.Mytest"/>  
    </classes>  
    </test> 
    </suite>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to map an interface and concrete class with fluentnhibernate. here's my interface
I can't find a concrete and COMPLETE example of what I'm looking for. In
I'm looking for a KeyValuePair class in Java. Since java.util heavily uses interfaces there
I was looking for a platform where widgets developed using various technologies like Java
I'm a Clojure novice and was looking for some concrete examples of when to
Is there a way in C++ to write a concrete class which when another
I am looking for a concrete example (http://stackoverflow.com/questions/1313607/finding-the-center-point-of-a-city, for instance, contains general information, which
I'm looking at using the new cloning functionality of Sitecore 6.4 to help with
I have a legacy desktop accounting application developed using Delphi 5 & Paradox, which
I'm looking for advice on refactoring to improve my class design and avoid type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.