开发者

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

Specifically, for a Scalatra project, but the question probably applies to most.

For example, I typically want to run:

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

I want to run different subsets of these by context - i.e. after a simple code change I开发者_StackOverflow中文版 might just run the first three; before checking in I might want to run a bigger set, and the Continuous Integration server might have a "fast" and a "slow" build that have even bigger sets.

The basic sbt docs seem to assume a single "test" target - is there a recommended way to implement multiple test phases like this?


You may want to look at this blog 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, though, you will probably want to add a new action for each of your testing steps, in order to get the particular events you want to happen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜