Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] surefire exclude include java versus classfiles

I'm currently investigate how to better integrate test into eclipse-plugin packaging and need to distinguisch between "plain" tests and "integration" test.

One ovious way would be to use specific include/eclude patterns but reading the docs and code I'm now completely confused WHAT is actually filtered.

The maven-surefire states [1] that the defaults are something like

**/Test*.java

an there is also a <testSourceDirectory>

so one would assume that the filtering is done based on the java SOURCES, but from my experience with maven-surefire it more or less uses the compiled class files instead (e.g. testSourceDirectory pointing to a non exiting directory, tests are still run). On other plcaes in the docs there are examples that uses .class for filtering.

To make things completely confusing the <excludes> states that it filters on class files

> This directory is declared by the parameter testClassesDirectory

but mentioned right afterwards:

> ${project.build.testOutputDirectory}, typically *src/test/java*

tycho-(!)-surefire seems to use only class files for filtering.... but passing ${project.build.testOutputDirectory} (what contains compiled class files) to TestReaders that like to get a *source* directory.

to complete the confusion, tycho-surefire is running in interation.test phase what for standard maven would be maven-failfast plugin (that seem to have also no concept of seperating integration from unit tests)!

[1] https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html


Back to the top