-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
As discussed in the discussions, we need a way to package a test suite into a jar and run it for several implementations. This is a common requirement when building Technology Compatibility Kits. There are generally three artifacts:
api
contains some interfaces and aServiceLoader
(or similar IoC mechanism) to load an implementation of the api interfaces.impl1
containing one implementation (sometimes called a reference implementationri
) of theapi
; includes theservices
files for theServiceLoader
.tck
the test suite to check that an implementation of the api is compliant.
You can run the tests in the tck
by adding a runtime
dependency on impl1
. But the tck should be usable by any other implementation as well: I want the impl1
to load the tck
-jar and run it, not the other way around. The tck
should be a library of tests that the implementations can include as a test
dependency. The dependency should be impl1→tck
not tck→impl1
.
I assume that scanning all jars for tests would result in unacceptable performance, so we probably need some way to specify the jars to scan, or even better to mark a jar to be a test-suite.
I currently need this for an open source project: https://github.com/t1/smallrye-graphql It's about the TCK in the client. But I've also built a minimal, reproducible example that may be easier to play around with: https://github.com/t1/junit-tck-mre.
Deliverables
- A mechanism to specify the jars to scan for tests
- Update to the User Manual