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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:31:37+00:00 2026-05-18T05:31:37+00:00

I am switching a project from Ant to Maven. I have my unit tests

  • 0

I am switching a project from Ant to Maven. I have my unit tests in the correct location, but for whatever reason the maven surefire plugin only sees about 136 (out of 1136 total) of the tests.

When using Ant, we used the older test suite technique of:

public class GatherTests{
  public static Test suite(){
    ... add tests ...
    return testSuite;
  }
}

as our runner. I haven’t been able to determine how to get this to work using Surefire. I am using junit 3.8.1 with Maven 2.0. Does anyone know if this is possible? One thing I tried is:

-Dtest=GatherTests

with no luck. Many of our tests exist in classes that do not immediately inherit from junit.framework.TestCase, so that may be why surefire is having trouble gathering them. I will go through the logs now to see what it is missing.

Thanks
Tim

  • 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-18T05:31:38+00:00Added an answer on May 18, 2026 at 5:31 am

    Of course I figured it out shortly after posting this.

    Maven Surefire Plugin Page

    On there it says:

    By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:

    • “*/Test.java” – includes all of its subdirectories and all java filenames that start with “Test”.
    • “**/*Test.java” – includes all of its subdirectories and all java filenames that end with “Test”.
    • “**/*TestCase.java” – includes all of its subdirectories and all java filenames that end with “TestCase”.

    The tests that were not being run matched the pattern **/*Tests.java. I added an inclusion rule, and they are all running now.

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

Sidebar

Related Questions

I'm switching from ActiveRecord to Dapper. I have a simple Project class with a
I am considering switching a Maven project that I manage to Apache-Ant/Ivy. I need
I recently started switching my project from Flex SDK 3.5 to 4.5.1, but my
Right now, I'm switching my project over from the classic fluent nhibernate style of
I'm looking at switching my projects build from Ant to leiningen and wanted to
I am considering switching a cross platform project from separate build management systems in
To have browsable javadocs in a project hosted at Google-code, I got from here
I need your help. I have been switching from various libraries trying to find
We are looking at switching from phpundercontrol to Hudson (it looks to have some
I'm switching a project from Rails2 to Rails3. I run: rails server The server

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.