functional tests

Jesus M. Rodriguez jmrodri at gmail.com
Wed Feb 24 22:48:43 UTC 2010


I investigated trying to get buildr to generate the .classpath
correctly given we moved
long running tests to src/functionaltest/java. buildr gets the src
directories from the
ones defined by the compile task which defaults to src/main/java and
the test task
which is src/test/java.

buildr has the notion of integration tests as well as unit tests. You
can also include/exclude
based on class name or package.

So we could put all functional tests back in the src/test/java tree under the
org.fedoraproject.candlepin.functional package name (or something unique enough
to allow exclusion)

Then we could add this to the buildfile: http://pastie.org/841381
And change the test to exclude that package.

Ok if we do this how do I use this stuff? quite easily, to run unit tests we do

buildr test

to run integration tests we do, you guessed it

buildr integration

This will do a few things:

1) .classpath will not need to know about src/functionaltest/java,
therefore work again
2) functionaltests will not slow down normal unit test runs
3) we still get the ability to have long integration tests available
and can run them separately.

What does this NOT fix? I still haven't figured out how to get buildr
to use something like target-eclipse for
outputing .classpath instead of target/classes. I think there is a way
it just wasn't obvious.

jesus



More information about the candlepin mailing list