Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[feature idea]: Rework @RunWith(FeatureVariations.class) into a @Rule #131
I really like the testing support you've implemented in togglz, and the FeatureVariations concept is smart and elegant. It'd be nice if this could be reworked into a @rule, though, perhaps an enhancement to TogglzRule?
My main thought was that the TogglzRule#apply(...) could basically call base#evaluate() multiple times, one for each variation. The logic that works out the different variations (that I presume is part of the FeatureVariations runner) would just move to drive a loop inside of #apply().
The API would be something like:
or something like that.
Very interesting idea. I actually like JUnit rules very much and always try to prefer them over
However, if it works, I agree that implementing a rule would be awesome. Any interest in working on a prototype for this? ;)
Hi Christian, glad you like the idea. Hadn't thought about the impact to
On 9 May 2015 at 10:48, Christian Kaltepoth firstname.lastname@example.org
The RunAs mechanism basically allows to run tests multiple times in a different "environment". So if you configure 4 variations, each test will be reported (in IDEs and the resulting XML files) as 4 "virtual" tests. That's a really nice JUnit feature.
However, maybe that's possible with rules too. I don't know actually. But it is worth a try.
You will find an Eclipse code format profile in the source root. If you create a prototype, it would be great if you would use it.
To be honest, I didn't know about Apache Isis. But it looks very interesting. I'll have a look at it as soon as I find some time. It's awesome that you created a Togglz plugin for it. Thanks for that. :)