測試情境

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