-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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,94 @@ | ||
[![](https://jitpack.io/v/tegorov/allure-environment-maven-plugin.svg)](https://jitpack.io/#tegorov/allure-environment-maven-plugin) | ||
|
||
# Allure Environment Maven Plugin | ||
|
||
Maven plugin generating [environment.properties](https://docs.qameta.io/allure/#_environment) for Allure report | ||
This plugin generates [environment.properties](https://docs.qameta.io/allure/#_environment) for Allure report. | ||
|
||
![Allure Report](.github/preview_report.png) | ||
|
||
# Getting Started | ||
|
||
TODO | ||
* Add the JitPack repository into your `pom.xml`: | ||
```xml | ||
<project> | ||
... | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
... | ||
</project> | ||
``` | ||
|
||
* Add the plugin: | ||
```xml | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.github.tegorov</groupId> | ||
<artifactId>allure-environment-maven-plugin</artifactId> | ||
<version>0.1.0</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>allure-environment</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
``` | ||
|
||
# Configuration | ||
|
||
* Add properties to the plugin configuration: | ||
```xml | ||
... | ||
<configuration> | ||
<properties> | ||
<property> | ||
<name>os.name</name> | ||
<value>${os.name}</value> | ||
</property> | ||
<property> | ||
<name>java.version</name> | ||
<value>${java.version}</value> | ||
</property> | ||
<property> | ||
<name>junit.version</name> | ||
<value>${junit.version}</value> | ||
</property> | ||
<property> | ||
<name>branch.name</name> | ||
<value>${branch.name}</value> | ||
</property> | ||
</properties> | ||
</configuration> | ||
... | ||
<plugin> | ||
<groupId>com.github.tegorov</groupId> | ||
<artifactId>allure-environment-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<properties> | ||
<property> | ||
<name>os.name</name> | ||
<value>${os.name}</value> | ||
</property> | ||
<property> | ||
<name>java.version</name> | ||
<value>${java.version}</value> | ||
</property> | ||
<property> | ||
<name>junit.version</name> | ||
<value>${junit.version}</value> | ||
</property> | ||
<property> | ||
<name>branch.name</name> | ||
<value>${branch.name}</value> | ||
</property> | ||
</properties> | ||
</configuration> | ||
</plugin> | ||
``` | ||
|
||
You can pass property value via the command line: | ||
```shell | ||
mvn clean test -Dbranch.name=develop | ||
``` | ||
|
||
TODO | ||
* `environment.properties` will be generated tо directory: `target/allure-results` | ||
|
||
You can change this directory: | ||
```xml | ||
<plugin> | ||
<groupId>com.github.tegorov</groupId> | ||
<artifactId>allure-environment-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<allureResultsDirectory>newtarger/allure-results</allureResultsDirectory> | ||
... | ||
</configuration> | ||
</plugin> | ||
``` |