reportportal / examples-java

Java examples of Report Portal usage
https://reportportal.io/
Apache License 2.0
17 stars 54 forks source link

Please provide a spring-boot-starter-test example #51

Closed wlad closed 3 years ago

wlad commented 3 years ago

instead of importing junit/jupiter dependencies one by one ...

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <version>1.6.0</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.6.0</version>
        </dependency>

one can use spring-boot-starter-test which has (all?) the needed dependencies and makes it easier to manage and update dependency version(s)

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version> 2.3.5.RELEASE</version>
            <scope>test</scope>
        </dependency>

I've tried different versions of spring-boot-starter-test with your examples-java/example-junit5 TCs. I've renamed some of your TCs to follow the pattern *IT.java to play with surefire and failesave plugin and test if unit and integration tests results arrive as one launch in RP.

2.4.0 doest not work at all. 2.3.5.RELEASE works but integration tests (*IT.java) are not executed.

It would be greate if you could make an example with spring-boot-starter-test + surefire + failesave plugins where results end up in one single launch in RP.

wlad commented 3 years ago

here is something to start with -->https://github.com/testautomation/examples-java/tree/master/example-spring-boot-starter-test

but is has this issue https://github.com/reportportal/agent-java-junit5/issues/77

wlad commented 3 years ago

closing due to lag of interest --> https://github.com/reportportal/agent-java-junit5/issues/77#issuecomment-736611308