Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.
    • :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
    • --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
    • --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.

...