I'd like to extract the core functionality from the tester-plugin into a standalone module living on "central". This new module could be used by any framework, including pro, that needs to launch the JUnit Platform in a modular testing environment.
Types to be extracted
From package: https://github.com/forax/pro/blob/master/plugins/tester/src/main/java/com.github.forax.pro.plugin.tester/com/github/forax/pro/plugin/tester/
TestConf.java -- holding the test setup configuration fixture ... story
TesterRunner.java -- launching the test run for a given instance of TestConf
- parts of
TesterPlugin.java -- doing bootstrap work creating module layer, class loaders, etc... like:
|
var moduleDescriptor = moduleReference.descriptor(); |
|
var moduleName = moduleDescriptor.name(); |
|
var testPath = Paths.get(moduleReference.location().get()); |
|
var loader = createTestClassLoader(tester, testPath, moduleName); |
|
|
|
var testConfClass = load(loader, TestConf.class); |
|
var testConfTypes = new Class<?>[] {ModuleDescriptor.class, boolean.class, List.class, List.class}; |
|
var parallel = tester.parallel(); |
|
var includeTags = tester.includeTags().orElse(List.of()); |
|
var excludeTags = tester.excludeTags().orElse(List.of()); |
|
var testConf = create(testConfClass, testConfTypes, moduleDescriptor, parallel, includeTags, excludeTags); |
|
|
|
var runnerClass = load(loader, TesterRunner.class); |
|
var runnerTypes = new Class<?>[] {testConfClass}; |
|
var runner = (IntSupplier) create(runnerClass, runnerTypes, testConf); |
What do you think, @forax?
I'd like to extract the core functionality from the tester-plugin into a standalone module living on "central". This new module could be used by any framework, including pro, that needs to launch the JUnit Platform in a modular testing environment.
Types to be extracted
From package: https://github.com/forax/pro/blob/master/plugins/tester/src/main/java/com.github.forax.pro.plugin.tester/com/github/forax/pro/plugin/tester/
TestConf.java-- holding the test setup configuration fixture ... storyTesterRunner.java-- launching the test run for a given instance ofTestConfTesterPlugin.java-- doing bootstrap work creating module layer, class loaders, etc... like:pro/plugins/tester/src/main/java/com.github.forax.pro.plugin.tester/com/github/forax/pro/plugin/tester/TesterPlugin.java
Lines 86 to 100 in cae819e
What do you think, @forax?