Test lifecycle and injection of dependencies using spring extension

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Test lifecycle and injection of dependencies using spring extension

Luis Trigueiros
Hi,

I would like to run a suite of potentially several tests using the spring extension but would like for the spring container to be created only once in the all suite of tests as I would like to use Spring caching facility to optimize
the running of the tests.
It looks like the spring extension will always create the spring container between the test runs, is there a way to achieve this do I need to make all my test extend a common class ?

Thank you, Oscar
 

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Test lifecycle and injection of dependencies using spring extension

Leonard Brünings
The spring extension of spock simply delegates to springs own TestContextManager, it should behave the same as a normal JUnit test that is run with the Spring runner.

On Tuesday, June 9, 2015 at 6:00:35 PM UTC+2, Luis Trigueiros wrote:
Hi,

I would like to run a suite of potentially several tests using the spring extension but would like for the spring container to be created only once in the all suite of tests as I would like to use Spring caching facility to optimize
the running of the tests.
It looks like the spring extension will always create the spring container between the test runs, is there a way to achieve this do I need to make all my test extend a common class ?

Thank you, Oscar
 

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...