#63 new
Falken

Java 'assert' not triggering test failure.

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

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.

No comments found

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Continuous Test Runner for Java

Shared Ticket Bins

People watching this ticket

Pages