简体   繁体   中英

Surefire and OpenClover - Generate Clover report if tests fail

I am using the plugin maven-surefire-plugin version 2.20.1 and version 4.2.0 of the OpenClover plugin

Surefire Setup

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.20.1</version>
        </plugin>

OpenClover Setup

<plugin>
    <groupId>org.openclover</groupId>
    <artifactId>clover-maven-plugin</artifactId>
    <version>4.2.0</version>
</plugin>

If any tests fail - the clover report is not generated Here is the command I use to generate my tests

mvn  clean clover:setup test clover:aggregate clover:clover -DskipTests=false -DtestFailureIgnore=true

Any ideas on what I need to do in order to get clover to generate a report even with test failures?

Thank you Damien

I resolved this by adding the maven --fail-never option to my maven command

The updated command is

mvn  clean clover:setup test clover:aggregate clover:clover -DskipTests=false -DtestFailureIgnore=true -fail-never

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM