Home
last modified time | relevance | path

Searched refs:json (Results 1 – 25 of 82) sorted by relevance

1234

/test/vti/dashboard/src/main/java/com/android/vts/entity/
DTestAcknowledgmentEntity.java225 public static TestAcknowledgmentEntity fromJson(User user, JsonObject json) { in fromJson() argument
227 if (!json.has(TEST_NAME)) return null; in fromJson()
228 String testName = json.get(TEST_NAME).getAsString(); in fromJson()
233 if (json.has(BRANCHES)) { in fromJson()
234 branches = new Gson().fromJson(json.get(BRANCHES), listType); in fromJson()
238 if (json.has(DEVICES)) { in fromJson()
239 devices = new Gson().fromJson(json.get(DEVICES), listType); in fromJson()
243 if (json.has(TEST_CASE_NAMES)) { in fromJson()
244 testCaseNames = new Gson().fromJson(json.get(TEST_CASE_NAMES), listType); in fromJson()
248 if (json.has(NOTE)) { in fromJson()
[all …]
DTestRunEntity.java419 JsonObject json = new JsonObject(); in toJson() local
420 json.add(TEST_NAME, new JsonPrimitive(this.testName)); in toJson()
421 json.add(TEST_BUILD_ID, new JsonPrimitive(this.testBuildId)); in toJson()
422 json.add(HOST_NAME, new JsonPrimitive(this.hostName)); in toJson()
423 json.add(PASS_COUNT, new JsonPrimitive(this.passCount)); in toJson()
424 json.add(FAIL_COUNT, new JsonPrimitive(this.failCount)); in toJson()
425 json.add(START_TIMESTAMP, new JsonPrimitive(this.startTimestamp)); in toJson()
426 json.add(END_TIMESTAMP, new JsonPrimitive(this.endTimestamp)); in toJson()
448json.add(CodeCoverageEntity.COVERED_LINE_COUNT, new JsonPrimitive(coveredLineCount)); in toJson()
449 json.add(CodeCoverageEntity.TOTAL_LINE_COUNT, new JsonPrimitive(totalLineCount)); in toJson()
[all …]
DTestPlanRunEntity.java301 JsonObject json = new JsonObject(); in toJson() local
302 json.add(TEST_PLAN_NAME, new JsonPrimitive(this.testPlanName)); in toJson()
303 json.add(TEST_BUILD_ID, new JsonPrimitive(this.testBuildId)); in toJson()
304 json.add(PASS_COUNT, new JsonPrimitive(this.passCount)); in toJson()
305 json.add(FAIL_COUNT, new JsonPrimitive(this.failCount)); in toJson()
306 json.add(START_TIMESTAMP, new JsonPrimitive(this.startTimestamp)); in toJson()
307 json.add(END_TIMESTAMP, new JsonPrimitive(this.endTimestamp)); in toJson()
308 return json; in toJson()
/test/vti/dashboard/src/main/java/com/android/vts/api/
DCoverageRestServlet.java49 String json = ""; in doGet() local
53 json = apiCoverageData(key); in doGet()
55 json = "{error: 'true', message: 'unexpected path!!!'}"; in doGet()
60 json = "{error: 'true', message: 'the path info is not existed!!!'}"; in doGet()
66 response.getWriter().write(json); in doGet()
80 String json = ""; in doPost() local
87 json = postCoverageData(cmd, coverageId, testName, testRunId); in doPost()
90 json = postCoverageDataSum(urlSafeKey); in doPost()
92 json = "{error: 'true', message: 'unexpected path!!!'}"; in doPost()
95 json = "{error: 'true', message: 'the path info is not existed!!!'}"; in doPost()
[all …]
DDataRestServlet.java41 String json = ""; in doGet() local
48 json = new Gson().toJson(BranchEntity.getByBranch(schKey)); in doGet()
50 json = new Gson().toJson(BuildTargetEntity.getByBuildTarget(schKey)); in doGet()
55 json = in doGet()
61 json = in doGet()
68 json = "{error: 'true', message: 'unexpected path!!!'}"; in doGet()
73 json = "{error: 'true', message: 'the path info is not existed!!!'}"; in doGet()
79 response.getWriter().write(json); in doGet()
DUserFavoriteRestServlet.java109 JsonObject json = new JsonObject(); in addFavorite() local
110 json.add("key", new JsonPrimitive(KeyFactory.keyToString(favoriteKey))); in addFavorite()
111 return json; in addFavorite()
153 JsonObject json = new JsonObject(); in updateFavorite() local
154 json.add("key", new JsonPrimitive(KeyFactory.keyToString(favoriteKey))); in updateFavorite()
155 return json; in updateFavorite()
/test/suite_harness/tools/cts-test-metrics/
DREADME1 The parse_test_metrics.py script can be used to parse test metrics json files. Run the following
3 python parse_test_metrics.py CtsCameraTestCases.reportlog.json
6 python parse_test_metrics.py CtsCameraTestCases.reportlog.json CtsUiHostTestCases.reportlog.json
7 python parse_test_metrics.py *.json
9 Test metrics json files can be found in $CTS_ROOT/repository/results/$RESULT_DIR/report-log-files/
12 The MetricsParser class defines functions to parse a json file. The _Parse function takes a filename
13 as input, reads the json file and adds the json object to json_data. The _PrintJson function
/test/suite_harness/common/util/tests/src/com/android/compatibility/common/util/
DCrashUtilsTest.java22 import org.json.JSONArray;
23 import org.json.JSONException;
24 import org.json.JSONObject;
68 JSONObject json = new JSONObject(); in createCrashJson() local
70 json.put(CrashUtils.PID, pid); in createCrashJson()
71 json.put(CrashUtils.TID, tid); in createCrashJson()
72 json.put(CrashUtils.NAME, name); in createCrashJson()
73 json.put(CrashUtils.FAULT_ADDRESS, faultaddress); in createCrashJson()
74 json.put(CrashUtils.SIGNAL, signal); in createCrashJson()
78 return json; in createCrashJson()
/test/vti/dashboard/src/main/java/com/android/vts/util/
DHistogram.java156 JsonObject json = super.toJson(); in toJson() local
157 json.add(VALUE_KEY, new Gson().toJsonTree(values).getAsJsonArray()); in toJson()
158 json.add(PERCENTILES_KEY, new Gson().toJsonTree(percentiles).getAsJsonArray()); in toJson()
159 json.add(PERCENTILE_VALUES_KEY, new Gson().toJsonTree(percentileValues).getAsJsonArray()); in toJson()
160 json.add(IDS_KEY, new Gson().toJsonTree(ids).getAsJsonArray()); in toJson()
161 json.add(MIN_KEY, new JsonPrimitive(min)); in toJson()
162 json.add(MAX_KEY, new JsonPrimitive(max)); in toJson()
163 return json; in toJson()
DGraph.java83 JsonObject json = new JsonObject(); in toJson() local
84 json.add(X_LABEL_KEY, new JsonPrimitive(getXLabel())); in toJson()
85 json.add(Y_LABEL_KEY, new JsonPrimitive(getYLabel())); in toJson()
86 json.add(NAME_KEY, new JsonPrimitive(getName())); in toJson()
87 json.add(TYPE_KEY, new JsonPrimitive(getType().toString())); in toJson()
88 return json; in toJson()
DTestRunMetadata.java132 JsonObject json = new JsonObject(); in toJson() local
133 json.add(DEVICE_INFO, new JsonPrimitive(this.deviceInfo)); in toJson()
134 json.add(ABI_INFO, new JsonPrimitive(this.abiInfo)); in toJson()
135 json.add(TEST_RUN, this.testRun.toJson()); in toJson()
137 json.add(TEST_DETAILS, this.details.toJson()); in toJson()
139 return json; in toJson()
DLineGraph.java118 JsonObject json = super.toJson(); in toJson() local
144 json.add(VALUE_KEY, new Gson().toJsonTree(lineGraphValues).getAsJsonArray()); in toJson()
145 json.add(IDS_KEY, new Gson().toJsonTree(ids).getAsJsonArray()); in toJson()
146 json.add(TICKS_KEY, new Gson().toJsonTree(axisTicks)); in toJson()
147 return json; in toJson()
DTestRunDetails.java54 JsonObject json = new JsonObject(); in toJson() local
55 json.add(NAME_KEY, new JsonPrimitive(name)); in toJson()
56 json.add(DATA_KEY, new Gson().toJsonTree(testCases)); in toJson()
57 return json; in toJson()
DBoxPlot.java149 JsonObject json = super.toJson(); in toJson() local
181 json.add(VALUE_KEY, new Gson().toJsonTree(stats)); in toJson()
182 json.add(SERIES_KEY, new Gson().toJsonTree(seriesList)); in toJson()
183 return json; in toJson()
/test/framework/harnesses/host_controller/vti_interface/
Dvti_endpoint_client.py17 import json
87 response = requests.post(url, data=json.dumps(build),
123 response = requests.post(url, data=json.dumps(payload),
154 url, data=json.dumps({"manifest_branch": "na"}),
193 response = requests.post(url, data=json.dumps({"name": "na"}),
235 response = requests.post(url, data=json.dumps(lab),
263 response = requests.post(url, data=json.dumps({"hostname": hostname}),
274 response_json = json.loads(response.text)
304 logging.info("Job info : {}".format(json.dumps(job)))
328 response = requests.post(url, data=json.dumps(self._job),
[all …]
/test/vti/test_serving/gae/script/
Ddeploy-endpoint.sh33 …nts services deploy buildv1openapi.json hostv1openapi.json labv1openapi.json schedulev1openapi.jso…
/test/vti/test_serving/gae/frontend/
D.gitignore22 !.vscode/settings.json
23 !.vscode/tasks.json
24 !.vscode/launch.json
25 !.vscode/extensions.json
/test/vti/dashboard/
DREADME.md117 ### How to set test data on json files for generating mock data on local dev server
120 on json files under the testdata folder. However, you need to abide by some rules in doing this,
123 First, in test-plan-report-data.json, you need to set the same number of data under "testCaseNames"
127 ```json
152 Second, in test-report-data.json file, you need to make sure that "testModules" should have
154 in the test-report-data.json file.
156 test-report-data.json
157 ```json
172 test-plan-report-data.json
173 ```json
[all …]
/test/vts/utils/python/controllers/
Dandroid.py22 import json
93 result = json.loads(str(resp, encoding="utf8"))
107 self.client.write(json.dumps({'cmd': command,
117 request = json.dumps(data)
123 result = json.loads(str(response, encoding="utf8"))
/test/framework/harnesses/host_controller/acloud/
Dacloud_client.py18 import json
130 report = json.load(f)
154 report = json.load(f)
163 report = json.load(f)
201 report = json.load(f)
/test/vts/harnesses/tradefed/src/com/android/tradefed/util/
DJsonUtil.java20 import org.json.JSONArray;
21 import org.json.JSONObject;
22 import org.json.JSONException;
/test/framework/harnesses/host_controller/tradefed/
Dremote_operation.py17 import json
59 response = json.loads(response_str)
71 return json.dumps(self._obj)
/test/suite_harness/common/host-side/util/src/com/android/compatibility/common/util/
DDynamicConfigHandler.java21 import org.json.JSONArray;
22 import org.json.JSONException;
23 import org.json.JSONObject;
24 import org.json.JSONTokener;
/test/framework/harnesses/host_controller/build/
Dbuild_provider_pab.py21 import json
166 userinfo = json.load(handle)
230 params = json.dumps(params)
233 data = json.dumps(data)
249 responseJSON = response.json()
264 json.dumps(responseJSON))
324 responseJSON = response.json()
487 responseJSON = response.json()
/test/suite_harness/common/util/src/com/android/compatibility/common/util/
DCrashUtils.java21 import org.json.JSONArray;
22 import org.json.JSONException;
23 import org.json.JSONObject;

1234