...
How to run a single test?
...
Example command (run from
beam
root):Code Block ./gradlew :examples:java:test --tests org.apache.beam.examples.subprocess.ExampleEchoPipelineTest --info
To break that line down a bit:
./gradlew
- the Gradle wrapper that runs your code. It lives in the
beam
root, so wherever you run your command from, this path needs to point there.
- the Gradle wrapper that runs your code. It lives in the
:examples:java:test
- Everything before the last colon is the path from the project root to the root of the subproject the test is in (this directory will contain a
build.gradle
file) - The last word after the colon will always be
test
because it isn't a directory name, but the name of the Gradle task you're asking the wrapper to perform
- Everything before the last colon is the path from the project root to the root of the subproject the test is in (this directory will contain a
--tests
- this is the option that lets you declare which specific test(s) (or test suite(s)) to run, typically using their path(s) from the
src/test/java
folder of the subproject
- this is the option that lets you declare which specific test(s) (or test suite(s)) to run, typically using their path(s) from the
--info
(optional)- sets the log level to info
- For more information see the documentation below on:
How to run Java Dataflow Hello World
pipeline with compiled Dataflow Java worker.
...