Google cam kết thúc đẩy công bằng chủng tộc cho Cộng đồng người da đen. Xem cách thực hiện.

JUnitToInvocationResultForwarder

public class JUnitToInvocationResultForwarder
extends Object implements TestListener

java.lang.Object
com.android.tradefed.result.JUnitToInvocationResultForwarder


Một lớp lắng nghe các sự kiện TestListener và chuyển tiếp chúng tới một ITestInvocationListener .

Bản tóm tắt

nhà thầu công cộng

JUnitToInvocationResultForwarder ( ITestInvocationListener invocationListener)
JUnitToInvocationResultForwarder ( invocationListeners) JUnitToInvocationResultForwarder ( invocationListeners)

Phương thức công khai

void addError (Test test, Throwable t)

void addFailure (Test test, AssertionFailedError t)

void endTest (Test test, metrics) endTest (Test test, metrics)

Gọi lại từ các bài kiểm tra JUnit3 có thể chuyển tiếp số liệu.

void endTest (Test test)

void startTest (Test test)

void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)

Gọi lại từ trình chuyển tiếp JUnit3 để lấy nhật ký từ thử nghiệm.

nhà thầu công cộng

JUnitToInvocationResultForwarder

public JUnitToInvocationResultForwarder (ITestInvocationListener invocationListener)

Thông số
invocationListener ITestInvocationListener

JUnitToInvocationResultForwarder

public JUnitToInvocationResultForwarder ( invocationListeners)

Thông số
invocationListeners

Phương thức công khai

thêmLỗi

public void addError (Test test, 
                Throwable t)

Thông số
test Test

t Throwable

thêmThất bại

public void addFailure (Test test, 
                AssertionFailedError t)

Thông số
test Test

t AssertionFailedError

kiểm tra kết thúc

public void endTest (Test test, 
                 metrics)

Gọi lại từ các bài kiểm tra JUnit3 có thể chuyển tiếp số liệu.

Thông số
test Test : Test vừa chạy xong.

metrics : Các số liệu ở định dạng Bản đồ sẽ được chuyển đến lệnh gọi lại kết quả.

kiểm tra kết thúc

public void endTest (Test test)

Thông số
test Test

bắt đầu kiểm tra

public void startTest (Test test)

Thông số
test Test

Nhật ký kiểm tra

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Gọi lại từ trình chuyển tiếp JUnit3 để lấy nhật ký từ thử nghiệm.

Thông số
dataName String : tên mô tả Chuỗi của dữ liệu. ví dụ: "device_logcat". Lưu ý dataName có thể không phải là duy nhất cho mỗi lần gọi. tức là người triển khai phải có khả năng xử lý nhiều cuộc gọi với cùng một tên dữ liệu

dataType LogDataType : LogDataType của dữ liệu

dataStream InputStreamSource : InputStreamSource của dữ liệu. Người triển khai nên gọi createInputStream để bắt đầu đọc dữ liệu và đảm bảo đóng InputStream kết quả khi hoàn tất. Người gọi phải đảm bảo nguồn dữ liệu vẫn hiện diện và có thể truy cập được cho đến khi phương thức testLog hoàn tất.