1

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

The buildr doco talks about support for integration tests but where do I put my integration tests? how to I separate them from unit tests?

Sam
  • 6,240
  • 4
  • 42
  • 53

2 Answers2

2

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.

Rhett Sutphin
  • 1,045
  • 8
  • 15
0

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
Sam
  • 6,240
  • 4
  • 42
  • 53