2012-03-22 7 views
3

私たちはSoap-UIを使っていくつかのWebサービステストを書いています。maven/soap-uiプラグインによる自動テストでXpathの検証が失敗する

私はそれらのいずれかで、このXPathの検証を置く:

count(//mynode) > 1 

これは、SOAP-UIソフトウェアから実行している間に正常に動作しますが、時に継続的インテグレーション(ジェンキンス)はMavenのソープ-UIプラグインを通してそれを実行しています、私はこのエラーが表示されます。

[XPath Match] junit/framework/ComparisonFailure  

私はどこか欠落しているライブラリがあると思いますが、何をすべきかを把握することはできません。

奇妙なことは、WebサービスのURLを呼び出すだけでjUnitテストを参照しないことです。

<dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.8.2</version> 
    </dependency> 
</dependencies> 

maven-について:

+0

あなたは完全な誤りを投稿することができますか?さらにログ/デバッグ情報のために '-e'または' -X'パラメータでMavenを実行することもできます。 – nwinkler

答えて

3

は最後に、私はここでthis thread

の助けを借りて追加するJUnitの依存性は、私は私のpom.xmlファイルに追加する必要がありました依存関係が存在していることがわかりましたsoapui-plugin。

全体のconfig意志は次のようになります。

<plugin> 
    <groupId>eviware</groupId> 
    <artifactId>maven-soapui-plugin</artifactId> 
    <version>4.0.1</version> 
    <executions> 
     <execution> 
      <id>services-customer</id> 
      <phase>test</phase> 
      <goals> 
       <goal>test</goal> 
      </goals> 
      <configuration> 
       <projectFile>services/customer/smoke-tests.xml</projectFile> 
       <projectProperties> 
        <value>IdmpDataEndPointHost=${smoke.dataload.url}</value> 
        <value>WebServiceEndPointHost=http://${smoke.tomcat.server}:${smoke.tomcat.port}</value> 
       </projectProperties> 
       <outputFolder>${project.build.directory}/soapui-results/services/customer</outputFolder> 
       <junitReport>true</junitReport> 
       <testFailIgnore>true</testFailIgnore> 
      </configuration> 
     </execution> 
    </executions> 
    <dependencies> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.8.2</version> 
     </dependency> 
    </dependencies> 
</plugin> 
関連する問題