2015-10-20 153 views
0

我正在嘗試將SoapUI測試用例與傾斜集成以生成報告。 有一個maven項目,我使用soapui maven插件來運行測試用例。 測試用例運行正常,生成JUnit報告,但沒有誘惑結果。 請檢查我的pom,它可能會有一些錯誤的使用方法。SoapUI +傾斜集成

<?xml version='1.0' encoding='UTF-8'?><project xmlns:1='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/xsd/maven-4.0.0.xsd'> 

<name>SOAPUI Tests</name> 
<version>1.0</version> 
<modelVersion>4.0.0</modelVersion> 
<groupId>soapui-tests</groupId> 
<artifactId>soapui-tests</artifactId> 
<description>SoapUI Integration Tests</description> 

<properties> 
<allure.version>1.4.19</allure.version> 
<allure.maven.version>2.4</allure.maven.version> 
<surefire.version>2.18.1</surefire.version> 
<aspectj.version>1.7.4</aspectj.version> 
<soapui.version>4.6.1</soapui.version> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>ru.yandex.qatools.allure</groupId> 
     <artifactId>allure-junit-adaptor</artifactId> 
     <version>${allure.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-surefire-report-plugin</artifactId> 
     <version>${surefire.version}</version> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>com.smartbear.soapui</groupId> 
      <artifactId>soapui-maven-plugin</artifactId> 
      <version>${soapui.version}</version> 

      <configuration> 
       <outputFolder>${basedir}/target/soapui-results</outputFolder> 
       <junitReport>true</junitReport> 
       <exportAll>true</exportAll > 
       <printReport>true</printReport> 
       <testFailIgnore>true</testFailIgnore> 
      </configuration> 

      <dependencies> 
       <dependency> 
        <groupId>com.sun.mail</groupId> 
        <artifactId>javax.mail</artifactId> 
        <version>1.5.0-b01</version> 
       </dependency> 
      </dependencies> 

      <executions> 
       <execution> 
        <id>x_project.xml</id> 
        <phase>process-test-classes</phase> 
        <goals> 
         <goal>test</goal> 
        </goals> 
        <configuration> 
         <projectFile>x_project.xml</projectFile> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>${surefire.version}</version> 
      <configuration> 
       <testFailureIgnore>true</testFailureIgnore> 
       <argLine> 
        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar 
       </argLine> 
       <properties> 
        <property> 
         <name>listener</name> 
         <value>ru.yandex.qatools.allure.junit.AllureRunListener</value> 
        </property> 
       </properties> 
      </configuration> 
      <dependencies> 
       <dependency> 
        <groupId>org.aspectj</groupId> 
        <artifactId>aspectjweaver</artifactId> 
        <version>${aspectj.version}</version> 
       </dependency> 
      </dependencies> 
     </plugin> 
    </plugins> 
</build> 

<reporting> 
    <excludeDefaults>true</excludeDefaults> 
    <plugins> 
     <plugin> 
      <groupId>ru.yandex.qatools.allure</groupId> 
      <artifactId>allure-maven-plugin</artifactId> 
      <version>${allure.maven.version}</version> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-report-plugin</artifactId> 
      <version>${surefire.version}</version> 
     </plugin> 
    </plugins> 
</reporting> 

MNV測試部位命令返回以下錯誤:

[ERROR]未能執行目標org.apache.maven.plugins:行家現場-插件:3.3:位點(默認 - 網站)在項目soapui測試:頁面生成過程中的錯誤:錯誤呈現Maven報告:無法生成報告:InvocationTargetException:找不到任何誘惑結果 - > [幫助1]

回答

0

我認爲傾城報告不是爲XML,由s生成oapui。我前段時間嘗試過,沒有找到解決方案。現在我要聯繫魅力團隊瞭解這一點。很快會通知你。

+0

嗨,我面臨同樣的問題,你是否從傾慕團隊得到任何意見? –

+1

是的,我得到了答案。他們不支持soapui報告 –

0

正如我可以在您的pom.xml中看到的,您使用非標準輸出文件夾作爲您的測試結果${basedir}/target/soapui-results。所以你需要配置allure.results.directory屬性來告訴誘惑插件在哪裏尋找測試結果。