Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho + source folder containing tests

Currently there are two opportunities:

- import it in your bundle with resolution := optional
- add it manually to the classpath and use dynamic-import-package

probably "automated-managed-dependecies" would be a third option but I never used it. I also don't see a reason why this can't be enhanced by something like "automated-test-dependencies" but I have found that first there should be a working use-case before trying to change something at platform/pde level...

For the use-case I have in mind it is even simpler:
The "embedded tests scope" is mostly usefull for non-osgi test (you have crafted your code with DI so it could be tested without special treatment aka "run-as-plugin-test") then you can simply add it to the classpath, and run it as a traditional unit-test.

Am 30.03.21 um 15:49 schrieb Andreas Sewe:
Mickael Istria wrote:
It would be interesting to let Tycho automatically build a test fragment
from the "test" source folders of the current module and make
tycho-surefire-plugin include it. But it involves tweaking a lot of
things in many mojo. The result would probably be great, but not easy to
reach IMO.

The problem with automatically creating a test fragment is test only
dependencies, i.e., stuff like

   Import-Package: org.mockito

That's certainly something you don't want in your (non-test)
MANIFEST.MF, but where would you specify it in a manifest-first build?
(A POM-first build has test-scoped dependencies for this.)

Best wishes,

Andreas


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user



Back to the top