This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit 77c5c4a76ac3667216462c8615a4352b0039d00c
Author: Alex Filatov <alex-fila...@users.noreply.github.com>
AuthorDate: Wed Aug 9 12:53:01 2017 +0300

    [BEAM-2335] Document how to run NeedsRunner tests.
---
 src/contribute/testing.md | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/contribute/testing.md b/src/contribute/testing.md
index 9614f24..d86c2dd 100644
--- a/src/contribute/testing.md
+++ b/src/contribute/testing.md
@@ -302,6 +302,37 @@ importance of testing, Beam has a robust set of unit 
tests, as well as testing
 coverage measurement tools, which protect the codebase from simple to moderate
 breakages. Beam Java unit tests are written in JUnit.
 
+#### How to run NeedsRunner tests
+
+NeedsRunner is a category of tests that require a Beam runner. Subset of these
+tests cannot be executed while building their corresponding modules because 
all 
+runners depend on these modules (e.g. `sdks/java/core`) to be built. To break 
+the circular dependency, these tests are executed after the Direct Runner is 
+built.
+
+To run this subset of the NeedsRunner tests (requires Maven 3.3.1+): 
+
+```
+$ mvn -pl runners/direct-java -am install -DskipTests
+$ mvn -pl runners/direct-java surefire:test@validates-runner-tests
+```
+
+To run a single NeedsRunner test use the `test` property, e.g.
+
+```
+$ mvn -pl runners/direct-java surefire:test@validates-runner-tests 
-Dtest=MapElementsTest#testMapBasic
+```
+
+will run single `MapElementsTest.testMapBasic()` test.
+
+
+NeedsRunner tests in modules that are not required to build runners (e.g. 
+`sdks/java/io/jdbc`) can be executed with the `mvn test` command:
+
+```
+mvn -pl sdks/java/io/jdbc test -Dgroups=org.apache.beam.sdk.testing.NeedsRunner
+```
+
 ### ValidatesRunner
 
 ValidatesRunner tests contain components of both component and end-to-end

-- 
To stop receiving notification emails like this one, please contact
"commits@beam.apache.org" <commits@beam.apache.org>.

Reply via email to