Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Is there a way to have src/ and test/ in the same eclipse plug-in?

Hi,

 

When it comes to the location of unit tests, there are different possibilities (this stack overflow question [1] provides a good overview).

 

Until now I have always seen unit test code in separated fragment (the “eclipse way”).

To use this approach the pom.xml of the fragment contains <packaging>eclipse-test-plugin</packaging> and everything works fine with tycho.

 

I was challenged to know if it would be possible to have the tests in the same plug-in:

myplugin

--- src

------ myplugin.package1

--------- ...java

--- test

------ myplugin.package1.test

--------- ...Test.java

--- META-INF

------ MANIFEST.MF

...

 

The advantages mentioned with this approach are:

* keeping the overview by having the source and the test code near.

* having only one maven module instead of two.

* reducing the amount of eclipse projects in the workspace.

 

 

I am well aware that this is not a standard eclipse approach.

 

Something I do not know is:

=> What would be the approach to build the plugin and run the tests in such a case?

=> Do you have some pointers of developers who experiment this approach?

 

My goal is not to end up by doing a pom-first approach, but to understand what is currently missing (tycho, eclipse…) in order to have the test folder in the same plug-in.

 

Thanks in advance,

 

Jérémie

 

[1] http://stackoverflow.com/questions/12372730/osgi-unit-testing-and-bundle-exports

 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top