2

I've implemented an automated appium test for a mobile application using cucumber and a JUnit runner. In order to generate pretty reports, I'd like to use net.masterthought's maven-cucumber-reporting artifact.

<plugin>
  <groupId>net.masterthought</groupId>
  <version>3.9.0</version>
  <executions>
   <execution>       
     <id>execution</id>  
        <phase>verify</phase> 
    <goals>              
     <goal>generate</goal>    
   </goals>     
    <configuration> 
     <projectName>TestingNo1</projectName>
     <outputDirectory>${project.build.directory}/site/cucumber-reports</outputDirectory> 
     <cucumberOutput>${project.build.directory}/site/cucumber-reports-json/</cucumberOutput>
     <buildNumber>${project.version}</buildNumber>    
    </configuration>    
   </execution>
 </executions>
</plugin>   

This is the way I would integrate the workflow in a maven project. Thus I'm using gradle as a build tool, I'm struggeling to integrate the execution of the plugin in gradle.
Is there a way to define a <phase> and a <goal> in gradle as well?

I've read a fair bit of the gradle documentation and I stumbled upon tasks. But it seems like I've to run tasks from the command line seperately. How can I achieve that when I start the testflow, that a task is called as well?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
beware_bear
  • 67
  • 12

0 Answers0