Skip to content

tegorov/allure-environment-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allure Environment Maven Plugin

This plugin generates environment.properties for Allure report.

Allure Report

Getting Started

  • Add the JitPack repository into your pom.xml:
<project>
    ...
    <pluginRepositories>
        <pluginRepository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </pluginRepository>
    </pluginRepositories>
    ...
</project>
  • Add the plugin:
<build>
    <plugins>
        <plugin>
            <groupId>com.github.tegorov</groupId>
            <artifactId>allure-environment-maven-plugin</artifactId>
            <version>0.1.2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>allure-environment</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Configuration

  • Add properties to the plugin 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:

mvn clean test -Dbranch.name=develop
  • environment.properties will be generated tо directory: target/allure-results

You can change this directory:

<plugin>
    <groupId>com.github.tegorov</groupId>
    <artifactId>allure-environment-maven-plugin</artifactId>
    ...
    <configuration>
        <allureResultsDirectory>newtarger/allure-results</allureResultsDirectory>
        ...
    </configuration>
</plugin>

About

Maven plugin generating environment.properties for Allure report

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages