Enhance JUnit test run visibility for method/platform/configuration#1058
Conversation
- Refactor TeaVMTestRunner to maintain test descriptions and test results visibility across multiple platforms and configurations.
New suite/test descriptors structure:
```
TestClass(Suite)
├─ "Compile Platform+Configuration"(Tests)
└─ Method(Suites)
└─ Platform+Configuration(Tests)
```
- Introduced `JVM` as `org.jvm.junit.TestPlatform` value. It makes creating test `Descriptiors` more unified.
- Introduce visibility for compilation per platform/configuration
- remove redundant `failAllClasses`. No point for running/failing/ignoring all other tests. Just skip. Compilation failure is already enough.
- skip (even ignoring) tests that are related to TestClass, if whole class compilation fails
- If JVM test run is not skipped, but fails, all test method related tests are ignored.
- Changed `generateName` method to use `[]` instead of `()`, so it could be used also for test `Description`. `()` are already preserved for other means in test Descriptor display name. Change affects `tests.json` test name format.
|
Does this work properly in IDEA? |
|
I also mean: if I click "run" next to a certain test method or class, will this approach work? If I do this in test result? AFAIK, usually such custom things aren't supported by IDEs well |
Platform specific `TestRunStrategy` may have not been initialized/enabled. Ignore the `TestRunStrategy::cleanup` if the runner was not enabled.
A leftover from a PoC that is not actually needed
|
I digged areound a bit and found that
To be said, currently it runs all of the enabled platform tests when selecting to run a specific |

As I was trying to figure out why WASI and C platform tests failed on my Mac, I felt a crying need to visualize which method+platform+configuration exactly failed. I changed the code for myself just enough so it would make my life easier. Decided to turn this into a PR presentable enhancement.
Not sure if you plan to have another
0.12.xversion or this PR should only be introduced intomaster.Changes
Refactor TeaVMTestRunner to maintain test descriptions and test results visibility across multiple platforms and configurations.
New suite/test descriptors structure:
Introduced
JVMasorg.jvm.junit.TestPlatformvalue. It makes creating testDescriptiorsmore unified.Introduce visibility for compilation per platform/configuration
failAllClasses. No point for running/failing/ignoring all other tests. Just skip. Compilation failure is already enough.If JVM test run is not skipped, but fails, all test method related tests are ignored.
Changed
generateNamemethod to use[]instead of(), so it could be used also for testDescription.()are already preserved for other means in test Descriptor display name. Change affectstests.jsontest name format.