PrettyTestEventLogger
public class PrettyTestEventLogger
extends Object
implements ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.testtype.host.PrettyTestEventLogger |
记录器匹配事件并记录它们,以便更容易调试。 host端和device端的log会严格匹配,方便查找。
概括
公共构造函数 | |
---|---|
PrettyTestEventLogger ( devices) PrettyTestEventLogger ( devices) |
公共方法 | |
---|---|
void | testEnded ( TestDescription test, testMetrics) testEnded ( TestDescription test, testMetrics) 报告单个测试用例的执行结束。 |
void | testFailed ( TestDescription test, String trace) 报告单个测试用例的失败。 |
void | testStarted ( TestDescription test) 报告单个测试用例的开始。 |
公共构造函数
PrettyTestEventLogger
public PrettyTestEventLogger (devices)
参数 | |
---|---|
devices |
公共方法
测试结束
public void testEnded (TestDescription test,testMetrics)
报告单个测试用例的执行结束。
如果未调用testFailed(TestDescription, FailureDescription)
,则此测试通过。还返回在测试用例执行期间可能发出的任何键/值指标。
参数 | |
---|---|
test | TestDescription :标识测试 |
testMetrics | ERROR(/Map) |
测试失败
public void testFailed (TestDescription test, String trace)
报告单个测试用例的失败。
将在 testStarted 和 testEnded 之间调用。
参数 | |
---|---|
test | TestDescription :标识测试 |
trace | String :失败的堆栈跟踪 |
测试开始
public void testStarted (TestDescription test)
报告单个测试用例的开始。较旧的界面,应尽可能使用testStarted(com.android.tradefed.result.TestDescription)
。
参数 | |
---|---|
test | TestDescription :标识测试 |