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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:50:34+00:00 2026-06-15T04:50:34+00:00

In my Spring-Maven project my unit tests inherit from a base class: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations

  • 0

In my Spring-Maven project my unit tests inherit from a base class:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:testDalApplicationContext.xml" })
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)
@Transactional(value = "transactionManager")
public abstract class BaseRepositoryUnitTest {

}

Then a tipical unit test can look like:

public class UserRepositoryTest extends BaseRepositoryUnitTest {

@Autowired
UserRepository userRepository;

@Test
public void testFindUserByEmailAddress() {
 ...
}
}

This structure allows me to:

  • Run a single test as a Junit test (from my Eclipse IDE).
  • Run all my tests using Maven build.

How do I run all my tests from my Eclipse IDE? I know I should create a test suite, but for some reason with this structure I can’t seem to figure out how.

BTW – I’m using Junit 4.9

  • 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-15T04:50:36+00:00Added an answer on June 15, 2026 at 4:50 am

    To run all of the Junit tests within your application

    Right click the Project or Package > Run as > Junit Test

    enter image description here

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

Sidebar

Related Questions

I'm taking over an existing Spring/JPA(w/hibernate)/Maven project and attempting to integrate unit testing and
I have a Java Spring project, configured with Maven. As the amount of unit
We have a few maven projects that inherit from eachother. Our persistence layer project's
I am using Spring and Maven project. I have Project mit-webservices and mit-util project
I have Maven project with Hibernate and Spring framework. I want Hibernate to create
I have a maven project that was generated by Spring Roo. Now I am
I am trying to set up a Spring project without Maven. My project has
I have a Maven based Spring-WS client project that I want to package as
I'm using Spring 2.5.6 and building my project with Maven 2.2.1. We use PropertyPlaceholderConfigurer
I have a maven project under eclipse with m2eclipse. WHen running integration tests the

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.