Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for launching OSGi Tests #1620

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Feb 16, 2025

Currently PDE supports running a JUnit Plug-in Test, but this is tightly
coupled to PDE and Eclipse Applications. On the other hand PDE offers to
launch plain OSGi Frameworks but something similar for tests is missing.

This adds a new launch type "OSGi Test" that offers such type of tests
that are not tied to PDE/Eclipse but targeting generic OSGi
applications, this is very similar to what Tycho offers as
'tycho-surefire-plugin:bnd-test' and will also allow better interfacing
with the OSGi Test framework.

See

Requires:

Similar to what we have for OSGi annotations, PDE should have OSGi
Testing Support as it is a great library for testing OSGi applications.
The most hindering thing in this regard is that it is rater complex to
setup until one can make the first steps.

This now adds a new classpath contributor that detects if a PDE project
is already using JUNIT classpath container and then adds OSGi test
dependencies automatically as test dependencies if they are part of the
target platform or alternatively from the running platform.

See eclipse-pde#877
Copy link

github-actions bot commented Feb 16, 2025

Test Results

 42 files  + 42   42 suites  +42   19s ⏱️ +19s
 50 tests + 50   50 ✅ + 50  0 💤 ±0  0 ❌ ±0 
216 runs  +216  216 ✅ +216  0 💤 ±0  0 ❌ ±0 

Results for commit 0c33ce1. ± Comparison against base commit 515f996.

♻️ This comment has been updated with latest results.

@laeubi laeubi force-pushed the osgi_test branch 4 times, most recently from cb97965 to c54bc70 Compare February 21, 2025 04:41
Currently PDE supports running a JUnit Plug-in Test, but this is tightly
coupled to PDE and Eclipse Applications. On the other hand PDE offers to
launch plain OSGi Frameworks but something similar for tests is missing.

This adds a new launch type "OSGi Test" that offers such type of tests
that are not tied to PDE/Eclipse but targeting generic OSGi
applications, this is very similar to what Tycho offers as
'tycho-surefire-plugin:bnd-test' and will also allow better interfacing
with the OSGi Test framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant