Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Java 'assert' not triggering test failure.

#63

I have many unit tests that use the simple Java 'assert' syntax. For example:

assert myVar!=null : "You var actually IS null!";

When using TestNG or JUnit normally, these asserts correctly fail tests. However, when run by Infinitest, these assertions don't seem to actually fail the tests when they should. I get all successes all the time. However, when I use the TestNG or JUnit 'Assert' classes, the same test correctly fail both normally, and when run by Infinitest. For example:

Assert.assertNotNull(myVar,"Your var actually IS null!");

Not sure if this is user error, but I'm not seeing anything in the User Guides or published documentation about it, and it's proving to be a pretty big problem for me at the moment.

Reported by Falken · May 13th, 2011 @ 10:57 PM

State: new
Milestone: none
Assigned to: nobody

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.