我正在編寫測試套件並遇到問題。我正在使用黃瓜並定義了多個功能文件。當我運行測試包時,一個功能文件的進度(html報告和json格式)在下一個功能文件執行開始時被覆蓋。執行新功能文件時會覆蓋黃瓜報告
我有多個測試類定義運行這些功能文件。我正試圖找到一種方法,可以爲所有功能運行獲取單個HTML報告以提供統一視圖。
爲參考樣本測試文件:
@CucumberOptions(plugin = { "pretty", "html:target/report/html",
"json:target/report/json/result.json" })
public class BaseFeature {
}
@RunWith(Cucumber.class)
@CucumberOptions(features = "classpath:test/feature/rest/query.feature"
, monochrome = true
, glue={"a.b.c.rest"})
public class RunTest1 extends BaseFeature {
}
@RunWith(Cucumber.class)
@CucumberOptions(features="classpath:test/feature/soap/book.feature"
, monochrome = true
, glue="a.b.c.soap")
public class RunTest2 extends BaseFeature {
}
讓知道什麼可以做有一個綜合報告。
所有的課程都是套房,對嗎?所以一次只能爲一個套件生成報告。 –
將所有內容合併到一個套件中,並獲得中央報告。 –
是的,因爲每個RunWith都意味着獨立的套件。因此,一次只能使用1名運動員來生成報告。 請在下面提供您的答案,以幫助未來面臨同樣問題的其他人。 –