Running SWTBot tests as part of your maven/tycho build cycle is rather
well documented and pretty straight forward (see for example the sonatype docs). Doing so with a WindowTester Pro recorded test is
not – but then again it is pretty straigt forward as well.
There are just two things that you need to change from the SWTBot tests
pom.xml (as presented in the sonatype docs):
have useUIThread = true
add a dependecy to com.windowtester.runtime.feature.group to pull
in platform specific plugins
When I first started running my Tycho/Maven build of my visual editor in
Jenkins the build would always fail if a single test failed. That was
mainly because the Maven build would run the surefire test automatically
but cancel the build if there were any failures in them. In turn, this
would not keep artifacts from being generated and thus not create a new
snapshot release. To make matters worse, my tests are not that stable
yet – running them on Linux sometimes fails for no reason whatsoever,
leading to yet another broken build.
Now, this is obviously not what you (or Jenkins, for that matter) would
expect to happen. What I wanted and what I guess you would normally want
is for the build to pass but for Jenkins to mark the build as
To acomplish this on the command line, you simply need to tell Maven to
ignore test failures
I’ll push to Jenkins now and see if the continous build and test also
works there. Cross your fingers.
The one thing that is bugging me is an oddness with my target platform
defintion that for some reason doesn’t want to resolve
org.apache.batik.* properly – once I switch target to the development
platform everything works as expected. But I will figure that one out
More on the culprits and solutions I have to follow shortly.