控制台結果報告器
public class ConsoleResultReporter
extends TestResultListener
implements ILogSaverListener, ITestInvocationListener
結果報告器將測試結果打印到控制台。
打印每個測試運行、每個測試用例以及測試指標、測試日誌和測試文件位置。
概括
公共構造函數
控制台結果報告器
public ConsoleResultReporter ()
公共方法
調用結束
public void invocationEnded (long elapsedTime)
調用開始
public void invocationStarted (IInvocationContext context)
參數 |
---|
context | IInvocationContext |
日誌關聯
public void logAssociation (String dataName,
LogFile logFile)
參數 |
---|
dataName | String |
logFile | LogFile |
public void testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
參數 |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |
測試結果
public void testResult (TestDescription test,
TestResult result)
參數 |
---|
test | TestDescription |
result | TestResult |
測試運行結束
public void testRunEnded (long elapsedTimeMillis,
metrics)
參數 |
---|
elapsedTimeMillis | long |
metrics | |
測試運行失敗
public void testRunFailed (FailureDescription failure)
參數 |
---|
failure | FailureDescription |
測試運行失敗
public void testRunFailed (String errorMessage)
測試運行開始
public void testRunStarted (String runName,
int testCount)
參數 |
---|
runName | String |
testCount | int |