开发者

Is there a way to distribute junit tests so they all get done faster?

Our JUnits take开发者_C百科 a total of 6 hours to run. Is there an easy way to run 1/n of them on n different machines?


GridGain (a free cloud implementation) is able to distribute JUnit tests runs across a cluster of nodes. See Distributed JUnit Overview.

Just in case, this is not exactly what you're asking for but TestNG can run tests in parallel (thi would already make your build faster). See Advanced parallel testing with TestNG and data providers.

See also

  • Running JUnit in Parallel
  • Parallelizing JUnit test runs


Just off the top of my head, one option is to use TeamCity and have different build scripts that know how you want to partition the tests, and set those up as separate projects (each partition), and then set up n agents, which can be done using Amazon EC2 allowing for large values of n.

Since you probably want more than 3 agents, you would be out of their free product territory.

Some assumptions here: There is no common database that ties all of these tests together and all the tests can otherwise run independently of each other.

If there is a common database, that makes things much more complicated, as you would need a database for each agent so the tests don't step on each other (and of course farming out the computing power to EC2 would probably be impractical).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜