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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:38:21+00:00 2026-06-10T21:38:21+00:00

I converted a dynamically generated JUnit test suite to TestNG using a @Factory annotation.

  • 0

I converted a dynamically generated JUnit test suite to TestNG using a @Factory annotation. The tests are generated by scanning a directory that contains several test specification files (written in a DSL) and by loading them in an test class that knows how to execute them. The test class has a single @Test method named test, implements org.testng.ITest and overrides getTestName() as recommended.

However, in the TestNG Eclipse UI, only the factory and a single execution of test is shown (although it is executed several times, as expected). With JUnit, I had the name of each spec listed as a separate test. This is very important because several test specs could fail and I would need to see all failures (which does not work in the TestNG Eclipse UI for me).

How can I achieve something similar with TestNG? I use the Eclipse TestNG plugin 6.7.0 and testng 6.7.

  • 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-10T21:38:23+00:00Added an answer on June 10, 2026 at 9:38 pm

    Try extending XmlTest in your test class and call setName(). I extended XmlSuite and used setName to name my “test suite” which is a class with multiple tests defined in it and that worked for me. In fact I just tried what I suggested on the same class and now it’s called a test with the correct name. I’m not sure why the ITest interface is being ignored as I also tried that approach without success.

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

Sidebar

Related Questions

I have an array which contains many keys/values that are generated dynamically, so I
I've recently converted my code to produce dynamically generated results. The below code worked
Consider My dynamically generated datatable contains the following fileds Id,Name,Mob1,Mob2 If my datatable has
I've got a JSON value that has been converted from a JavaScript object using
I'm using pylons to serve a dynamically generated pdf document for reporting: my approach
I am generating dynamic page using JSP, I want to save this dynamically generated
I am designing an application that will display dynamically-generated forms to the user who
I have about 500 WinForms that are generated dynamically from XML files by an
Suppose I have the entire Base64 string for an image that is generated dynamically.
I've converted an api written in Java into a .net dll using IKVM, and

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.