2013-09-24 77 views
0

使用concordion,可以創建使用concordion:run命令運行測試的「索引」設備。例如。如何避免concordion:運行兩次運行測試

<a concordion:run="concordion" href="myLengthytest.html">The lengthy test</a> 

我的測試中都被設置爲使用SpringJunitRunner作爲per the tip here

我試圖從故障安全插件不包括燈具,但包括調用它們,即

    <includes> 
         <include>**/*Test.java</include> 
         <include>**/*FixtureIndex.java</include> 
        </includes> 
        <excludes> 
         <exclude>**/*Fixture.java</exclude> 
        </excludes> 

凡在此情況下,「夾具」的文件是燈具和「FixtureIndex」是索引文件亞軍與concordion:運行語句。這似乎是一個合理的方法,但似乎仍然運行兩次測試..奇怪。

我發現這個問題elsewhere,但沒有給出有用的答案,所以有擊中的確切同樣的問題,只是認爲我會問這裏:-)

回答

0

這應該工作正常,除非SpringJUnitRunner是引入一些問題。

你可能會想嘗試只使用:

<includes> 
    <include>**/*FixtureIndex.java</include> 
</includes> 

這個工作的一個例子是concordion-extensions-demo項目(不使用Spring)。

+0

感謝奈傑爾 - 我的問題是我使用的舊版本的concordion - 我升級到1.4.3,它現在似乎工作。與此同時,我正在做的測試略有不同,所以不需要concordion:運行(只是試了一下,所以我可以打勾你的答案:))。 –