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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:46:32+00:00 2026-06-11T22:46:32+00:00

I executed a simple test case (on jobss-ejb environment), which compares/asserts 2 strings. Unfortunately,

  • 0

I executed a simple test case (on jobss-ejb environment), which compares/asserts 2 strings.
Unfortunately, the strings are not matching to each other (there’s a bug).

But the problem is, when I execute the test case from eclipse it logs the result as failure which is correct because there’s a mismatch between expected and actual objects;

whereas when I execute the same test case from ant, the result is logged as error.

This is really strange and surprising and to add more to it, this behaviour is noticed on junit 4 version only, when i execute the test case on junit 3.8, both ant and eclipse log the result as failure.

Any suggestion or pointers on what might be going wrong?

Thanks in advance 🙂

Ant-version: 1.6.1
Junit version: 4.10

  • 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-11T22:46:33+00:00Added an answer on June 11, 2026 at 10:46 pm

    The differences in test result behavior as mentioned in question is because of ant version issue. For lower versions of ant, you’ll get such type of behavior (may be because the lower ant versions consider ComparisonFailure as error instead of failure).
    I found this behavior in ant version 1.7.1 (and lower). But this issue is solved in latest ant jar i.e. 1.8.4.
    When I executed the above mentioned test case on latest ant version, the result was logged as failure and not error.
    So, if you encounter such a problem just update your ant jar to 1.8.4 or other latest version available.

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

Sidebar

Related Questions

I have a simple Action class which I want to unit test: package com.gam.action.test;
I am trying to test this simple function, but Opt.status, Opt.Year values are not
Why is this simple test case inserting 100,000 rows 25 times slower with SQLAlchemy
I want to execute simple statement: SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Text;Database=C:\Temp\;','SELECT * FROM [test.csv]') And
Simple sum of digits code. It compiles but when executed, the last cout gives
I have the sample console application which is supposed to be executed in the
all. I wrote the following simple code to test scala.actors._: // java version 1.7.0_02
I have written a simple test class for Play! 2.0: public class TestLogin {
I wrote a test case that extends AbstractTransactionalJUnit4SpringContextTests . The single test case I've
I've written a query to test out a simple linear regression to get 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.