class End2EndSuite extends Suites(new End2EndSpec) with DockerizedCassandra
The disadvantage with this approach is that we have to annotate the End2EndSpec with @DoNotDiscover to prevent the Spec being executed twice.
And you have remember to add the Spec to the Suites-collection.
I hope it's clear what I meant.
Any ideas?
Regards,
Florian
--
You received this message because you are subscribed to the Google
Groups "scalatest-users" group.
To post to this group, send email to scalatest-users@googlegroups.com
To unsubscribe from this group, send email to
scalatest-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/scalatest-users?hl=en
ScalaTest itself, and documentation, is available here:
http://www.artima.com/scalatest
---
You received this message because you are subscribed to the Google Groups "scalatest-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalatest-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Florian,Do you need to do something afterAll as well? If not then you can just place the initialization code in an singleton object and refer to the object from the tests in such a way that you trigger the initialization code. It will be run just once per JVM instance, and run when it is first used.If you need to run afterAll code, you may want (or you may want anyway) to look at the build tool. If you're using sbt, for example, it has a way to run some code before and after a run.What it sounds like we perhaps need is a beforeRun and afterRun feature.Bill
On Fri, Sep 16, 2016 at 7:43 AM, 'Florian Witteler' via scalatest-users <scalate...@googlegroups.com> wrote:
Hi guys!--Is there a way to somehow access the "root-suite" and override its beforeAll method?In my usecase I'd like to start a docker-container with a cassandra before all my tests run - whatever the sbt test command might be. (be it testOnly, test it:test etc.)We found a workaround in the Suites class by putting multiple Specs into one Suites-collection.class End2EndSuite extends Suites(new End2EndSpec) with DockerizedCassandra
The disadvantage with this approach is that we have to annotate the End2EndSpec with @DoNotDiscover to prevent the Spec being executed twice.And you have remember to add the Spec to the Suites-collection.
I hope it's clear what I meant.
Any ideas?
Regards,
Florian
You received this message because you are subscribed to the Google
Groups "scalatest-users" group.
To post to this group, send email to scalate...@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/scalatest-users?hl=en
ScalaTest itself, and documentation, is available here:
http://www.artima.com/scalatest
---
You received this message because you are subscribed to the Google Groups "scalatest-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalatest-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.