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

OSGi capability namespace for TestEngines #2100

Closed
kriegfrj opened this issue Nov 15, 2019 · 1 comment
Closed

OSGi capability namespace for TestEngines #2100

kriegfrj opened this issue Nov 15, 2019 · 1 comment
Milestone

Comments

@kriegfrj
Copy link
Contributor

Pending the resolution of #2095:

I would also like to see us leverage the OSGi capability mechanism in some way to define dependency relationships between test bundles and test engine bundles. That way, the resolver can help with making sure that the correct engines are included in the set of run bundles. For example, the test engine bundle could declare something like this:

Provide-Capability: org.junit.platform.engine;
    org.junit.platform.engine.id='junit-jupiter;version="[5.5.1]"' # By convention, make this == TestEngine.getId()
    version=5.5.1

...then the test bundle can declare its dependency on a particular versions of particular engines by (eg) the following:

Require-Capability: org.junit.platform.engine;
   org.junit.platform.engine.id='junit-jupiter;version="[5.5,6)",junit-vintage;version=4.12,org.myorg.my-test-engine;version=1.0'

Now the resolver will be able to ensure that the test bundles are paired with the correct versions of the correct test engines. The syntax might need a bit of tweaking (I'm not an expert in this area), but hopefully the idea makes sense.

Deliverables

  • A specification for the capability namespace for test engine implementations.
  • Add the appropriate Provide-Capability metadata to the junit-jupiter-engine and junit-vintage-engine OSGi manifests.
@marcphilipp
Copy link
Member

Team decision: We're okay with adding the metadata.

@marcphilipp marcphilipp modified the milestones: General Backlog, 5.8 M2 Apr 23, 2021
runningcode pushed a commit to runningcode/junit5 that referenced this issue Feb 15, 2023
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 a pull request may close this issue.

2 participants