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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:05:46+00:00 2026-05-22T23:05:46+00:00

I just used MyEclipse to automatically generate some JUnit test cases. One of the

  • 0

I just used MyEclipse to automatically generate some JUnit test cases. One of the generated methods looks like this:

@Ignore("Ignored") @Test
public void testCreateRevision()
{
    fail("Not yet implemented"); // TODO
}

I added the @Ignore annotation manually. However, when I run the test, JUnit lists that method, and others like it, under “failures,” rather than ignoring them (related: What's the difference between failure and error in JUnit?). And it displays the “Not yet implemented” message instead of the “Ignored” message. Clearly, fail() must be getting called, and therefore, the @Ignore assertion is not working.

What’s going on here? Is there a setting I need to enable for this to work?

EDIT :
Things I have considered/tried so far:

  • I am using JUnit 4, so it’s not a version problem.
  • I am importing org.junit.Ignore, so it’s not a case of the wrong Ignore being used.
  • I have tried using @Ignore alone, @Ignore @Test and @Ignore("message") @Test; all fail.

EDIT 2 :
I created the tests with MyEclipse, via New > Other; Java > JUnit > JUnit Test Case; New JUnit 4 test, and the library in my build path is JUnit 4. I’m building with ant and actually running the case with MyEclipse.

  • 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-22T23:05:47+00:00Added an answer on May 22, 2026 at 11:05 pm
    1. Make sure you are importing the right @Ignore. To be sure use @org.junit.Ignore explicitly.

    2. Double check if your test is being executed by JUnit 4, not 3. The easiest way to do this is to either change the test name so it is not prefixed by test (now it shouldn’t be executed at all and JUnit 4 does not need this prefix anyway) or examine your test case inheritance hierarchy: it shouldn’t extend directly or indirectly from junit.framework.TestCase (Junit 3 requirement).

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

Sidebar

Related Questions

I just used this feature for the first time - in MS One Note
I've typically just used constants in the past for things like this, say #define
I'm new to PHP development and I just used Zend yesterday. One problem I'm
I am not much familiar with Java Quartz, we just used a test job
To localitie items in the standard directories, I have just used either one of
I use an Access database used just as back end. I use some Memo
i am very much new to Entity Framework and i just used this in
I just used this to switch my rails app db from sqlite3 to mysql2
I just used the XmlWriter to create some XML to send back in an
I've always just used SELECT COUNT(1) FROM X but perhaps this is not 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.