Skip to content

Commit 95cef6d

Browse files
opensearch-trigger-bot[bot]github-actions[bot]reta
authored
Adjusting TESTING.md for a single test run (#14441) (#14490)
* Adjusting TESTING.md for a single test run * Adjusting TESTING.md for a single test run * Update TESTING.md * Adjusting TESTING.md for a single test run * Adjusting TESTING.md for a single test run --------- (cherry picked from commit 3106ea5) Signed-off-by: Daniil Roman <daniilroman.cv@gmail.com> Signed-off-by: Daniil Roman <danroman17397@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
1 parent 08bcf43 commit 95cef6d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

TESTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,23 @@ This will instruct all JVMs (including any that run cli tools such as creating t
9090

9191
## Test case filtering
9292

93-
- `tests.class` is a class-filtering shell-like glob pattern
94-
- `tests.method` is a method-filtering glob pattern.
93+
To be able to run a single test you need to specify the module where you're running the tests from.
94+
95+
Example: `./gradlew server:test --tests "*.ReplicaShardBatchAllocatorTests.testNoAsyncFetchData"`
9596

9697
Run a single test case (variants)
9798

98-
./gradlew test -Dtests.class=org.opensearch.package.ClassName
99-
./gradlew test "-Dtests.class=*.ClassName"
99+
./gradlew module:test --tests org.opensearch.package.ClassName
100+
./gradlew module:test --tests org.opensearch.package.ClassName.testName
101+
./gradlew module:test --tests "*.ClassName"
100102

101103
Run all tests in a package and its sub-packages
102104

103-
./gradlew test "-Dtests.class=org.opensearch.package.*"
105+
./gradlew module:test --tests "org.opensearch.package.*"
104106

105107
Run any test methods that contain *esi* (e.g.: .r*esi*ze.)
106108

107-
./gradlew test "-Dtests.method=*esi*"
109+
./gradlew module:test --tests "*esi*"
108110

109111
Run all tests that are waiting for a bugfix (disabled by default)
110112

0 commit comments

Comments
 (0)