Showing posts with label surefire. Show all posts
Showing posts with label surefire. Show all posts

Tuesday, April 23, 2013

Surefire doesn't run the product/application specified

The product or application specified in configuration section of surefire are most probably on another bundle.
  1. Add the bundle as dependency to the plugin (in MANIFEST.MF) for which you have written the surefire configuration.
  2. Also add org.eclipse.equinox.ds if you have declared the product/application through extension points.

Now your test plugin should be able to access the application/product.

In case you have the extension points and tests in the same plugin/bundle you still have to do 2nd step.

Monday, April 22, 2013

stitch eclipse + swt + swtbot + junit + maven + tycho + surefire

In jist a high level view of running swtbot ui tests with maven/tycho
  1. Specify proper packaging i.e eclipse-test-plugin
  2. Specify src directory to maven build, usually it’s different in eclipse than what maven thinks
  3. Specify various parameters(memory, language, arch, ws, os, ..) correctly to vm and program
  4. Add necessary elements (UIHarness, UIThread…, application…) to tycho-surefire configuration
  5. Add all implicit dependencies of application/product as explicit to manifest file of the test plugin. Because tycho cannot resolve implicit dependencies.
  6. Add p2 repositories to pom so that target platform can be resolved into pom dependencies.
  7. Add Declarative Services library/ dependency to test plugin if it uses any declarative service to initialize application/product
All above steps assume at least mid level knowledge on maven/tycho/swtbot/eclipse/rcp and those who have tried the integration already.