rules_jvm
rules_jvm copied to clipboard
Allow configuring engine filters
This commit introduces include_engines and exclude_engines arguments
on java_test_suite and java_junit5_test which can be used to
configure which engines should be used. It replaces the previously
hard-coded list of engines in ActualRunner.
For context: this allows running test with arbitrary test engines, e.g. jqwik.
I wonder if there's a way to detect the engines that are available without us needing to list them?
Apparently there is, and all we need to do is to use the ServiceLoader. I've created #111 to do this.
Do you still want to be able to set these properties? I think we can probably control the engines by changing the dependencies of a test rule....
#111 is totally unnecessary. There's no need to set an include filter unless you want to be explicit about which engines from the runtime classpath to include (or exclude). There are use cases where an engine is on the classpath but it should only be used as a library etc. For those it's useful to be able to set include/exclude filters explicitly.
I think #111 should be reverted and this PR should be merged instead. Please let me know if you want me to elaborate more.
@shs96c No worries and thanks for the detailed feedback! I've addressed all your feedback, merged in main, and added documentation. If you decide to merge the PR, please squash all commits. PTAL!