From c6df243a3316ba12bd910555abe5d2df44ea34d9 Mon Sep 17 00:00:00 2001 From: Android Partner Docs Date: Fri, 16 Mar 2018 12:34:18 -0700 Subject: Docs: Changes to source.android.com - 189377827 hikey960: Use Image.gz-dtb as a kernel image by Android Partner Docs - 189349681 Moving VTS from devices/tech to compatibility/vts (and im... by Heidi von Markham - 189244963 Augment USB Audio CTS doc with additional peripherals by Clay Murphy - 189185354 New reports page for Android Security YIR and home page u... by Danielle Roberts - 189059228 Update CTS/CTS-Verifier downloads for CTS-Mar-2018 Releases by Android Partner Docs - 189043885 Devsite localized content from translation request 6cb273... by Android Partner Docs - 189038438 Devsite localized content from translation request 1306aa... by Android Partner Docs - 189038430 Devsite localized content from translation request cbcbd6... by Android Partner Docs - 188908346 Devsite localized content from translation request 946829... by Android Partner Docs - 188908252 Devsite localized content from translation request 4ade76... by Android Partner Docs - 188908248 Devsite localized content from translation request 3a86a7... by Android Partner Docs - 188908238 Devsite localized content from translation request 090d64... by Android Partner Docs - 188877475 Updated "Develop CTS" page to by Android Partner Docs - 188805462 Devsite localized content from translation request 429221... by Android Partner Docs - 188791843 CDD: Relax Overview title count requirement. by Android Partner Docs - 188751143 Devsite localized content from translation request 1e4322... by Android Partner Docs - 188751132 Devsite localized content from translation request 9e5f9b... by Android Partner Docs - 188560973 CDD: SD card encryption required for the primary external... by Android Partner Docs - 188560351 by Android Partner Docs - 188418844 Add links and path to source files for Data Saver by Clay Murphy - 188368136 CDD: Apps can use ACTION_OPEN_DOCUMENT_TREE to write to s... by Android Partner Docs - 188364381 by Android Partner Docs - 188363534 CDD: Fixing typos in the USB section by Android Partner Docs - 188360294 CDD: Relax Overview title count requirement. by Android Partner Docs - 188351043 Devsite localized content from translation request e77cb5... by Android Partner Docs - 188346717 CDD: Relax Near-ultrasound microphone SNR requirement. by Android Partner Docs - 188344574 CDD: Updated section 3.8.10 Lock Screen Media Control to ... by Android Partner Docs - 188269274 by Android Partner Docs - 188268739 CDD: Relax Overview title count requirement. by Android Partner Docs - 188254167 Add AOSP links to Android & Pixel bulletins by Danielle Roberts - 188246295 by Android Partner Docs - 188243208 by Android Partner Docs - 188235190 Devsite localized content from translation request f764fc... by Android Partner Docs - 188213222 Add tag for Pixel C release for March 2018. by Android Partner Docs - 188209010 Devsite localized content from translation request 8fd2a1... by Android Partner Docs PiperOrigin-RevId: 189377827 Change-Id: I6f068548537b775ce3f2f086d87633726b1286b0 --- en/devices/tech/vts/setup.html | 198 ----------------------------------------- 1 file changed, 198 deletions(-) delete mode 100644 en/devices/tech/vts/setup.html (limited to 'en/devices/tech/vts/setup.html') diff --git a/en/devices/tech/vts/setup.html b/en/devices/tech/vts/setup.html deleted file mode 100644 index 79bc79d7..00000000 --- a/en/devices/tech/vts/setup.html +++ /dev/null @@ -1,198 +0,0 @@ - - - VTS Dashboard Setup - - - - - - -

-The VTS Dashboard provides a user backend and user interface for viewing test -results from the VTS continuous integration system. It supports test-driven -development with tools such as test status notifications to help developers to -locate and prevent regression areas during the development cycle (include test -monitoring and -triaging support). -

- -

-The user interface supports new features (such as native code coverage) provided -by the VTS infrastructure and enables the development of tools with optimized -and well-characterized performance by offering continuous performance -monitoring. -

- -

Requirements

-

-The following services are required to use the VTS Dashboard: -

- - -

-Viewing test -coverage relies on a REST API to a source code server (e.g. Gerrit), which -enables the web service to fetch original source code according to existing -access control lists. -

- -

Architecture

-

-The VTS Dashboard uses the following architecture: -

- -
Figure 1. VTS Dashboard architecture.
- -

-Test status results are continuously uploaded to the Cloud Datastore database -via a REST interface. The VTS runner automatically processes the results and -serializes them using the Protobuf format. -

-

-Web servlets form the primary access point for users, delivering and processing -data from the Datastore database. The servlets include: a main servlet for -delivering all of the tests, a preferences servlet for managing user favorites, -a results servlet for populating a test table, a graph servlet for preparing -profiling data, and a coverage servlet for preparing coverage data for the -client. -

-

-Each test module has its own Datastore ancestry tree and test results are -indexed with the Unix timestamp of the test start time. Coverage data in the -database is stored with the test results as a vector of counts (i.e. for each -line in the original source file) and identifying information to fetch the -source code from a source code server. -

-

-The notification service runs using task queues, identifying test case status -changes, and notifying subscribers. Stateful information is stored in a status -table to keep track of data freshness and existing failures. This allows for the -notification service to provide rich information about individual test case -failures and fixes. -

- -

Code structure

-

-VTS Dashboard essential components include the servlets implemented in Java, -the front-end JSPs, CSS stylesheets, and configuration files. The following list -details the locations and descriptions of these components (all paths relative -to test/vts/web/dashboard): -

-
    -
  • pom.xml
    Settings file where environment variables and -dependencies are defined.
  • -
  • src/main/java/com/android/vts/api/
    Contains endpoints for -interacting with the data via REST.
  • -
  • src/main/java/com/android/vts/entity/
    Contains Java models -of the Datastore entities.
  • -
  • src/main/java/com/android/vts/proto/
    Contains Java files -for Protobuf, including VtsReportMessage.java, which is a Java -implementation of Protobuf type used to describe VTS test results.
  • -
  • src/main/java/com/android/vts/servlet/
    Contains Java -files for servlets.
  • -
  • src/main/java/com/android/vts/util/
    Contains Java files -for utility functions and classes used by the servlets.
  • -
  • src/test/java/com/android/vts/
    Contains UI tests for the -servlets and utils.
  • -
  • src/main/webapp/
    Contains files related to the UI (JSP, -CSS, XML): -
      -
    • js/. Contains Javascript files used by the web pages.
    • -
    • WEB-INF/. Contains configuration and UI files.
    • -
    • jsp/. Contains the JSP files for each web page.
    • -
    -
  • -
  • appengine-web.xml
    Settings file where environment -variables are loaded into variables.
  • -
  • web.xml
    Settings file where servlet mappings and -security constraints are defined.
  • -
  • cron.xml
    Settings file defining scheduled tasks (i.e. -the notifications service).
  • -
- -

Setting up the Dashboard

-

-To set up the VTS Dashboard: -

-
    -
  1. Create a Google Cloud App Engine Project.
  2. -
  3. Set up the deployment host by installing: -
      -
    • Java 8
    • -
    • Google App Engine SDK
    • -
    • Maven
    • -
    -
  4. -
  5. Generate an OAuth 2.0 Client ID in the Google Cloud API Manager.
  6. -
  7. Create a Service Account and create a keyfile.
  8. -
  9. Add an email address to the App Engine Email API Authorized Senders List.
  10. -
  11. Set up a Google Analytics Account.
  12. -
  13. Specify environment variables in the Dashboard pom.xml: -
      -
    • Set the client ID with the OAuth 2.0 ID (from step 3).
    • -
    • Set the service client ID with the identifier included in the keyfile (from - step 4).
    • -
    • Specify the sender email address for alerts (from step 5).
    • -
    • Specify an email domain to which all emails will be sent.
    • -
    • Specify the address to the Gerrit REST server.
    • -
    • Specify the OAuth 2.0 scope to use for the Gerrit REST server.
    • -
    • Specify the Google Analytics ID (from step 6).
    • -
    • Build and deploy the project.
    • -
    -
  14. -
  15. In a terminal, run mvn clean appengine:update
  16. -
- -

-For more information regarding Dashboard setup and configuration, refer to the -Android -VTS Code Lab. -

- -

Security considerations

-

-Robust coverage information requires access to the original source code. -However, some code may be sensitive and an additional gateway to it may allow -for exploitation of existing access control lists. -

-

-To avoid this threat, instead of serving the source code with the coverage -information, the Dashboard directly handles a coverage vector (i.e., a vector of -execution counts mapping to the lines in a source file). Along with the coverage -vector, the Dashboard receives a Git project name and path so that the client -can fetch the code from an external source code API. The client browser receives -this information and uses cross-origin resource sharing (CORS) in Javascript to -query the source code server for the original source code; the resulting code is -combined with the coverage vector to produce a display. -

-

-This approach does not widen the attack surface because the Dashboard uses the -user's cookies to authenticate with an outside service. A user who cannot access -source code directly cannot exploit the Dashboard to view sensitive information. -

- - - -- cgit v1.2.3