Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Update JUnit 5 documentation for simpler configuration #144

Closed
mikomatic opened this issue Nov 10, 2021 · 0 comments
Closed

Update JUnit 5 documentation for simpler configuration #144

mikomatic opened this issue Nov 10, 2021 · 0 comments

Comments

@mikomatic
Copy link

mikomatic commented Nov 10, 2021

Hello everyone, thanks for the useful framework.

While setting this up with Junit 5, I noticed documentation can be updated, with a slightly simpler configuration:

  • By upgrading to maven-surefire-plugin to 2.22.2, one does not need to provided a junit-platform-surefire-provider anymore (it is deprecated on latests version of Junit 5)
  • When using the latest version of allure-maven (2.10.0), it is not necessary to provide reportVersion in the configuration
  • When using the latest version of allure-maven (2.10.0), it is not necessary to provide junit.jupiter.extensions.autodetection.enabled property.
  • In order for the report to be generated via a mvn test allure:report, i had to customize allure.results.directory system property. (it is described somewhere else in the docs)

Below is my current setup

<properties>
    <aspectj.version>1.9.7</aspectj.version>
</properties>

<dependencies>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit5</artifactId>
            <version>LATEST_VERSION</version>
            <scope>test</scope>
        </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                 <version>2.22.2</version>
                <configuration>
                <testFailureIgnore>false</testFailureIgnore>
                        <argLine>
                            -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                        </argLine>
                    <systemProperties>
                       <allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
                    </systemProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    <dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-maven</artifactId>
                <version>LATEST_VERSION</version>
            </plugin>
    </plugins>
</build>
...

I'll gladly make a PR if you find these changes useful.

PS. Documentation seems exposed at two different URLs, what is the difference ?

@baev baev closed this as completed Jan 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants