JUnitToInvocationResultForwarder
public
class
JUnitToInvocationResultForwarder
extends Object
implements
TestListener
| java.lang.Object | |
| ↳ | com.android.tradefed.result.JUnitToInvocationResultForwarder |
TestListener イベントをリッスンし、ITestInvocationListener に転送するクラス。
概要
パブリック コンストラクタ | |
|---|---|
JUnitToInvocationResultForwarder(ITestInvocationListener invocationListener)
|
|
JUnitToInvocationResultForwarder(
|
|
パブリック メソッド | |
|---|---|
void
|
addError(Test test, Throwable t)
|
void
|
addFailure(Test test, AssertionFailedError t)
|
void
|
endTest(Test test,
指標を転送できる JUnit3 テストからのコールバック。 |
void
|
endTest(Test test)
|
void
|
startTest(Test test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
テストからログを取得するための JUnit3 フォワーダからのコールバック。 |
パブリック コンストラクタ
JUnitToInvocationResultForwarder
public JUnitToInvocationResultForwarder (ITestInvocationListener invocationListener)
| パラメータ | |
|---|---|
invocationListener |
ITestInvocationListener |
JUnitToInvocationResultForwarder
public JUnitToInvocationResultForwarder (invocationListeners)
| パラメータ | |
|---|---|
invocationListeners |
|
パブリック メソッド
addError
public void addError (Test test,
Throwable t)
| パラメータ | |
|---|---|
test |
Test |
t |
Throwable |
addFailure
public void addFailure (Test test,
AssertionFailedError t)
| パラメータ | |
|---|---|
test |
Test |
t |
AssertionFailedError |
endTest
public void endTest (Test test,
metrics) 指標を転送できる JUnit3 テストからのコールバック。
| パラメータ | |
|---|---|
test |
Test: 実行が完了したばかりの Test。 |
metrics |
: 結果コールバックに渡される Map 形式の指標。 |
endTest
public void endTest (Test test)
| パラメータ | |
|---|---|
test |
Test |
startTest
public void startTest (Test test)
| パラメータ | |
|---|---|
test |
Test |
testLog
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)テストからログを取得するための JUnit3 フォワーダからのコールバック。
| パラメータ | |
|---|---|
dataName |
String: データのわかりやすい名前(例: device_logcat)。なお、dataName は呼び出しごとに一意であるとは限りません。つまり、実装者は同じ dataName で複数の呼び出しを処理できる必要があります。 |
dataType |
LogDataType: データの LogDataType |
dataStream |
InputStreamSource: データの InputStreamSource。実装者は createInputStream を呼び出してデータの読み取りを開始し、完了したら結果の InputStream を必ず閉じるようにする必要があります。呼び出し元は、testLog メソッドが完了するまで、データソースが存在し、アクセス可能であることを確認する必要があります。 |