Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tegorov committed Jan 24, 2022
1 parent ee0eb29 commit 7191f2e
Showing 1 changed file with 77 additions and 25 deletions.
102 changes: 77 additions & 25 deletions README.md
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>
```

0 comments on commit 7191f2e

Please sign in to comment.