|
Re: The Third State of your Binary JUnit Tests
|
Posted: Apr 24, 2003 8:31 AM
|
|
Vladimir, I'm curious why you chose to let users mark tests to be ignored by terminating the test method name with _ignored . Wouldn't it be better to have something at the front of the method, like ignoreTestSomething or skipTestSomething , so that the method would also not be executed if a different runner is used?
I am asking this questions because I would consider adding such a feature to SuiteRunner, but I want to make sure it is worth it to users, because every feature adds complexity as well as utility. The utility has to be worth the complexity.
Also, if I were to support this feature in SuiteRunner, I'd rather do it in a way that's compatible with JUnit Add-Ons, so that users could switch back and forth between our runners easily. But if I use _ignored , then they can't easily switch between our runners and the standard JUnit ones. That's vendor lock-in, in a way, which I would like to avoid.
Another potential way to let users mark tests as to be ignored or skipped is to provide a TestSkippedException, and have them throw that. By doing it this way, the test would actually fail when executed via generic JUnit runners (the runners that come with JUnit, the ones that are built into IDEs, etc.). That's probably not what users want, but maybe it is what users want. That's the behavior that you provide right now with your approach of having users append _ignored to the end of the method name. In the generic JUnit runners, those _ignored methods would be executed and the tests would generally fail.
The alternative, which would be provided by a front of method name marker, like skipTestSomething would be for the regular JUnit runners to silently ignore the test. I suspect that's probably closer to what the user wants. What do you think?
|
|