Richard Searle's Blog

Thoughts about software

Parallel tests in sbt and specs

Posted by eggsearle on October 16, 2011

Both specs and sbt 0.11 by default run tests in parallel.

In general, this is a good idea. It utilizes the resources of modern multicore systems and helps to flush out inadvertent multithreading defects.

It is a really bad idea when the tests were not written to be thread safe!

Two separate and a little obscure configuration changes are required.

In the build.sbt add:

parallelExecution in Test := false

With in the specification, add a sequential entry. For example:

class Test extends Specification {



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: