0
我的測試類的描述是這樣的:如何更改testNG報告輸出名稱?
private String TESTFILES = "test/tests";
@DataProvider(name = "tests")
public Iterator<Object[]> readTestFiles() {
// read a list of files ...
}
@Test(dataProvider = "tests")
public void sendRequest(File f) throws ParseException {
// do something
}
試驗報告是這個樣子:
test\tests\text.xml
PASSED: sendRequest(test\tests\text.xml)
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
我怎樣才能在報告中改變輸出的名字嗎?
This one: sendRequest(test\tests\text.xml)
I'll have instead: sendRequest(text.xml)
問題是,如果數據提供者提供長文本作爲刺,那麼測試報告看起來很可怕。
thx爲您的快速回答。 – why 2011-03-20 12:35:48