RFR: 7903930: Support running individual parameterized tests and @Nested test classes [v9]
Jorn Vernee
jvernee at openjdk.org
Mon Jan 20 17:58:09 UTC 2025
> See the JBS issue for an extended problem description.
>
> This PR adds support for running individual parameterized JUnit test methods, as well as nested test classes, by adding a new flavor of query string, prefixed with `junit-select`:
>
>
> junit-select:<selector>
>
>
> This intends to take direct advantage of JUnits selector string support. The supported selectors are listed in the column on the right in the table here: https://junit.org/junit5/docs/current/user-guide/#running-tests-discovery-selectors
>
> For example, running a method `foo` that takes no parameters could be done using `foo`, just like before. If `foo` has parameters, then for JUnit tests they have to be specified as a comma separated list of binary names. For that we can use the `method` selector. For example:
>
>
> junit-select:method:TestDowncallScope#testDowncall(int,java.lang.String,CallGeneratorHelper$Ret,java.util.List,java.util.List)
>
>
> This support is intended to be used by the intellij plugin to support running individual methods and nested classes (see https://github.com/openjdk/jtreg/pull/240).
>
> Testing: I've added additional tests for the new cases. I've also been using a PoC of this feature as the basis for similar support in the intellij plugin that I'm working on.
Jorn Vernee has updated the pull request incrementally with two additional commits since the last revision:
- fix typo
- update FAQ to link to JUnit doc
-------------
Changes:
- all: https://git.openjdk.org/jtreg/pull/241/files
- new: https://git.openjdk.org/jtreg/pull/241/files/d6be9d99..a90a014a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jtreg&pr=241&range=08
- incr: https://webrevs.openjdk.org/?repo=jtreg&pr=241&range=07-08
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jtreg/pull/241.diff
Fetch: git fetch https://git.openjdk.org/jtreg.git pull/241/head:pull/241
PR: https://git.openjdk.org/jtreg/pull/241
More information about the jtreg-dev
mailing list