Although a plug-in's code-based tests (those under src/test/java
) will be run automatically as part of a Maven build, very often it is necessary to test them in a running Eclipse application. The previous chapter covered creating automated UI tests; now they will be run as part of the automated build.
Move the
com.packtpub.e4.junit.plugin
project underneath thecom.packtpub.e4.parent
project.Add the line
<module>com.packtpub.e4.junit.plugin</module>
to the parentpom.xml
file.Copy the
pom.xml
file from thecom.packtpub.e4.clock.ui
plug-in to thecom.packtpub.e4.junit.plugin
project.Modify the packaging type to
<packaging>eclipse-test-plugin</packaging>
.Change the
artifactId
tocom.packtpub.e4.junit.plugin
To run the Tycho tests, add the following as a build plugin:
<build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <groupId>org.eclipse.tycho</groupId> ...