无法使用ReadyAPI 2.4.0 Maven插件生成PDF报告

时间:2018-07-25 07:25:50

标签: maven-3 maven-surefire-plugin ready-api

我想使用Ready API 2.4.0 Maven插件生成PDF报告。我已经完成了必要的配置。

但是PDF报告未生成。仅生成html报告。

有人可以帮助我解决此问题吗?附加了我的 POM.xml 文件。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.vodafone.app</groupId>
   <artifactId>ER-Core</artifactId>
   <packaging>jar</packaging>
   <version>1.0-SNAPSHOT</version>
   <name>ER Core</name>
   <properties>
      <soapui.junitReport>true</soapui.junitReport>
      <soapui.exportAll>true</soapui.exportAll>
      <soapui.printReport>true</soapui.printReport>
      <soapui.outputFolder>target/surefire-reports</soapui.outputFolder>
      <soapui.reportFormat>PDF</soapui.reportFormat>
      <soapui.reportName>ER_APIAutomationReport</soapui.reportName>
   </properties>
   <dependencies>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.12</version>
         <scope>runtime</scope>
      </dependency>
   </dependencies>
   <!-- Adding SoapUI Maven plugin -->
   <pluginRepositories>
      <pluginRepository>
         <id>SmartBearPluginRepository</id>
         <url>http://www.soapui.org/repository/maven2/</url>
      </pluginRepository>
   </pluginRepositories>
   <build>
      <plugins>
         <plugin>
            <dependencies>
               <dependency>
                  <groupId>org.reflections</groupId>
                  <artifactId>reflections</artifactId>
                  <version>0.9.9-RC1</version>
               </dependency>
               <dependency>
                  <groupId>com.oracle</groupId>
                  <artifactId>ojdbc14</artifactId>
                  <version>10.2.0.3.0</version>
               </dependency>
               <dependency>
                  <groupId>net.sf.nervalreports</groupId>
                  <artifactId>pdf-generator</artifactId>
                  <version>1.2</version>
               </dependency>
               <dependency>
                  <groupId>org.apache.poi</groupId>
                  <artifactId>poi-ooxml</artifactId>
                  <version>3.10-FINAL</version>
                  <exclusions>
                     <exclusion>
                        <groupId>org.apache.xmlbeans</groupId>
                        <artifactId>xmlbeans</artifactId>
                     </exclusion>
                  </exclusions>
               </dependency>
            </dependencies>
            <!--                
                <groupId>com.smartbear.soapui</groupId>
                <artifactId>soapui-pro-maven-plugin</artifactId>
                <version>5.1.2</version>
                <executions>
                -->
            <groupId>com.smartbear</groupId>
            <artifactId>ready-api-maven-plugin</artifactId>
            <version>2.4.0</version>
            <executions>
               <execution>
                  <phase>test</phase>
                  <goals>
                     <goal>test</goal>
                  </goals>
                  <id>p1</id>
                  <configuration>
                     <projectFile>ER_Core.xml</projectFile>
                     <projectProperties>
                        <value>testType=${testType}</value>
                     </projectProperties>
                     <testSuite>${a_property_name}</testSuite>
                     <junitReport>true</junitReport>
                     <exportAll>${soapui.exportAll}</exportAll>
                     <!-- Specifies the format of the report. Possible values: PDF, XLS, HTML, RTF, CSV, TXT and XML. -->
                     <reportFormat>PDF</reportFormat>
                     <reports>${basedir}/target/surefire-reports</reports>
                     <printReport>true</printReport>
                     <coverage>true</coverage>
                     <exportAll>true</exportAll>
                     <reportType>TestSuite Report</reportType>
                     <reportName>ER_APIAutomationReport</reportName>
                     <outputFolder>${soapui.outputFolder}</outputFolder>
                     <soapuiProperties>
                        <property>
                           <name>soapui.home</name>
                           <value>/opt/SmartBear/ReadyAPI-2.4.0/bin</value>
                        </property>
                     </soapuiProperties>
                     <readyApiProperties>
                        <property>
                           <name>soapui.home</name>
                           <value>/opt/SmartBear/ReadyAPI-2.4.0/bin</value>
                        </property>
                     </readyApiProperties>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.5</version>
            <configuration>
               <locales>en</locales>
            </configuration>
         </plugin>
      </plugins>
   </build>
   <!--Add Maven Surefire Plugin to generate JUnit XML reports.-->
   <reporting>
      <plugins>
         <plugin>
            <groupId>org.codehaus.sonar-plugins.pdf-report</groupId>
            <artifactId>maven-pdfreport-plugin</artifactId>
            <version>1.3</version>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>2.19.1</version>
         </plugin>
      </plugins>
   </reporting>
   <!--Command the Site plugin to generate a web site.-->
   <distributionManagement>
      <site>
         <id>site.deployments</id>
         <name>Site deployments</name>
         <url>http://localhost/target/site</url>
      </site>
   </distributionManagement>
</project>

0 个答案:

没有答案
相关问题