[jbosstools-dev] Eclipse plugins testing structure
Aurelien Pupier
apupier at redhat.com
Wed Jan 27 04:28:57 EST 2016
Hi,
I'm currently trying to improve test structure for Jboss Fuse Tooling
project (https://github.com/fusesource/fuseide).
On Max recommendation, I take a look at jbosstools-devdoc
https://github.com/jbosstools/jbosstools-devdoc/blob/master/source/how_to_add_a_test_plugin_or_feature.adoc
When i take a look to
https://github.com/jbosstools/jbosstools-server/blob/master/as/tests/org.jboss.tools.as.test.core/pom.xml
. This project is in tests folder but it launches tycho-surefire-plugin.
As far as I understand Tycho, it means that it is launching an OSGi
platform. From my point of view, it means that these tests are already
integration tests and the only difference between tests and itests
currently is more fast vs slow tests.
What I wanted to achieve is to have really fast unit test, so I created
a fragment and so use maven-surefire-plugin. You can see the fragment
https://github.com/fusesource/fuseide/tree/master/editor/tests/org.fusesource.ide.camel.editor.tests
and the parent pom configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<configuration>
<systemProperties>
<osgi.nls.warnings>ignore</osgi.nls.warnings>
</systemProperties>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<useUIThread>true</useUIThread>
<useUIHarness>true</useUIHarness>
<includes>
<include>**/*IT.class</include>
</includes>
<argLine>${tycho.testArgLine}
-XX:+HeapDumpOnOutOfMemoryError</argLine>
</configuration>
</plugin>
Did I misunderstood something?
Are there counterpoints to use fragments and maven-surefire-plugin?
Are there other examples which are matching more closely to my usecase
in jboss tools codebase?
Thanks by advance for your help
--
Aurelien Pupier
Senior Software Engineer in JBoss Fuse Tooling Team
@apupier
More information about the jbosstools-dev
mailing list