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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:13:45+00:00 2026-05-27T21:13:45+00:00

Environment: Java Maven Eclipse Spring Jetty for developemnt JUnit I just started on a

  • 0

Environment:

  • Java
  • Maven
  • Eclipse
  • Spring
  • Jetty for developemnt
  • JUnit

I just started on a new project (Yay!) but the current unit test state is a bit strange (to me). There is no way to run the tests in an automated way. Some of the tests need the server up and running to pass and so fail when run otherwise.

To make matters worse there are a large number of tests that have fallen behind and no longer pass, though they should (or they should have been changed).

The trouble is that the tests are run manually (right click in eclipse and run as JUnit test) so since no-one is going to manually test everything with each change the tests are simply written and then forgotten.

I am used to developing with all tests green from the start and I want to bring testing back into a useful state with automation.

How do I:

  • Mark test to not run with a reason (like “legacy test needs to be updated” or “passes only with server”).
  • Run different tests depending on if the server is up.
  • Some way to log test statistics for trending of testing information (not as important)

Any suggestions would be useful. Thanks.

Update: made question more specific.

  • 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-27T21:13:46+00:00Added an answer on May 27, 2026 at 9:13 pm

    Assuming you’ve got actual work to be getting on with, I’d advise not to try to fix all of the existing tests before doing anything else. By all means @Ignore any tests that are failing so you can work with the tests that currently pass. Maybe also try to make a note for each failing test that you ignore, so you can re-visit it when you come to work on the area of code it’s trying to test.

    If your tests depend on external services, you may be able to use assumeTrue() to verify that they’re up before actually trying and failing the test — this will mark the test ignored at run-time so you still get your build and as much useful information as is possible. The TestWatcher class (if you have a new enough JUnit) may help you to do this with minimal boilerplate — we have it set up to ignore instead of failing if we can’t connect, then to ignore any tests that would subsequently fail without paying the timeout penalty again.

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

Sidebar

Related Questions

I have a Java Spring project, configured with Maven. As the amount of unit
They recommend using JTA transaction support in Java EE environment. But how to configure
We are using an Oracle 11 database and a java development environment (using Eclipse)
I'm working on a Java web project that uses Maven to build its artifacts.
I am trying to use Spring 3.0.5.RELEASE together with MyBatis in a Maven environment.
I have a war packaging Maven project, in which I have a Java properties
im just getting started on maven, and im currently following the article from http://www.sonatype.com/books/mvnex-book/reference/simple-project-sect-create-simple.html
I've been working on a java spring project for a few months now. I
I'm currently looking into replacing our very proprietary build environment with Maven. The current
I am brand new to both java and to maven, so this is likely

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.