New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for session/request scoped beans for integration testing [SPR-4588] #9265
Comments
David J. M. Karlsen commented There's also a thread on the forum related to this: http://forum.springframework.org/archive/index.php/t-40257.html . |
David J. M. Karlsen commented Did I hear a fix-version 2.5.3? ;-) |
David J. M. Karlsen commented This discussion is relevant and points on some ways to solve this: http://forum.springframework.org/showthread.php?t=27933 |
David J. M. Karlsen commented Attached is a somewhat naive approach which could be further refined. |
Stefan Scheidt commented There's a forum thread showing a solution that works with Spring TestContext and uses a custom context loader in |
Morten Andersen-Gott commented Spring Batch uses a custom TestExecutionListener to test step scoped components: http://static.springsource.org/spring-batch/reference/html-single/index.html#d0e7538 A similar approach for session and request scopes would make sense? |
Sam Brannen commented GitHub commit 21ebbb9c02 introduces This support was actually introduced as an intentional side effect of the work performed for #9917 through the addition of the new |
Dzmitry Lazerka commented Attached file has non-static |
Sam Brannen commented Dzmitry Lazerka, that's correct: the code in the Please see the Testing request and session scoped beans section of the reference manual for details. Regards, Sam |
David J. M. Karlsen opened SPR-4588 and commented
Overview
It would be very handy if Spring could provide support for
session
andrequest
scoped beans for integration testing (e.g. in the TestContext framework).Further Resources
StepScopeTestExecutionListener
Affects: 2.5.2
Attachments:
Issue Links:
Referenced from: commits a281bdb, 21ebbb9
11 votes, 12 watchers
The text was updated successfully, but these errors were encountered: