How to set up a multi-stage test pipeline in sbt?

In particular, for the Scalatra project, but the question is probably applicable to most.

For example, I usually want to run:

  • unit tests
  • code quality checks (coverage, duplication, complexity, jsLint!)
  • integration tests (not too much!)
  • acceptance tests (usually a subset of "pre-checkin")
  • regression tests (basically the same as acceptance tests, but larger)
  • performance tests

I want to run different subsets of them in context - i.e. after a simple code change, I could just run the first three; before checking, I might want to run a large set, and the continuous integration server may have a β€œfast” and β€œslow” build with even larger sets.

The sbt core docs seem to imply a single target β€œtest” - is there a recommended way to implement several testing steps, such as?

+7
source share
1 answer

You can look at this blog post about using integrated testing with SBT and Hudson:

http://henkelmann.eu/2010/11/14/sbt_hudson_with_test_integration

Then, to add your own actions, you can use this page:

http://code.google.com/p/simple-build-tool/wiki/CustomActions

Basically, you probably want to add a new action for each of the testing steps to get specific events that you want to complete.

+1
source

All Articles