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> |
|
setCommandLine
public void setCommandLine (String commandLine)
| 參數 | |
|---|---|
commandLine |
String |
toJson
public JSONObject toJson ()
| 傳回 | |
|---|---|
JSONObject |
|
| 擲回 | |
|---|---|
JSONException |
|
toString
public String toString ()
| 傳回 | |
|---|---|
String |
|