You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Seelmann (JIRA)" <ji...@apache.org> on 2015/03/28 19:33:52 UTC

[jira] [Commented] (DIRSTUDIO-1021) Enable tests

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14385459#comment-14385459 ] 

Stefan Seelmann commented on DIRSTUDIO-1021:
--------------------------------------------

The default Eclipse and also Tycho way for tests it to have separate bundles or fragments. See https://wiki.eclipse.org/Tycho/Packaging_Types#eclipse-test-plugin . Such tests are also not executed in Maven's test phase but integration-test phase and startup an OSGi environment.

This blog https://resheim.net/2014/12/unit-testing-eclipse-rcp-applications.html shows a way that allows to have unit tests in traditional Maven way. It works fine when building from command line, all tests are executed. But if one wants to edit and run them within Eclipse two manual steps per bundle are required (add src/test/java to source folders and add JUnit to build path).

As we currently only have 21! unit test classes I'd recommend to try the 2nd approach for them, otherwise we'd need to 8 additional test projects.

For integration tests (SWTBot) of course we need to create proper test bundles, I'll try to do that.

Thoughts?

> Enable tests
> ------------
>
>                 Key: DIRSTUDIO-1021
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1021
>             Project: Directory Studio
>          Issue Type: Sub-task
>            Reporter: Stefan Seelmann
>             Fix For: 2.0.0-M9
>
>
> Unit test need to be moved to separate test bundles/fragments with packaging type eclipse-test-plugin, see http://wiki.eclipse.org/Tycho/Packaging_Types#eclipse-test-plugin.
> It would also be nice to reactivate the SWTBot tests, but that can be done later.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)