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 8751041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:58:18+00:00 2026-06-13T12:58:18+00:00

I have several suites like Suite1, Suite2, Suite3 and so on. I also have

  • 0

I have several suites like Suite1, Suite2, Suite3 and so on. I also have a common suite called CommonSuite which has @BeforeSuite and @AfterSuite methods. I have a testng.xml that has all suites configured and I am using maven failsafe plugin to run the tests. Everything works fine.

Now my question is if I want to run/debug say just Suite1 using TestNG plugin in eclipse, how do I make sure that my CommonSuite is also included along with Suite1? One dirty way I know is that I can comment all suites that I don’t want to run in testng.xml and keep only CommonSuite and Suite1 and then run/debug as TestNG suite. Doesn’t seem to be the right way of doing this though. Any other better ways of achieving this?

  • 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-13T12:58:19+00:00Added an answer on June 13, 2026 at 12:58 pm

    Hi best way to do this is implement a listner class for suits implement ISuiteListener

    the basic clas will look like follows

        public class PlatformSuite implements ISuiteListener { 
    
        /**
         * This method is invoked before the SuiteRunner starts.
         */
        public synchronized void onStart(ISuite suite) {
            /*Your before suite implementation here*/
        }
    
        /**
         * This method is invoked after the SuiteRunner has run all
         * the test suites.
         */
    
        public void onFinish(ISuite suite) {
             /*Your after suite implementation here*/
        }
    
    }}
    

    for eclipse plugin you can specify testng xmal as “Template XML file”

    To initiate listener in testng.xml you can add following, remember to ass desable default listener setting

    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
    <suite name="DssTestSuite" parallel="false">
        <parameter name="useDefaultListeners" value="false"/>
        <listeners>
            <listener class-name="org.someonr.something.core.PlatformSuite"/>
        </listeners>
    <test name="sample Test" parallel="false" verbose="2">
        <packages>
        </packages>
        <classes>         
        </classes>
    </test>
    

    This call will call before each test suite and after each test suite

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several ASP.NET sites in IIS7 and would like to be able to
Background: I work in a suite of ASP.NET applications that have several different modules.
I've got several sites that I'd basically like to have the same user system
I have several apps that I'm trying to merge into a single suite: 2
I have a test suite that runs across several versions of a software application.
I have several sites (Asp.Net) that I would like to have a single sign
I have several sites where users can send me email through an html form
I have several sites in different domains: example.com , example.org , mail.example.com and passport.example.org
I have several sites that I want to link back to the main site
I have seen several sites where these social share buttons looks perfectly horizontal aligned.

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.