From 41553582143fe13b0d711ca7a9d2ce5e81d70083 Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Tue, 2 Feb 2021 17:08:49 +0900 Subject: [PATCH 1/2] add docs for maven --- docs/SUMMARY.md | 1 + docs/getting-started.md | 2 ++ docs/integrations/README.md | 1 + docs/integrations/maven.md | 30 ++++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 docs/integrations/maven.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index a58bddbf3..ac9bffae7 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -9,6 +9,7 @@ * [GoogleTest \(C++\)](integrations/googletest.md) * [Go Test](integrations/go-test.md) * [Gradle](integrations/gradle.md) + * [Maven](integrations/maven.md) * [Minitest \(Ruby\)](integrations/minitest.md) * [Nose \(Python\)](integrations/nose-python.md) * [Generic file based test runner](integrations/file.md) diff --git a/docs/getting-started.md b/docs/getting-started.md index 6bada700e..b065296b6 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -202,6 +202,7 @@ Then, after tests run, you send test reports to Launchable. How you do this depe * [GoogleTest](integrations/googletest.md#recording-test-results) * [Go Test](integrations/go-test.md#recording-test-results) * [Gradle](integrations/gradle.md#recording-test-results) +* [Maven](integrations/maven.md) * [Minitest](integrations/minitest.md#recording-test-results) * [Nose](integrations/nose-python.md) @@ -225,6 +226,7 @@ See the following sections for how to fill the `...(test runner specific part).. * [GoogleTest](integrations/googletest.md#subsetting-test-execution) * [Go Test](integrations/go-test.md#subsetting-test-execution) * [Gradle](integrations/gradle.md#subsetting-test-execution) +* [Maven](integrations/maven.md) * [Minitest](integrations/minitest.md#subsetting-test-execution) * [Nose](integrations/nose-python.md#subsetting-test-execution) diff --git a/docs/integrations/README.md b/docs/integrations/README.md index b9b23356b..82f61a719 100644 --- a/docs/integrations/README.md +++ b/docs/integrations/README.md @@ -5,6 +5,7 @@ * [GoogleTest \(C++\)](googletest.md) * [Go Test](go-test.md) * [Gradle](gradle.md) +* [Maven](integrations/maven.md) * [Minitest \(Ruby\)](minitest.md) * [Nose \(Python\)](nose-python.md) diff --git a/docs/integrations/maven.md b/docs/integrations/maven.md new file mode 100644 index 000000000..83fff4f41 --- /dev/null +++ b/docs/integrations/maven.md @@ -0,0 +1,30 @@ +# Maven + +## Recording test results + +Apache Maven is a software project management and comprehension tool. See [Maven – Welcome to Apache Maven](https://maven.apache.org/) + +After running tests, point to the directory that contains all the generated test report XML files. You can specify multiple directories, for example if you do multi-project build: + +```bash +# run the tests however you normally do, then produce a JUnit XML file +maven tests + +launchable record tests --build maven ./target/surefire-reports/ +``` + +For more information and advanced options, run `launchable record tests maven --help` + +## Subsetting test execution + +To select a meaningful subset of tests, then feed that into Launchable CLI: + +```bash +launchable subset --build project1/src/test/java project2/src/test/java > launchable-subset.txt +``` + +The file will contain the subset of tests that should be run. You can now invoke your test executable to run exactly those tests: + +```bash +maven test -Dsurefire.includeFiles=launchable-subset.txt +``` From a3c8ff871653dd0b01bb463a07f5c37639d67df6 Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 3 Feb 2021 14:04:43 +0900 Subject: [PATCH 2/2] fix document for maven --- docs/integrations/maven.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/maven.md b/docs/integrations/maven.md index 83fff4f41..17f2b6380 100644 --- a/docs/integrations/maven.md +++ b/docs/integrations/maven.md @@ -2,7 +2,7 @@ ## Recording test results -Apache Maven is a software project management and comprehension tool. See [Maven – Welcome to Apache Maven](https://maven.apache.org/) +The Surefire Plugin is default report plugin for [Apache Maven](https://maven.apache.org/) and used during the test phase of the build lifecycle to execute the unit tests of an application. See [Maven Surefire Plugin – Introduction](https://maven.apache.org/surefire/maven-surefire-plugin/) After running tests, point to the directory that contains all the generated test report XML files. You can specify multiple directories, for example if you do multi-project build: @@ -10,7 +10,7 @@ After running tests, point to the directory that contains all the generated test # run the tests however you normally do, then produce a JUnit XML file maven tests -launchable record tests --build maven ./target/surefire-reports/ +launchable record tests --build maven ./project1/target/surefire-reports/ ./project2/target/surefire-reports/ ``` For more information and advanced options, run `launchable record tests maven --help`