| Issue 14: | SpringJUnit4ClassRunner | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi, I reopen this issue. We need to have a Tumbler runner that extends SpringJUnit4ClassRunner, in order to wire the tests up with spring beans. As you specified in https://code.google.com/p/tumbler-glass/wiki/IntroductionForDevelopers (paragraph "Running Tumbler stories together with Spring"), there's a trick which should do it. BUT It doesn't look good to me. I think (I have to check it, though) that the spring context is then loaded before every test method run, which is not always good (like in the case of @DirtiesContext). I believe that a new runner should be created, which subclasses SpringJUnit4ClassRunner.
Jun 15, 2011
Project Member
#1
lipinski...@gmail.com
Status:
Accepted
Jun 15, 2011
Implemented (you can check it in the sources if you need it urgently). Will be released with the upcoming release.
Status:
Fixed
Jun 15, 2011
Great!! I had a quick look at the code. One question: is the SpringTumblerRunner supporting also JUnit annotations? With SpringJUnit4ClassRunner I am often using @Before @After @BeforeClass and @Ignore - the latter is not that useful with @Scenario(pending = false), though. I believe these annotations should be supported by SpringTumblerRunner as well.
Jun 15, 2011
yep, everything should work, including @Before, rules and everything else. Some specific Spring annotations will not (e.g. @Timed), but most will (like DirtiesContext) |