开发者

Where do I put my Buildr Integration tests?

I have a Java application that uses buildr. My unit test are located in : src/test/java

The buildr doco talks about supp开发者_JAVA技巧ort for integration tests but where do I put my integration tests? how to I separate them from unit tests?


Each buildr subproject can have either unit tests or integration tests. I use unit tests in each subproject that actually builds an artifact and then a separate subproject just for integration tests.


I ended up defining a subproject for the integration tests. See below:

integration_layout = Layout.new
integration_layout[:source, :test, :java] = _('src/integration/java')
define "integrate", :layout => integration_layout do
    test.with TEST_CLASSPATH
    test.using :integration
    integration.setup { Rake::Task['my_project:jetty_start'].invoke }
    integration.teardown { Rake::Task['my_project:jetty_stop'].invoke }
end

I can then run the integration tests with the following command:

buildr integration
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜