My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 14: SpringJUnit4ClassRunner
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jun 2011


 
Reported by al...@fastmail.net, Jun 15, 2011
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
Ok. You're right. Dirties don't work.

Status: Accepted
Jun 15, 2011
Project Member #2 lipinski...@gmail.com
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
#3 al...@fastmail.net
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
Project Member #4 lipinski...@gmail.com
yep, everything should work, including @Before, rules and everything else.
Some specific Spring annotations will not (e.g. @Timed), but most will (like DirtiesContext)

Powered by Google Project Hosting