最近遇到几个测试环境问题,由此整理以下xts测试对于环境的要求。(host端ubuntu测试机环境)
数据来自Google官网文档,截至2021年1月:CTS、GTS、VTS、CTS-on-GSI、TVTS、STS。
CTS:Setting up CTSCaution: CTS supports 64-bit linux and macOS host machines. CTS doesn't work on windows OS.
ADB and AAPTNote: For CTS 8.0, use version 1.0.39 of adb.
Before running the CTS, ensure that you have installed the recent versions of both Android Debug Bridge (adb) and Android Asset Packaging Tool (AAPT) and added the location of those tools to the system path of your machine.
To install ADB, download the Android SDK Tools package for your operating system, open it, and follow the instructions in the included README file. For troubleshooting information, see Installing the Stand-alone SDK Tools.
Ensure that adb
and aapt
are in your system path. The following command assumes that you've opened the package archive in your home directory:
export PATH=$PATH:$HOME/androID-sdk-linux/build-tools/version
Note: Ensure that your starting path and directory name are correct.
Java Development Kit for UbuntuInstall the proper version of Java Development Kit (JDK).
For AndroID 11, install OpenJDK11.For AndroID 9 and AndroID 10, install OpenJDK9.For AndroID 7.0, 7.1, 8.0 and 8.1, install OpenJDK8.For details, see the JDK requirements.
CTS filesDownload and open the CTS packages from Compatibility Test Suite Downloads matching your devices' AndroID version and all the application binary interfaces (ABIs) that your devices support.
Download and open the latest version of the CTS media files.
Device detectionFollow the step to set up your system to detect your device.
Memory limitYou might want to increase the maximum memory available during test run in the cts-tradfed script. Refer to example CL for more information.
GTS:Running GTSSet up the AndroID DeBUG BrIDge (adb) on the host machine (if needed)Make sure you have a recent copy of adb installed on your machine.
To install ADB, download the Android SDK Tools package for your operating system, open it, and follow the instructions in the included README file.
Ensure 'adb' is in your system path. For example:
export PATH=$PATH:$HOME/androID-sdk-linux/platform-tools/<version>
Google is adding the ability to customize GTS and other test suites to specific Partners. Customizations may relate to specific Partners devices and therefore test customizations are restricted to authorized partIEs. This also gives the ability to fix the logic (in case any issue) on the server without changing and releasing the GTS binary.
For more information on Business Logic, see the Business Logic page.
PrerequisitesPrior to executing the test, the following steps should be completed.
Get the authentication key file from your Google Account manager or your 3rd party lab.Save key file to a location accessible to host server.Set environment variable "APE_API_KEY" to the absolute path of the key file.export APE_API_KEY='path_to_key.Json'
DefaultIntentTest
test will fail if authentication is not correctly setup as follows:
run gts -m GtsPlacementTestCases -tcom.Google.androID.placement.gts.DefaultIntentTest#testDefaultIntentHandlers
If your testing environment is set up correctly, but you still see failures, verify that the product exists in the Android Partner Approvals Portal (APA). If a search for the product name does not appear in APA, you need to submit a GTS/CTS report to APA. This report does not need to be complete. It is recommended to follow the instructions for registering new products for provisional GMS testing so that your device is not treated as an uncertifIEd device. To create a report, run:
run cts -m CtsCurrentAPISignatureTestCases -tandroID.signature.cts.API.SignatureTest#testSignature
Do not skip device info collection.
VTS:Systems Testing With VTS/VTS-Treble ComplianceEstablishing a test environmentTo set up a testing environment:
Install Python development kit:sudo apt-get install python-dev
Install Protocol Buffer tools (for Python):
sudo apt-get install python-protobuf sudo apt-get install protobuf-compiler
Install Python virtual environment-related tools:
sudo apt-get install python-virtualenvsudo apt-get install python-pip
Setting up the hostTo setup a host machine to run VTS:
Follow the instructions for Setting Up the CTS.Setup the test environment as detailed in Systems Testing with VTS on source.androID.com.Download and unzip the VTS package.For running VTS for AndroID 10 or higher, make sure you have the following modules installed in your workstation:
Java 9Python 2.7 (Python Setuptools should be ≤ 44.0.0.)Python PIP 20.2.2 or highervirtualenv 20.0.27 or higherCTS-on-GSI:Running CTS-on-GSISetting up the hostTo setup a host machine to run CTS:
Follow the instructions for Setting Up the CTS.Ensure that you have the CTS test plan:For AndroID 8.0, download and unzip the CTS package.For AndroID 8.1 and higher, the CTS test plan for the GSI is included in the VTS package.TVTS:Using TVTSEnsure that AndroID SDK is installed and that the$PATH
variable includes the path to the directory for the adb
and aapt
executables.For more details on adb
, see the AndroID developer documentation on SDK tools.
important: As of 1.0 R2, running TVTS requires Java version 9/OpenJDK 1.9.
STS:Security Test SuiteSetting up STSSTS is similar to AndroID's Compatibility Test Suite. To get started with STS, follow the CTS setup instructions.
总结以上是内存溢出为你收集整理的XTS测试环境要求(Host端)全部内容,希望文章能够帮你解决XTS测试环境要求(Host端)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)