FITを使用して統合/受け入れテストを作成しようとしています。ここではフォルダ構造は次のとおりです。MavenでFITビルドに失敗しました
ここ-src
--main
---fit
----"html files"
---java
----fit
-----"FIT Fixtures files"
----my
-----package
------"business logic files"
は私のpom.xmlが(Maven2を)です:
mvn integration-test -X
を使用してFITテストを実行
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>Test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
...
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>fit-maven-plugin</artifactId>
<version>2.0-beta-3</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>fit-maven-plugin</artifactId>
<version>2.0-beta-3</version>
<executions>
<execution>
<configuration>
<sourceDirectory>src/main/fit</sourceDirectory>
<sourceIncludes>*.html</sourceIncludes>
<outputDirectory>${project.basedir}\target</outputDirectory>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
...
</repositories>
</project>
、私はによって引き起こされるエラーを取得する:
はjava.lang.IllegalStateException:フィクスチャが で失敗した回数:0右、0間違った、0無視、4つの例外
それでも、C:\JavaTest\target\customer-bills.html
におけるFIT出力が生成され、というエラーが含まれている: java.lang.RuntimeException: The fixture GivenTheFollowingCustomers was not found.
「GivenTheFollowingCustomers」をHTMLのテーブルヘッダーです:
<table>
<tr>
<td colspan="3" class="title">GivenTheFollowingCustomers</td>
</tr>
...
</table>
私は、システムが探しているだろうと思いました什器はGivenTheFollowingCustomers
?なぜそれを見つけることができないのですか?
ありがとうございました!
更新: システムは現在、最初のテーブルのための固定具を見つけることができますが、唯一の最初のです!テーブルヘッダーがfit.GivenTheFollowingCustomers
の代わりにGivenTheFollowingCustomers
だったので、私は問題に直面していました。それでも、私は、そのHTMLファイル内の他のすべてのテーブル/フィクスチャに対して同じエラーが発生しています。それは特定のテーブルに依存しないので、それは奇妙です。たとえば、最初のテーブル(GivenTheFollowingCustomers
)を2番目の位置に移動すると、動作が停止し、最初のテーブルが代わりに機能し始めます。どんな手掛かり..?
更新2:私はFITライブラリ(Mavenなし)で手動でテストを実行しようとしましたが、うまくいきました!また、誰かがこれを書きました:http://osdir.com/ml/java.maven-plugins.mojo.user/2007-07/msg00000.htmlと回答がありませんでした。 FIT mavenプラグインのバグがありますか?