TestContext

public class TestContext
extends Object

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


用于对 TFC API 的 TestContext 消息进行建模的类。

TestContext 消息用于存储和检索在同一测试命令的多次尝试中传递的上下文信息。

摘要

公共构造函数

TestContext()

公共方法

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

公共构造函数

TestContext

public TestContext ()

公共方法

addEnvVars

public void addEnvVars (Map<String, String> envVars)

参数
envVars Map

addTestResource

public void addTestResource (TestResource testResource)

参数
testResource TestResource

等于

public boolean equals (Object o)

参数
o Object

返回
boolean

fromJson

public static TestContext fromJson (JSONObject json)

参数
json JSONObject

返回
TestContext

抛出
JSONException

getCommandLine

public String getCommandLine ()

返回
String

getEnvVars

public Map<String, String> getEnvVars ()

返回
Map<String, String>

getTestResources

public List<TestResource> getTestResources ()

返回
List<TestResource>

setCommandLine

public void setCommandLine (String commandLine)

参数
commandLine String

toJson

public JSONObject toJson ()

返回
JSONObject

抛出
JSONException

toString

public String toString ()

返回
String