functional tests
Devan Goodwin
dgoodwin at rm-rf.ca
Thu Feb 25 13:21:19 UTC 2010
This would clean up part of the problem preventing us from using
buildr eclipse, but I think it still leaves us with no good way to
exclude the functional tests in Eclipse though, at least as far as I
can see. If we were to isolate unit vs functional in sub-packages
beneath test/java, then we'd be in business.
I think we also still have the "remove main/resources re-add main
resources" issue. I think this is because buildr eclipse generates a
line like:
<classpathentry excluding="**/.svn/|**/CVS/" kind="src"
output="target/resources" path="src/main/resources"/>
And that output dir does not change when you modify the overall output
dir, leaving you with whatever is wrong with Eclipse/buildr that
causes it to not find persistence.xml. Once you manually remove
main/resources and re-add it, you get:
<classpathentry kind="src" path="src/main/resources"/>
At which point things start working properly again.
On Wed, Feb 24, 2010 at 6:48 PM, Jesus M. Rodriguez <jmrodri at gmail.com> wrote:
> 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
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin
>
--
Devan Goodwin <dgoodwin at rm-rf.ca>
http://rm-rf.ca
More information about the candlepin
mailing list