#60 new
habuma

Method rules should not be invoked before @Before-annotated methods

Reported by habuma | September 22nd, 2010 @ 04:40 AM

When running tests through Eclipse's built-in runner or through Maven, I see that @Before-annotated methods get executed before any applicable @Rules. That's exactly what I want, because the rule uses instance variables in the test that are set by the @Before method.

But in Infinitest, it's clear that the method rule gets executed before the @Before-annotated method. Because the instance variable hasn't been setup yet, the rule sees a null and fails.

I would think that tests run through Infinitest should be consistent with how they're run through other JUnit runners.

Comments and changes to this ticket

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