Skip to content

Commit

Permalink
Adjusting TESTING.md for a single test run (#14441) (#14490)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Jun 21, 2024
1 parent 08bcf43 commit 95cef6d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,23 @@ This will instruct all JVMs (including any that run cli tools such as creating t

## Test case filtering

- `tests.class` is a class-filtering shell-like glob pattern
- `tests.method` is a method-filtering glob pattern.
To be able to run a single test you need to specify the module where you're running the tests from.

Example: `./gradlew server:test --tests "*.ReplicaShardBatchAllocatorTests.testNoAsyncFetchData"`

Run a single test case (variants)

./gradlew test -Dtests.class=org.opensearch.package.ClassName
./gradlew test "-Dtests.class=*.ClassName"
./gradlew module:test --tests org.opensearch.package.ClassName
./gradlew module:test --tests org.opensearch.package.ClassName.testName
./gradlew module:test --tests "*.ClassName"

Run all tests in a package and its sub-packages

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

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

./gradlew test "-Dtests.method=*esi*"
./gradlew module:test --tests "*esi*"

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

Expand Down

0 comments on commit 95cef6d

Please sign in to comment.