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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:20:00+00:00 2026-06-01T05:20:00+00:00

I have created 5 test cases in JUnit 4 and I was wondering is

  • 0

I have created 5 test cases in JUnit 4 and I was wondering is it possible to build a collection of 100 objects for my 5th test case with Annotations (i.e. @BeforeTest in TestNG), or other techniques without conflicting with my previous test cases.

I’ve done some research on the different annotations in Junit 4 http://www.mkyong.com/unittest/junit-4-vs-testng-comparison/, and because the functionality of @BeforeTest is not available in JUnit 4 but is completely suited to what I want, what other options are there?

Thanks!

  • 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-01T05:20:01+00:00Added an answer on June 1, 2026 at 5:20 am

    shouldn’t be any problem. the before test is used just for that test case. ditto for the after test.

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

Sidebar

Related Questions

I have JUnit 3 setup on Eclipse Helios. I created a test case to
I have created a model test case in a plugin. Plugin name: Filters and
I have this test case def setUp(self): self.user = User.objects.create(username=tauri, password='gaul') def test_loginin_student_control_panel(self): c
I have created total 50 test scripts. All these scripts use almost same objects
I have a Junit4 test case which statically imports the org.junit.Assert.assertEquals method(s). import static
I have to write a Test case in JUnit for a Class lets call
I have created a Survey.java class and a SurveyTest.java JUnit test. But I am
I have written some test cases in Junit. Now while running these test cases
I have massive junit test cases which are run by JunitCore.run() Now I want
I have created a test table in MySQL and would like to insert 10

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.