Re: Externally activated (global) rules
Kevin Cooney <[email protected]> Mon, 29 Apr 2013 09:06:33 -0700
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <CAA3E+eVnZ4RO_hFNEShZTX97XFmkyc1GZizW7P6Xq8qVSvuMVg@mail.gmail.com> |
Henning, Sorry for the lack of response. JUnit is maintained by volunteers, and sometimes our day jobs get busy. I was waiting for David to respond (I am a sometimes contributor) but here are my thoughts. This is an interesting idea. Note that you could get what you want with a custom runner. My concern with adding Rules via system properties that someone running the tests in their IDE would see different results compared to the test runs from Maven. Sure, you could tell your IDE to run the tests with the same system properties, but it would be unexpected for most people to have to take a special step to make the tests run the same way as they did in the continuous build. Could you find some way to define the global rules via code? Perhaps you could add a DynamicRule to all of your tests that could apply the addition rules. Alternatively, you could have a class in the same package as the tests that defined the global rules for tests in that package (though I'm not sure there is a platform-independent way to scan all of the classes in a package that works for all runtime/deployment environments) -- Kevin On Mon, Apr 29, 2013 at 7:09 AM, Henning Groß <[email protected]>wrote: > ** > > > Hi! > I have a use-case where I need to enable rules based on external > parameters. Therefore I cannot activate them in code. I have submitted a > pull request: > > https://github.com/junit-team/junit/pull/668/files > > There are some little things to fix but its an easy and functional > extension. Anyone mind to fix the code to a state that will get merged? I > did not get any feedback until now. Whole team in holidays? > > Also I am wondering when 4.12 will be released. Any plans? > > Regards and thank you! > Henning. > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/junit/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/