测试上下文

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