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

  • Home
  • SEARCH
  • 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 6631719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:35:09+00:00 2026-05-25T22:35:09+00:00

After writing my first few Java test programs, I want to write corresponding TestNG

  • 0

After writing my first few Java test programs, I want to write corresponding TestNG classes. I am using RHEL 5. I see that a typical directory looks like src/main/java and src/test/java.

(a) Who creates such directory? Do we create it manually? or there is a way to create test directory structure corresponding to main code dir structure.

(b) Also, how do I run these testNG classes from command line? Do I need to have any additional extra jars like testng.jar or something to support these annotations or these annotations are supported in default jdk 1.6?

(c) Also, when I create a TestNG class from Eclipse, it necessarily asks for a package name. Why is it so?

  • 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-05-25T22:35:10+00:00Added an answer on May 25, 2026 at 10:35 pm

    a) Who creates such directory? Do we create it manually? or there is a way to create test directory structure corresponding to main code dir structure.

    Its created by some tool like Maven or yourself. Tools will just create a test folder, further folders/structure are purely specific to practices in your project.

    (b) Also, how do I run these testNG classes from command line? Do I need to have any additional extra jars like testng.jar or something to support these annotations or these annotations are supported in default jdk 1.6?

    Here is nice link which shows how to run TestNG classes from command line including the extra jars needed

    (c) Also, when I create a TestNG class from Eclipse, it necessarily asks for a package name. Why is it so?

    I don’t any reason other than enforcing a fair practice.

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

Sidebar

Related Questions

I'm presently attempting to write a few classes to aid me in writing various
I am using JQuery to execute an operation within a web service. After writing
After using AS2 for several years, I'm getting started with writing applications in AS3
I am writing my first parser and have a few questions conerning the tokenizer.
After writing code to populate textboxes from an object, such as: txtFirstName.Text = customer.FirstName;
Often I find myself interacting with files in some way but after writing the
Suppose, I have a connected socket after writing this code.. if ((sd = accept(socket_d,
I am trying to implement ajax back/forward button support and therefore writing variables after
I'm writing a direct3d application and after noticing strange bugs such as anti-aliasing occurring
When writing server-side code you need to explicitly stop execution after sending a Location:

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.