Executing global teardown after all tests are completed

75 views
Skip to first unread message

Cabbar Duzayak

unread,
Sep 1, 2013, 12:23:14 PM9/1/13
to simple-b...@googlegroups.com
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.

Emre Çelikten

unread,
Sep 10, 2013, 5:45:29 AM9/10/13
to simple-b...@googlegroups.com
I am interested in this, too.

Best,

Emre

Jeff May

unread,
Mar 23, 2014, 3:21:28 PM3/23/14
to simple-b...@googlegroups.com
Yea, I would like to know how this would work as well.

If tests are running in parallel, is there any way to cleanup after all tests have finished?
Reply all
Reply to author
Forward
0 new messages