I'm trying to cover a huge Spring Boot application with integration tests. There are lots of Spring's beans within the app. It takes a while to up Spring context.
So I'm wondering - does Spring clever enough to share the same context between multiple itegration tests located in different classes? I mean avoiding initialize heavy-weight context on each test class. What happens when tests 1,2,4 use TestContextOne
and tests 3,5 use TestContextTwo
? Does Spring launch them in 1,2,4,3,5 order? Or Spring keeps two contexts in memory?
P.S. In other words, the common practice is to use single "full" Spring Context for all integration tests, instead of writing separate one for each test, right?
Aucun commentaire:
Enregistrer un commentaire