Skip to content

Commit 9cbdbbd

Browse files
committed
Add some examples for matching test items
1 parent 0ec39e2 commit 9cbdbbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"configuration.java.test.config.testKind.description": "Specify the targeting test framework for this test configuration. Supported values are `junit`, `testng`.",
3232
"configuration.java.test.config.filters.description": "Specify the test filters.",
3333
"configuration.java.test.config.filters.tags.description": "Specify the tags to be included or excluded. \n\nTags having `!` as the prefix will be **excluded**. \n\nNote: This setting **only** takes effect when `testKind` is set to `junit`.",
34-
"configuration.java.test.config.when.description": "Specify the when clause for matching tests by to determine if the configuration should be run with.\n\nNote: `testItem ~= /<regular-expression>/` is the only supported clause currently, where `testItem` is the fully-qualified name of a test class or method.\n\nWhen launching a test that satisfies a single configuration's when clause, it will be run with that configuration. If multiple configurations are satisfied, the user will be prompted to pick which configuration to run with.\n\nWhen launching multiple tests (e.g. for a class or package), a configuration's when clause must be satisfied for **all** tests to be considered.\n\nConfigurations that do not define a when clause will match all tests.",
34+
"configuration.java.test.config.when.description": "Specify the when clause for matching tests by to determine if the configuration should be run with.\n\nNote: `testItem ~= /<regular-expression>/` is the only supported clause currently, where `testItem` is the fully-qualified name of a test class or method. For example:\n- `testItem =~ /^com\\.company\\.package\\.test(?=\\.[A-Z])/` - a package with the name \"com.company.package.test\"\n- `testItem =~ /^com\\.company\\.package[.a-z]*(?=\\.[A-Z])/` - a package with a name starting with \"com.company.package\"\n- `testItem =~ /^[.a-z]*test[.a-z]*(?=\\.[A-Z])/` - a package with a name containing \"test\"\n- `testItem =~ /(?<=\\.)TestClass(?=#|$)/` - a class with the name \"TestClass\"\n- `testItem =~ /(?<=\\.)Test\\w*/` - a class with a name starting with \"Test\"\n- `testItem =~ /(?<=\\.)\\w*Test\\w*/` - a class with a name containing \"Test\"\n- `testItem =~ /^com\\.company\\.package\\.test\\.TestClass(?=#|$)/` - a class with the name \"TestClass\" of a package with the name \"com.company.package.test\"\n- `testItem =~ /(?<=#)testMethod$/` - a method with the name \"testMethod\"\n- `testItem =~ /(?<=#)test\\w*/` - a method with a name starting with \"test\"\n- `testItem =~ /(?<=#)\\w*test\\w*/` - a method with a name containing \"test\"\n- `testItem =~ /(?<=\\.)TestClass#testMethod$/` - a method with the name \"testMethod\" of a class with the name \"TestClass\"\n- `testItem =~ /^com\\.company\\.package\\.test\\.TestClass#testMethod$/` - a method with the name \"testMethod\" of a class with the name \"TestClass\" of a package with the name \"com.company.package.test\"\n\nWhen launching a test that satisfies a single configuration's when clause, it will be run with that configuration. If multiple configurations are satisfied, the user will be prompted to pick which configuration to run with.\n\nWhen launching multiple tests (e.g. for a class or package), a configuration's when clause must be satisfied for **all** tests to be considered.\n\nConfigurations that do not define a when clause will match all tests.",
3535
"configuration.java.test.config.javaExec.description": "The path to java executable to use. For example: `C:\\Program Files\\jdk\\bin\\java.exe`. If unset project JDK's java executable is used.",
3636
"contributes.viewsWelcome.inLightWeightMode": "No test cases are listed because the Java Language Server is currently running in [LightWeight Mode](https://aka.ms/vscode-java-lightweight). To show test cases, click on the button to switch to Standard Mode.\n[Switch to Standard Mode](command:java.server.mode.switch?%5B%22Standard%22,true%5D)",
3737
"contributes.viewsWelcome.enableTests": "Click below button to configure a test framework for your project.\n[Enable Java Tests](command:_java.test.enableTests)"

0 commit comments

Comments
 (0)