Maven-surefire-plugin


(gradletrain) #1

How can I implement below the below from pom.xml in build.gradle?

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.20</version>
    <configuration>
        <includes>
             <include>test.java</include>
        </includes>
        <systemProperties>            
            <cucumber.options>--plugin junit:target/surefire-reports/cucumber-junit.xml</cucumber.options>
        </systemProperties>
    </configuration>
</plugin>

(uklance) #2

See Test task documentation

Eg

apply plugin: 'java' 

test {
   systemProperty 'cucumber.options', '--plugin junit:target/surefire-reports/cucumber-junit.xml' 
   include '**/*Test.class'
}

(gradletrain) #3

Thank you ! It worked.