測試上下文

public class TestContext
extends Object

java.lang.Object
com.android.tradefed.cluster.TestContext


模擬 TFC API 的 TestContext 消息的類。

TestContext 消息用於存儲和檢索跨同一測試命令的多次嘗試傳遞的上下文信息。

概括

公共構造函數

TestContext ()

公共方法

void addEnvVars ( envVars) addEnvVars ( envVars)
void addTestResource ( TestResource testResource)
boolean equals (Object o)
static TestContext fromJson (JSONObject json)
String getCommandLine ()
getEnvVars ()
getTestResources ()
void setCommandLine (String commandLine)
JSONObject toJson ()
String toString ()

公共構造函數

測試環境

public TestContext ()

公共方法

添加環境變量

public void addEnvVars ( envVars)

參數
envVars

添加測試資源

public void addTestResource (TestResource testResource)

參數
testResource TestResource

等於

public boolean equals (Object o)

參數
o Object

退貨
boolean

來自Json

public static TestContext fromJson (JSONObject json)

參數
json JSONObject

退貨
TestContext

投擲
JSONException

獲取命令行

public String getCommandLine ()

退貨
String

獲取環境變量

public  getEnvVars ()

退貨

獲取測試資源

public  getTestResources ()

退貨

設置命令行

public void setCommandLine (String commandLine)

參數
commandLine String

托傑森

public JSONObject toJson ()

退貨
JSONObject

投擲
JSONException

到字符串

public String toString ()

退貨
String