This repository was archived by the owner on Feb 13, 2024. It is now read-only.
-
Couldn't load subscription status.
- Fork 4
adds travis and translates to english #2
Open
WolfgangFahl
wants to merge
6
commits into
doubleSlashde:junit-4
Choose a base branch
from
BITPlan:junit-4
base: junit-4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a95df85
tries travis
WolfgangFahl 9c555ab
adds link
WolfgangFahl 2397f8a
tries upgrading jacoco plugin
WolfgangFahl d8b0cc5
adds code coverage badge
WolfgangFahl 295eec7
adds travis badge
WolfgangFahl e4281bc
translates README to english
WolfgangFahl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # this is a java project using maven | ||
| language: java | ||
| # switch off gpg handling | ||
| # switch on coverage | ||
| install: mvn clean install -D coverage -Dgpg.skip=true | ||
| # put the result on codecov.io | ||
| after_success: | ||
| - bash <(curl -s https://codecov.io/bash) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,46 @@ | ||
| # Coverage-Reports mit Maven in Multi-Modul-Projekten | ||
| see | ||
| - https://blog.doubleslash.de/code-coverage-reports-mit-maven-in-multi-modul-projekten/ | ||
| - http://wiki.bitplan.com/index.php/Jacoco_maven_multi_module_code_coverage | ||
|
|
||
| Beispielkonfiguration für die Generierung von Coverage-Reports in einem Maven-Projekt, das aus mehreren Modulen | ||
| besteht. Für Unit-Tests und Integrationstests werden Coverage-Reports erstellt, die jeweils über alle Module | ||
| aggregiert sind. | ||
| [](https://travis-ci.org/BITPlan/maven-multimodule-coverage) | ||
| [](https://codecov.io/gh/BITPlan/maven-multimodule-coverage/branch/junit-4) | ||
|
|
||
| Darüber hinaus wird ein Overall-Report erzeugt, der die Gesamt-Testabdeckung beinhaltet (Unit- und | ||
| Integrationstests zusammen). | ||
| [](http://www.bitplan.com) | ||
|
|
||
| Für die Messung der Testabdeckung wird das | ||
| [JaCoCo-Maven-Plugin](http://www.eclemma.org/jacoco/trunk/doc/maven.html) verwendet. | ||
| # Coverage-Reports with Maven in Multi-Modul-Projects | ||
|
|
||
| ## Laufzeitumgebung ## | ||
| This is an example configuration for the generation of coverage reports in a maven project consisting of | ||
| multiple modules. Coverage reports are generated for unit and integration tests which are aggregated over all modules. | ||
| aggregiert sind. | ||
|
|
||
| Erstellt und getestet wurde dieses Projekt mit folgender Laufzeitkonfiguration: | ||
| You also get an overall - report showing the total test coverage over unit and integration tests. | ||
|
|
||
| - Maven 3.5 | ||
| - JUnit 4 | ||
| To measure the test coverage the | ||
| [JaCoCo-Maven-Plugin](http://www.eclemma.org/jacoco/trunk/doc/maven.html) is used. | ||
|
|
||
| Eine Version dieses Beispiels für JUnit 5 befindet sich | ||
| [hier](https://github.com/doubleSlashde/maven-multimodule-coverage/tree/master). | ||
| ## Enviroment ## | ||
| The project was created and tested with the following environment: | ||
|
|
||
| ## Erstellung der Reports ## | ||
| - Maven 3.5 | ||
| - JUnit 4 | ||
|
|
||
| Die Reporterzeugung erfolgt automatisch während der Testausführung. Ein über alle Module aggregierter Coverage-Report | ||
| für die Unit-Tests wird beim Durchlaufen von Mavens `test`-Phase erzeugt, also z.B. beim Aufruf von `mvn test`. | ||
| Another version of this project for JUnit 5 is available in the | ||
| [master branch (german)](https://github.com/doubleSlashde/maven-multimodule-coverage/tree/master). | ||
|
|
||
| Der Report für die Integrationstests sowie der Gesamtreport werden in der `verify`-Phase generiert, also wenn | ||
| z.B. `mvn verify` ausgeführt wird. Dies gilt natürlich auch für den Aufruf von späteren Phasen, denen die Phase `verify` | ||
| vorausgeht, also z.B. für `mvn install` oder `mvn deploy`. | ||
| ## Creation of the reports ## | ||
| The reports are automatically created during the test execution. An aggregated report for all modules is | ||
| created running the Unit-Tests during maven's `test`-phase, by giving the command `mvn test`. | ||
|
|
||
| ## Ablageort der Reports ## | ||
| The reports for the integration tests and the aggregated report are created during the `verify`-Phase by e.g. starting the `mvn verify` command. This is also true for later phases after `verify` | ||
| e.g. `mvn install` or `mvn deploy`. | ||
|
|
||
| Die Coverage-Reports (HTML) werden im `site`-Ordner unterhalb von `target` des Moduls `coverage` abgelegt: | ||
| - `coverage/target/site/jacoco-aggregate-ut/index.html`: Coverage-Report der Unit-Tests | ||
| - `coverage/target/site/jacoco-aggregate-it/index.html`: Coverage-Report der Integrationtests | ||
| - `coverage/target/site/jacoco-aggregate-all/index.html`: Kumulierter Gesamtreport der Unit- und Integrationstests | ||
| ## Storagepath for Reports ## | ||
|
|
||
| ## Wichtig! ## | ||
| The Coverage-Reports (HTML) are located in the `site`-folder as a subfolder of `target` of the module `coverage`: | ||
| - `coverage/target/site/jacoco-aggregate-ut/index.html`: Coverage-Report of Unit-Tests | ||
| - `coverage/target/site/jacoco-aggregate-it/index.html`: Coverage-Report of Integrationtests | ||
| - `coverage/target/site/jacoco-aggregate-all/index.html`: Aggregated Totalreport of Unit- and Integrationstests | ||
|
|
||
| Wird dem Projekt ein neues Modul hinzugefügt, muss dieses in der `pom.xml` des `coverage`-Moduls als Dependency | ||
| hinzugefügt werden. _Ansonsten wird die Testabdeckung des neuen Moduls in den aggregierten Reports nicht berücksichtigt_! | ||
| ## Important when adding modules! ## | ||
| The modules you'd like to get reports for needed to be declared as dependencies in the `pom.xml` of the `coverage`-Module. | ||
| Otherwise the module's coverage report will not be integrated into the aggregated report. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the BitPlan logo - as mentioned in separate E-Mail. Thanks!