Hi all,
We are using SBT with Play Framework and Specs2 for testing. And, we are starting a chrome driver + our server at the very beginning of our tests (before running any test), and we would like to shutdown these gracefully within the same JVM when all tests (all Specs2 classes and fragments) are completed..
Is it possible to run a function after all spec classes are done?
I have looked at the map document of Specs2
here, but it does not have a feature where you can run something at the end of all spec classes are completed.
What I am asking can be done with Tests.Cleanup in SBT, but the problem that we are having is that Play is forking Specs2, and Tests.cleanup don't work with forks (as explained in the documentation of SBT).
Is there any way I can do this within the same JVM that Specs2 is running?
Thanks.