原生基準測試

public class NativeBenchmarkTest
extends Object implements IDeviceTest , IRemoteTest

java.lang.Object
com.android.tradefed.testtype.NativeBenchmarkTest


在給定設備上執行本機基準測試可執行檔的測試。

它使用NativeBenchmarkTestParser解析出平均操作時間與操作之間的延遲,並將這些結果傳遞給ITestInvocationListener

概括

公共構造函數

NativeBenchmarkTest ()

公共方法

ITestDevice getDevice ()

獲取被測設備。

String getModuleName ()

取得要執行的 Android 原生基準測試模組。

void run ( TestInformation testInfo, ITestInvocationListener listener)

運行測試,並將結果報告給偵聽器。

void setDevice ( ITestDevice device)

注入被測設備。

void setModuleName (String moduleName)

設定運行Android原生基準測試模組。

公共構造函數

原生基準測試

public NativeBenchmarkTest ()

公共方法

取得設備

public ITestDevice getDevice ()

獲取被測設備。

退貨
ITestDevice ITestDevice

取得模組名稱

public String getModuleName ()

取得要執行的 Android 原生基準測試模組。

退貨
String要執行的本機測試模組的名稱,如果未設定則為 null

跑步

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

運行測試,並將結果報告給偵聽器。

參數
testInfo TestInformationTestInformation物件包含執行測試的有用資訊。

listener ITestInvocationListener :測試結果的ITestInvocationListener

投擲
DeviceNotAvailableException

設定設備

public void setDevice (ITestDevice device)

注入被測設備。

參數
device ITestDevice :要使用的ITestDevice

設定模組名稱

public void setModuleName (String moduleName)

設定運行Android原生基準測試模組。

參數
moduleName String :要執行的本機測試模組的名稱