Skip to content

Commit

Permalink
Improve grouped test modules READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Aug 5, 2021
1 parent 20d7771 commit d2ab279
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ While it is important to test them in isolation, running each separately takes q
In such cases, it may make sense to create a "grouped" module that unifies (using some tooling) several isolated tests.
The grouped module may then be preferred in a CI job that validates pull requests, while the isolated tests are run only once a day.

=== How grouping works

* The isolated test modules are located under `https://github.com/apache/camel-quarkus/tree/main/integration-test-groups[integration-test-groups]` directory of the source tree.
* For each subdirectory of `integration-test-groups` there is a grouped test module under `integration-tests`.
E.g. for `https://github.com/apache/camel-quarkus/tree/main/integration-test-groups/azure[integration-test-groups/azure]` there is `https://github.com/apache/camel-quarkus/tree/main/integration-tests/azure-grouped[integration-tests/azure-grouped]`.
* Grouped modules dynamically pull all sources from their associated isolated test modules to their `target/[test-]classes` directories respectively.
* `application.properties` files and service descriptors are concatenated using a Groovy script.
* The dependencies in the grouped `pom.xml` need to be updated manually via `mvn process-resources -Pformat -N`.

== Coverage

When porting a Camel component to Quarkus, we generally do not want to duplicate all the fine grained tests that are often available in Camel already.
Expand Down
14 changes: 1 addition & 13 deletions integration-tests/aws2-grouped/README.adoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
== AWS 2 grouped integration tests

This module allows executing all tests from `integration-test-groups/aws2/*` grouped together.

While grouping brings the benefit of faster native compilation
(compared to the sum of compilation times of all modules under `integration-test-groups/aws2/*`)
it is methodologically not as clean as running those tests in isolation.
Hence, this module is intended to be run instead of the tests under `integration-test-groups/aws2/*`
if, in the given situation, the speed matters more than isolation.

=== How the grouping works

* The grouped module dynamically pulls all sources from the individual AWS test modules to its
* `target/[test-]classes` directories.
* `application.properties` files and service descriptors are concatenated using a Groovy script.
* The dependencies in the grouped `pom.xml` can be updated via `mvn process-resources -Pformat -N`.
See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
=== Mock backend vs. real service
Expand Down
18 changes: 1 addition & 17 deletions integration-tests/azure-grouped/README.adoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
== Azure grouped integration tests

This module allows executing all tests from `integration-test-groups/azure/*` grouped together.

While grouping brings the benefit of faster native compilation
(compared to the sum of compilation times of all modules under `integration-test-groups/azure/*`)
it is methodologically not as clean as running those tests in isolation.
Hence, this module is intended to be run instead of the tests under `integration-test-groups/azure/*`
if, in the given situation, the speed matters more than isolation.

=== How the grouping works

* The grouped module dynamically pulls all sources from the individual AWS test modules to its
* `target/[test-]classes` directories.
* `application.properties` files and service descriptors are concatenated using a Groovy script.
* The dependencies in the grouped `pom.xml` can be updated via `mvn process-resources -Pformat -N`.

=== Mock backend vs. real service

Please refer to link:../../integration-tests-azure/README.adoc[integration-test-groups/azure/README.adoc] for more details.
See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
22 changes: 3 additions & 19 deletions integration-tests/foundation-grouped/README.adoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
== AWS 2 grouped integration tests
== Grouped foundation tests

This module allows executing all tests from `integration-test-groups/aws2/*` grouped together.

While grouping brings the benefit of faster native compilation
(compared to the sum of compilation times of all modules under `integration-test-groups/aws2/*`)
it is methodologically not as clean as running those tests in isolation.
Hence, this module is intended to be run instead of the tests under `integration-test-groups/aws2/*`
if, in the given situation, the speed matters more than isolation.

=== How the grouping works

* The grouped module dynamically pulls all sources from the individual AWS test modules to its
* `target/[test-]classes` directories.
* `application.properties` files and service descriptors are concatenated using a Groovy script.
* The dependencies in the grouped `pom.xml` can be updated via `mvn process-resources -Pformat -N`.

=== Mock backend vs. real service

Please refer to link:../../integration-test-groups/aws2/README.adoc[integration-test-groups/aws2/README.adoc] for more details.
This module allows executing all tests from `integration-test-groups/foundation/*` grouped together.
See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.

0 comments on commit d2ab279

Please sign in to comment.