本地基準測試

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 TestInformation :包含運行測試的有用信息的TestInformation對象。

listener ITestInvocationListener : 測試結果的ITestInvocationListener

投擲
DeviceNotAvailableException

設置設備

public void setDevice (ITestDevice device)

注入被測設備。

參數
device ITestDevice :要使用的ITestDevice

設置模塊名稱

public void setModuleName (String moduleName)

設置Android原生基準測試模塊運行。

參數
moduleName String : 要運行的本機測試模塊的名稱