CN103077115B - A kind of compatibility testing platform building method and device - Google Patents
A kind of compatibility testing platform building method and device Download PDFInfo
- Publication number
- CN103077115B CN103077115B CN201310017921.4A CN201310017921A CN103077115B CN 103077115 B CN103077115 B CN 103077115B CN 201310017921 A CN201310017921 A CN 201310017921A CN 103077115 B CN103077115 B CN 103077115B
- Authority
- CN
- China
- Prior art keywords
- test
- cts
- android
- windows environment
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
本发明适用于测试领域,提供了一种兼容性测试平台搭建方法及装置,所述方法包括:生成用于windows环境的android-cts套件中的测试包,生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试;本发明,生成了适用于windows环境的CTS测试的测试包,从而实现了在windows环境下进行CTS测试,并生成CTS测试结果报告,给对linux环境不熟悉的测试人员提供了便利,更具人性化。
The present invention is applicable to the field of testing, and provides a method and device for building a compatibility testing platform. The method includes: generating a test package in an android-cts suite for a windows environment, and generating a test package for a compatibility test of a windows environment The control file is used for the compatibility test, and the compatibility test is a CTS test; the present invention generates a test package suitable for the CTS test of the windows environment, thereby realizing the CTS test under the windows environment and generating the CTS test result The report provides convenience and is more user-friendly for testers who are not familiar with the linux environment.
Description
技术领域technical field
本发明属于测试领域,尤其涉及一种兼容性测试平台搭建方法及装置。The invention belongs to the field of testing, in particular to a method and device for building a compatibility testing platform.
背景技术Background technique
兼容性测试工具(CompatibilityTestSuite,CTS)为Google设计的适用于Linux系统上的兼容性测试套件,用于在Linux系统中调用CTS套件进行CTS测试;但,测试人员通常是在Windows环境下进行日常CTS测试工作,因此,需要为每位CTS测试人员额外添加一台装有Linux系统并搭建好CTS环境的电脑以进行CTS测试,与此同时,又要求测试人员具备在Linux系统及命令终端下工作的基本操作技能,包括:Linux系统和Windows系统之间的文件及测试报告的传输,在上述两种不同的工作系统之间的切换,对于测试人员来说极其不方便,若上述两种不同的工作系统存在较远距离,将严重影响工作效率。The compatibility test tool (CompatibilityTestSuite, CTS) is a compatibility test suite for Linux systems designed by Google, which is used to call the CTS suite in the Linux system for CTS testing; however, testers usually perform daily CTS in the Windows environment Therefore, it is necessary for each CTS tester to add a computer equipped with Linux system and set up a CTS environment for CTS testing. At the same time, testers are required to have the ability to work under the Linux system and command terminal Basic operation skills, including: file and test report transfer between Linux system and Windows system, switching between the above two different working systems is extremely inconvenient for testers, if the above two different working systems The system has a long distance, which will seriously affect the work efficiency.
CTS套件是基于Java语言编写的,因此在Windows下进行过java工作环境的配置后正确调用,可以打开CTS控制台进行测试;但是,在Windows环境下进行CTS测试,测试过程中存在一些问题:部分测试包(例如:androidcore.vm-tests-tf)无法测试,可能会导致测试终断,无法继续执行,此时若强行关闭终端,对于android-cts-4.0版本以后的CTS套件将不能生成测试报告。The CTS suite is written based on the Java language, so it can be called correctly after configuring the java working environment under Windows, and the CTS console can be opened for testing; however, there are some problems in the testing process of the CTS test under the Windows environment: some The test package (for example: androidcore.vm-tests-tf) cannot be tested, which may cause the test to be terminated and cannot continue to be executed. At this time, if the terminal is forcibly closed, the test report cannot be generated for the CTS suite after android-cts-4.0 .
发明内容Contents of the invention
本发明实施例的目的在于提供兼容性测试平台搭建方法,以解决在windows环境下进行CTS测试时,部分测试包无法测试的问题。The purpose of the embodiments of the present invention is to provide a method for building a compatibility test platform, so as to solve the problem that some test packages cannot be tested when performing a CTS test in a windows environment.
本发明实施例是这样实现的,一种兼容性测试平台搭建方法,所述方法包括:The embodiment of the present invention is achieved in this way, a method for building a compatibility testing platform, the method comprising:
生成用于windows环境的android-cts套件中的测试包;Generate test packages in the android-cts suite for the windows environment;
生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试。A control file for a compatibility test of the windows environment is generated for the compatibility test, and the compatibility test is a CTS test.
本发明实施例的另一目的在于提供一种兼容性测试平台搭建装置,所述装置包括:Another object of the embodiments of the present invention is to provide a device for building a compatibility testing platform, which includes:
测试包生成单元,用于生成用于windows环境的android-cts套件中的测试包;The test package generation unit is used to generate the test package in the android-cts suite for the windows environment;
控制文件生成单元,用于生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试。The control file generation unit is used to generate the control file for the compatibility test of the windows environment for the compatibility test, and the compatibility test is a CTS test.
本发明提供了一种兼容性测试平台搭建方法及装置,所述方法包括:生成用于windows环境的android-cts套件中的测试包,生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试;在windows环境下进行CTS测试时,本发明针对部分无法适用于windows环境的CTS测试的测试包,生成了适用于windows环境的CTS测试的测试包,从而实现了在windows环境下完成CTS测试,并生成CTS测试结果报告,给对linux环境不熟悉的测试人员提供了便利,更具人性化。The present invention provides a method and device for building a compatibility testing platform. The method includes: generating a test package in an android-cts suite for a windows environment, and generating a control file for a compatibility test of a windows environment for use in Compatibility test, described compatibility test is CTS test; When carrying out CTS test under windows environment, the present invention has generated the test package applicable to the CTS test of windows environment for the test package of the CTS test that part cannot be applicable to windows environment , so as to complete the CTS test in the windows environment and generate the CTS test result report, which provides convenience for testers who are not familiar with the linux environment and is more user-friendly.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the descriptions of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only of the present invention. For some embodiments, those of ordinary skill in the art can also obtain other drawings based on these drawings without paying creative efforts.
图1是本发明实施例一提供的兼容性测试平台搭建方法的实现流程图;Fig. 1 is the implementation flowchart of the method for building a compatibility testing platform provided by Embodiment 1 of the present invention;
图2是本发明实施例二提供的兼容性测试平台搭建装置的组成结构图;Fig. 2 is a composition structure diagram of a compatibility test platform construction device provided by Embodiment 2 of the present invention;
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, specific examples are used below to illustrate.
实施例一:Embodiment one:
图1示出了本发明第一实施例提供的兼容性测试平台搭建实现流程,其过程详述如下:Fig. 1 shows the implementation process of building a compatibility testing platform provided by the first embodiment of the present invention, and the process is described in detail as follows:
步骤S101,生成用于windows环境的android-cts套件中的测试包。Step S101, generating a test package in the android-cts suite for the windows environment.
所述android-cts套件包括但不局限于android-cts-2.x.x套件、android-cts-4.0.x套件以及android-cts-4.1套件,其中x包括数字、字母以及其它用于标示的符号。The android-cts suite includes but not limited to android-cts-2.x.x suite, android-cts-4.0.x suite and android-cts-4.1 suite, where x includes numbers, letters and other symbols used for marking.
当电子产品开发出来,并定制了自己的Android系统后,需要通过最新的CTS测试,以保证应用程序能在该Android平台下正常运行;通过CTS测试后,将测试报告提交给Google,若取得androidmarket的认证,则经过CTS测试的应用程序在Android系统的应用过程中,更具优越性,有更好的用户体验。When an electronic product is developed and its own Android system is customized, it needs to pass the latest CTS test to ensure that the application program can run normally under the Android platform; after passing the CTS test, submit the test report to Google. Certification, the application program that has passed the CTS test is more superior and has a better user experience in the application process of the Android system.
android-cts套件是一款通过命令行操作的CTS测试工具。但目前,android-cts套件没有提供windows环境的测试版本。The android-cts suite is a CTS testing tool operated through the command line. But at present, the android-cts suite does not provide a test version for the windows environment.
步骤S101生成用于windows环境的android-cts套件中的测试包,尤其是生成部分适用于linux环境的但不适用于windows环境的测试包,例如:ndroid.core.vm-tests-tf测试包。Step S101 generates test packages in the android-cts suite for windows environment, especially some test packages suitable for linux environment but not for windows environment, for example: ndroid.core.vm-tests-tf test package.
优选的是,在步骤S101之前,预先在windows环境下安装java并配置java环境以搭建CTS测试平台以及CTS测试,所述java可以包括java1.6及以上版本。Preferably, before step S101, java is pre-installed in the windows environment and the java environment is configured to build a CTS test platform and a CTS test. The java may include java1.6 and above.
作为本发明一实施例,所述生成用于windows环境的android-cts套件中的测试包的步骤,还可以包括:As an embodiment of the present invention, the step of generating the test package used in the android-cts suite of windows environment may also include:
生成用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包。Generate the android.core.vm-tests-tf test package in the android-cts suite for the windows environment.
生成适用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包,并重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,可以实现在设备的/data/local/tmp/vm-tests目录下创建dalvik-cache目录等操作,以实现windows环境下对android.core.vm-tests-tf测试包的CTS测试。After generating the android.core.vm-tests-tf test package in the android-cts suite suitable for the windows environment, and recompiling and generating the control file for the compatibility test, during the test process of the CTS test in the windows environment, it can be realized in Create the dalvik-cache directory in the /data/local/tmp/vm-tests directory of the device, etc., to realize the CTS test of the android.core.vm-tests-tf test package in the windows environment.
优选的是,可以预先获取修改后的适用于windows环境的VMHostTest.java文件,然后生成适用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包。Preferably, the modified VMHostTest.java file suitable for the windows environment can be obtained in advance, and then the android.core.vm-tests-tf test package in the android-cts suite suitable for the windows environment can be generated.
作为本发明一实施例,所述生成用于windows环境的android-cts套件中的测试包的步骤,还可以包括:As an embodiment of the present invention, the step of generating the test package used in the android-cts suite of windows environment may also include:
生成用于windows环境的android-cts套件中的android.nativemeida测试包。Generate the android.nativemeida test package in the android-cts suite for the windows environment.
生成适用于windows环境的android-cts套件中的android.nativemeida测试包,并重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,可以实现在设备的/data/local/tmp目录下创建cts-native-tests目录等操作以及实现传输相关测试文件到cts-native-tests目下等操作,以实现windows环境下对android.nativemeida测试包的CTS测试。Generate the android.nativemeida test package in the android-cts suite suitable for the windows environment, and recompile and generate the control file for the compatibility test. During the test process of the CTS test in the windows environment, it can be realized in /data/local of the device Create the cts-native-tests directory in the /tmp directory and implement operations such as transferring relevant test files to the cts-native-tests directory, so as to realize the CTS test of the android.nativemeida test package in the windows environment.
优选的是,可以预先获取修改后的适用于windows环境的GeeTest.java文件,然后生成修改后的适用于windows环境的android-cts套件中的android.nativemeida测试包。Preferably, the modified GeeTest.java file suitable for the windows environment can be obtained in advance, and then the modified android.nativemeida test package in the android-cts suite suitable for the windows environment can be generated.
作为本发明一实施例,所述生成用于windows环境的android-cts套件中的测试包的步骤,还可以包括:As an embodiment of the present invention, the step of generating the test package used in the android-cts suite of windows environment may also include:
生成用于windows环境的android-cts套件中的android.nativemeida.s1测试包和android.nativemeida.xa测试包。Generate the android.nativemeida.s1 test package and android.nativemeida.xa test package in the android-cts suite for the windows environment.
在android-cts-4.1套件中,获取修改后的适用于windows环境的CTS测试的VMHostTest.java文件和GeeTest.java文件,重新生成android.nativemeida.s1测试包和android.nativemeida.xa测试包,并重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,可以实现在设备的/data/local/tmp目录下创建cts-native-tests目录等操作以及实现传输相关测试文件到cts-native-tests目下等操作,以实现windows环境下对android.nativemeida.s1测试包和android.nativemeida.xa测试包的CTS测试。In the android-cts-4.1 suite, obtain the modified VMHostTest.java file and GeeTest.java file for the CTS test in the windows environment, regenerate the android.nativemeida.s1 test package and the android.nativemeida.xa test package, and After recompiling and generating the control file for the compatibility test, during the test process of the CTS test in the windows environment, operations such as creating the cts-native-tests directory under the /data/local/tmp directory of the device and transmitting related test files can be realized Go to the cts-native-tests item, etc., to realize the CTS test of the android.nativemeida.s1 test package and the android.nativemeida.xa test package in the windows environment.
步骤S102,生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试。Step S102, generating a control file for the compatibility test of the windows environment for the compatibility test, and the compatibility test is a CTS test.
所述兼容性测试的控制文件,可以为:cts-tradefed.jar文件或cts-tradefed-4.0.x.jar或cts-tradefed-4.1.x.jar等用于兼容性测试的控制文件。The control file for the compatibility test may be: cts-tradefed.jar file or cts-tradefed-4.0.x.jar or cts-tradefed-4.1.x.jar and other control files for compatibility testing.
在完成步骤S101后,重新编译并生成兼容性测试的控制文件,实现windows环境下的CTS测试;更优的是,将重新生成的兼容性测试的控制文件替换原来的兼容性测试的控制文件,或删除原来的兼容性测试的控制文件,或修改原来的兼容性测试的控制文件的文件名等操作,以实现该目录下只存在所述重新生成的兼容性测试的控制文件,不存在重名的其它兼容性测试的控制文件,以免影响windows环境下的CTS测试。After completing step S101, recompile and generate the control file of the compatibility test to realize the CTS test under the windows environment; more optimally, replace the control file of the original compatibility test with the control file of the regenerated compatibility test, Or delete the control file of the original compatibility test, or modify the file name of the control file of the original compatibility test, etc., so that only the control file of the regenerated compatibility test exists in this directory, and there is no duplicate name Control files for other compatibility tests, so as not to affect the CTS test in the windows environment.
另外,优选的是,为了实现CTS测试在windows环境下更正常地进行,可以重新配置${JAR_PATH}变量和${CTS_ROOT}变量以实现windows环境下的CTS测试、修改后生成适用于windows环境下的批处理运行java文件的语法以及生成用于windows环境下快速启动CTS测试的cts-tradefed.bat的批处理文件等。In addition, preferably, in order to realize that the CTS test is carried out more normally in the windows environment, the ${JAR_PATH} variable and the ${CTS_ROOT} variable can be reconfigured to realize the CTS test in the windows environment, and the modified generation is suitable for the windows environment. The syntax of the batch running java file and the batch file for generating the cts-tradefed.bat used to quickly start the CTS test in the windows environment, etc.
作为本发明一实施例,所述生成用于windows环境的兼容性测试的控制文件以用于兼容性测试的步骤之后,所述方法还可以包括:As an embodiment of the present invention, after the step of generating the control file for the compatibility test of the windows environment for the compatibility test, the method may also include:
生成用于启动CTS测试控制台的批处理文件;Generate a batch file for launching the CTS test console;
生成安装与CTS测试相关的apk的批处理文件;Generate a batch file for installing the apk related to the CTS test;
生成上传媒体测试资源到设备指定目录的批处理文件;Generate a batch file for uploading media test resources to the specified directory of the device;
生成下载android-cts套件的批处理文件;Generate a batch file for downloading the android-cts suite;
生成下载媒体测试资源的批处理文件;Generate a batch file for downloading media test resources;
生成同步CTS测试平台的批处理文件。Generate a batch file for synchronizing the CTS testbench.
为了更好地、方便地实现windows环境下的CTS测试,预先生成用于启动CTS测试控制台的批处理文件:cts-tradefed.bat(通过cts-tradefed.bat可以调用兼容性测试的控制文件及android-cts套件/tools目录下的jar格式文件)。In order to better and conveniently realize the CTS test in the windows environment, a batch file for starting the CTS test console is pre-generated: cts-tradefed.bat (the control file of the compatibility test and the jar format file under the android-cts suite/tools directory).
生成安装与CTS测试相关的apk的批处理文件:cts-apk.bat。Generate a batch file for installing the apk related to the CTS test: cts-apk.bat.
生成上传媒体测试资源到设备指定目录的批处理文件:push-media.bat。Generate a batch file for uploading media test resources to the specified directory of the device: push-media.bat.
生成下载android-cts套件的批处理文件down-cts.bat。Generate the batch file down-cts.bat for downloading the android-cts suite.
生成下载媒体测试资源的批处理文件down-media.bat。Generate a batch file down-media.bat for downloading media test resources.
生成同步CTS测试平台的批处理文件sync.bat。Generate the batch file sync.bat for synchronizing the CTS test platform.
生成启动GTS测试控制台的批处理文件:gts-tradefed.bat(通过gts-tradefed.bat调用GTS测试相关的jar格式文件)。Generate a batch file for starting the GTS test console: gts-tradefed.bat (call GTS test-related jar format files through gts-tradefed.bat).
生成清除CTS测试的生成文件的批处理文件:clear.bat(通过clear.bat消除所述CTS测试的生成文件对重复CTS测试的影响)。Generate a batch file for clearing the generated files of the CTS test: clear.bat (eliminate the influence of the generated files of the CTS test on repeated CTS tests through clear.bat).
生成下载android-cts套件、GTS套件、多媒体测试资源的批处理文件:downlist.bat。Generate a batch file for downloading android-cts suite, GTS suite, and multimedia test resources: downlist.bat.
优选的是,还生成了快速进入测试平台入口的批处理文件:start.bat;以及还生成了适用于windows环境的其它辅助性的文件,包括但不限于:cts-tradefed-4.0.x.jar、cts-tradefed-4.1.x.jar、adb.exe、cmd.exe、ls.exe、vi.exe、scp.exe、rm.exe、mv.exe、chmod.exe等;并将上述的辅助性的文件统一放置在“CtsTool/tools”目录下,将start.bat批处理文件放置在“CtsTool/”目录下。因为部分windows系统cmd命令终端不支持CTS测试平台,通过cmd.exe程序可以让CTS测试平台不使用windows系统自带的cmd命令终端;通过adb.exe程序可省去用户再安装并配置adb环境。通过上述命令文件和上述批处理文件等文件之间的相互巧妙调用,实现Windows环境下简易CTS测试。更优的是,预先在windows环境下安装java1.6及以上版本以进行CTS测试。Preferably, a batch file that quickly enters the test platform entry is also generated: start.bat; and other auxiliary files suitable for the windows environment are also generated, including but not limited to: cts-tradefed-4.0.x.jar , cts-tradefed-4.1.x.jar, adb.exe, cmd.exe, ls.exe, vi.exe, scp.exe, rm.exe, mv.exe, chmod.exe, etc.; and the above auxiliary All files are placed in the "CtsTool/tools" directory, and the start.bat batch file is placed in the "CtsTool/" directory. Because some windows system cmd command terminals do not support the CTS test platform, the cmd.exe program can make the CTS test platform not use the cmd command terminal that comes with the windows system; the adb.exe program can save the user from installing and configuring the adb environment. The simple CTS test under the Windows environment is realized through ingenious calls between the above-mentioned command files and the above-mentioned batch files and other files. Even better, install java1.6 and above in the windows environment in advance for CTS testing.
本实施例提供了兼容性测试平台搭建方法,通过生成用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包、生成用于windows环境的android-cts套件中的android.nativemeida测试包以及生成用于windows环境的android-cts套件中的android.nativemeida.s1测试包和android.nativemeida.xa测试包等适用于windows环境下的CTS测试的测试包,重新编译并生成用于windows环境的兼容性测试的控制文件,实现windows环境下的CTS测试以生成测试结果报告,通过生成用于CTS测试的批处理文件以简化windows环境下的CTS测试;本实施例提供的方法给对linux环境不熟悉的测试人员提供了便利,更具人性化。This embodiment provides a method for building a compatibility testing platform, by generating the android.core.vm-tests-tf test package used in the android-cts suite of the windows environment, and generating the android The .nativemeida test package and the android.nativemeida.s1 test package and the android.nativemeida.xa test package in the android-cts suite generated for the windows environment are suitable for the CTS test in the windows environment. Recompile and generate Based on the control file of the compatibility test in the windows environment, realize the CTS test under the windows environment to generate a test result report, and simplify the CTS test under the windows environment by generating a batch file for the CTS test; the method provided by this embodiment is given to It provides convenience and is more user-friendly for testers who are not familiar with the linux environment.
实施例二:Embodiment two:
图2示出了本发明第二实施例提供的兼容性测试平台搭建装置的组成结构,为了便于描述,仅示出了与本发明实施例相关的部分。FIG. 2 shows the composition and structure of the compatibility test platform construction device provided by the second embodiment of the present invention. For the convenience of description, only the parts related to the embodiment of the present invention are shown.
该兼容性测试平台搭建装置可以是运行于各终端设备(例如电脑)内的软件单元、硬件单元或者软硬件相结合的单元,也可以作为独立的挂件集成到所述终端设备中或者运行于所述终端设备的应用系统中。The device for building the compatibility test platform can be a software unit, a hardware unit, or a combination of software and hardware running in each terminal device (such as a computer), or it can be integrated into the terminal device as an independent pendant or run on the terminal device. In the application system of the terminal equipment.
本实施例提供了兼容性测试平台搭建装置,可以包括测试包生成单元21以及控制文件生成单元22,其中各功能单元详述如下:The present embodiment provides a device for building a compatibility test platform, which may include a test package generation unit 21 and a control file generation unit 22, wherein each functional unit is described in detail as follows:
测试包生成单元21,用于生成用于windows环境的android-cts套件中的测试包。The test package generation unit 21 is used to generate the test package in the android-cts suite for the windows environment.
在本实施例中,所述android-cts套件包括但不局限于android-cts-2.x.x套件、android-cts-4.0.x套件以及android-cts-4.1套件,其中x包括数字、字母以及其它用于标示的符号。In this embodiment, the android-cts suite includes but is not limited to android-cts-2.x.x suite, android-cts-4.0.x suite and android-cts-4.1 suite, where x includes numbers, letters and others Symbols used for labeling.
测试包生成单元21生成用于windows环境的android-cts套件中的测试包,尤其是生成部分适用于linux环境的但不适用于windows环境的测试包,例如:ndroid.core.vm-tests-tf测试包。The test package generation unit 21 generates the test packages used in the android-cts suite of the windows environment, especially the test packages that are partly suitable for the linux environment but not suitable for the windows environment, for example: ndroid.core.vm-tests-tf test package.
作为本发明一实施例,所述测试包生成单元21,还可以包括:As an embodiment of the present invention, the test package generation unit 21 may also include:
core.vm-tests-tf生成单元211,用于生成用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包。The core.vm-tests-tf generation unit 211 is used to generate the android.core.vm-tests-tf test package in the android-cts suite for the windows environment.
core.vm-tests-tf生成单元211生成修改后的适用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包;在重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,core.vm-tests-tf生成单元211可以实现在设备的/data/local/tmp/vm-tests目录下创建dalvik-cache目录等操作,以实现windows环境下对android.core.vm-tests-tf测试包的CTS测试。core.vm-tests-tf generating unit 211 generates the modified android.core.vm-tests-tf test package applicable to the android-cts suite of windows environment; During the test process of the CTS test in the windows environment, the core.vm-tests-tf generation unit 211 can implement operations such as creating the dalvik-cache directory in the /data/local/tmp/vm-tests directory of the device, so as to realize the CTS tests for the android.core.vm-tests-tf test package.
优选的是,core.vm-tests-tf生成单元211可以预先获取适用于windows环境的VMHostTest.java文件,然后生成适用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包。Preferably, the core.vm-tests-tf generation unit 211 can pre-acquire the VMHostTest.java file suitable for the windows environment, and then generate the android.core.vm-tests-tf test in the android-cts suite suitable for the windows environment Bag.
优选的是,在测试包生成单元21之前,预先在windows环境下安装java并配置java环境以搭建CTS测试平台以及CTS测试,所述java可以包括java1.6及以上版本。Preferably, before the test package generation unit 21, java is pre-installed in the windows environment and the java environment is configured to build a CTS test platform and CTS test, and the java may include java1.6 and above.
作为本发明一实施例,所述测试包生成单元21,还可以包括:As an embodiment of the present invention, the test package generation unit 21 may also include:
第一nativemeida生成单元212,用于生成用于windows环境的android-cts套件中的android.nativemeida测试包。The first nativemeida generation unit 212 is used to generate the android.nativemedia test package in the android-cts suite for the windows environment.
在本实施例中,第一nativemeida生成单元212生成修改后的适用于windows环境的android-cts套件中的android.nativemeida测试包,并重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,可以实现在设备的/data/local/tmp目录下创建cts-native-tests目录等操作以及实现传输相关测试文件到cts-native-tests目下等操作,以实现windows环境下对android.nativemeida测试包的CTS测试。In this embodiment, the first nativemeida generation unit 212 generates the android.nativemedia test package in the android-cts suite suitable for the windows environment after modification, and recompiles and generates the control file for the compatibility test, and then performs CTS in the windows environment During the testing process, operations such as creating the cts-native-tests directory in the /data/local/tmp directory of the device and transferring related test files to the cts-native-tests directory can be realized, so as to realize the CTS test of android.nativemeida test package.
优选的是,第一nativemeida生成单元212可以预先获取适用于windows环境的GeeTest.java文件,然后生成适用于windows环境的android-cts套件中的android.nativemeida测试包。Preferably, the first nativemeida generating unit 212 can pre-acquire the GeeTest.java file suitable for the windows environment, and then generate the android.nativemedia test package in the android-cts suite suitable for the windows environment.
作为本发明一实施例,所述测试包生成单元21,还可以包括:As an embodiment of the present invention, the test package generation unit 21 may also include:
第二nativemeida生成单元213,用于生成用于windows环境的android-cts套件中的android.nativemeida.s1测试包和android.nativemeida.xa测试包。The second nativemeida generation unit 213 is used to generate the android.nativemeida.s1 test package and the android.nativemeida.xa test package in the android-cts suite for the windows environment.
在android-cts-4.1套件中,第二nativemeida生成单元213获取修改后的适用于windows环境的CTS测试的VMHostTest.java文件和GeeTest.java文件,重新生成android.nativemeida.s1测试包和android.nativemeida.xa测试包;在重新编译生成兼容性测试的控制文件后,在windows环境进行CTS测试的测试过程中,可以实现在设备的/data/local/tmp目录下创建cts-native-tests目录等操作以及实现传输相关测试文件到cts-native-tests目下等操作,以实现windows环境下对android.nativemeida.s1测试包和android.nativemeida.xa测试包的CTS测试。In the android-cts-4.1 suite, the second nativemeida generation unit 213 obtains the modified VMHostTest.java file and GeeTest.java file suitable for the CTS test of the windows environment, and regenerates the android.nativemeida.s1 test package and android.nativemeida .xa test package; after recompiling and generating the control file for the compatibility test, during the test process of the CTS test in the windows environment, operations such as creating the cts-native-tests directory in the /data/local/tmp directory of the device can be realized And realize the operation of transferring related test files to the cts-native-tests directory, so as to realize the CTS test of the android.nativemeida.s1 test package and the android.nativemeida.xa test package in the windows environment.
控制文件生成单元22,用于生成用于windows环境的兼容性测试的控制文件以用于兼容性测试,所述兼容性测试为CTS测试。The control file generating unit 22 is configured to generate a control file for a compatibility test of the windows environment for the compatibility test, and the compatibility test is a CTS test.
所述兼容性测试的控制文件,可以为:cts-tradefed.jar文件或cts-tradefed-4.0.x.jar或cts-tradefed-4.1.x.jar等用于兼容性测试的控制文件。The control file for the compatibility test may be: cts-tradefed.jar file or cts-tradefed-4.0.x.jar or cts-tradefed-4.1.x.jar and other control files for compatibility testing.
在测试包生成单元21生成完用于windows环境的android-cts套件中的测试包后,控制文件生成单元22重新编译并生成兼容性测试的控制文件,实现windows环境下的CTS测试;更优的是,控制文件生成单元22将重新生成放入兼容性测试的控制文件替换原来的兼容性测试的控制文件,或删除原来的兼容性测试的控制文件,或修改原来的兼容性测试的控制文件的文件名等操作,以实现该目录下只存在所述重新生成的兼容性测试的控制文件,不存在重名的其它兼容性测试的控制文件,以免影响windows环境下的CTS测试。After the test package generation unit 21 has generated the test package used in the android-cts suite of the windows environment, the control file generation unit 22 recompiles and generates the control file of the compatibility test to realize the CTS test under the windows environment; more optimal Yes, the control file generation unit 22 will regenerate the control file that is put into the compatibility test to replace the original control file of the compatibility test, or delete the original control file of the compatibility test, or modify the original control file of the compatibility test. File names and other operations, so as to realize that only the control file of the regenerated compatibility test exists in the directory, and there is no control file of other compatibility tests with the same name, so as not to affect the CTS test under the windows environment.
另外,优选的是,为了实现CTS测试在windows环境下更正常地进行,可以重新配置${JAR_PATH}变量和${CTS_ROOT}变量以实现windows环境下的CTS测试、生成适用于windows环境下的批处理运行java文件的语法以及生成用于windows环境下快速启动CTS测试的cts-tradefed.bat的批处理文件等。In addition, preferably, in order to realize that the CTS test is carried out more normally in the windows environment, the ${JAR_PATH} variable and the ${CTS_ROOT} variable can be reconfigured to realize the CTS test in the windows environment and generate batches suitable for the windows environment. Handle the syntax of running the java file and generate the batch file of cts-tradefed.bat for quickly starting the CTS test in the windows environment, etc.
作为本发明一实施例,所述装置还可以包括:As an embodiment of the present invention, the device may also include:
批处理文件生成单元23,用于生成用于启动CTS测试控制台的批处理文件,生成安装与CTS测试相关的apk的批处理文件,生成下载android-cts套件的批处理文件,生成上传媒体测试资源到设备指定目录的批处理文件,生成下载媒体测试资源的批处理文件,生成同步CTS测试平台的批处理文件。Batch file generation unit 23 is used to generate a batch file for starting the CTS test console, generates a batch file for installing the apk relevant to the CTS test, generates a batch file for downloading the android-cts suite, and generates an upload media test A batch file for transferring resources to the specified directory of the device, generating a batch file for downloading media test resources, and generating a batch file for synchronizing the CTS test platform.
为了更好地、方便地实现windows环境下的CTS测试,批处理文件生成单元23预先生成用于启动CTS测试控制台的批处理文件:cts-tradefed.bat(通过cts-tradefed.bat可以对兼容性测试的控制文件以及android-cts套件/tools目录下的jar格式文件的调用)。In order to better and conveniently realize the CTS test under the windows environment, the batch file generation unit 23 pre-generates the batch file used to start the CTS test console: cts-tradefed.bat (through cts-tradefed.bat can be compatible with The control file of the performance test and the call of the jar format file in the android-cts suite/tools directory).
批处理文件生成单元23生成安装与CTS测试相关的apk的批处理文件:cts-apk.bat。The batch file generation unit 23 generates a batch file: cts-apk.bat for installing the apk related to the CTS test.
批处理文件生成单元23生成上传媒体测试资源到设备指定目录的批处理文件:push-media.bat。The batch file generation unit 23 generates a batch file: push-media.bat for uploading media test resources to the specified directory of the device.
批处理文件生成单元23生成下载android-cts套件的批处理文件down-cts.bat。The batch file generation unit 23 generates a batch file down-cts.bat for downloading the android-cts suite.
批处理文件生成单元23生成下载媒体测试资源的批处理文件down-media.bat。The batch file generation unit 23 generates a batch file down-media.bat for downloading media test resources.
批处理文件生成单元23生成同步CTS测试平台的批处理文件sync.bat。The batch file generation unit 23 generates a batch file sync.bat for synchronizing the CTS test platform.
批处理文件生成单元23生成启动GTS测试控制台的批处理文件:gts-tradefed.bat(通过gts-tradefed.bat调用GTS测试相关的jar格式文件)。The batch file generation unit 23 generates a batch file for starting the GTS test console: gts-tradefed.bat (the jar format file related to the GTS test is invoked through gts-tradefed.bat).
批处理文件生成单元23生成清除CTS测试的生成文件的批处理文件:clear.bat(通过clear.bat消除所述CTS测试的生成文件对重复CTS测试的影响)。The batch file generating unit 23 generates a batch file for clearing the generated file of the CTS test: clear.bat (eliminate the influence of the generated file of the CTS test on repeated CTS tests through clear.bat).
批处理文件生成单元23生成下载android-cts套件、GTS套件、多媒体测试资源的批处理文件:downlist.bat。The batch file generation unit 23 generates a batch file for downloading the android-cts suite, the GTS suite, and multimedia test resources: downlist.bat.
优选的是,批处理文件生成单元23还生成了快速进入测试平台入口的批处理文件:start.bat;以及,批处理文件生成单元23还生成了适用于windows环境的其它辅助性的文件,包括:cts-tradefed-4.0.x.jar、cts-tradefed-4.1.x.jar、adb.exe、cmd.exe、ls.exe、vi.exe、scp.exe、rm.exe、mv.exe、chmod.exe等;批处理文件生成单元23并将上述的辅助性的文件统一放置在“CtsTool/tools”目录下,将start.bat批处理文件放置在“CtsTool/”目录下。因为部分windows系统cmd命令终端不支持CTS测试平台,通过cmd.exe程序可以让CTS测试平台不使用windows系统自带的cmd命令终端;通过adb.exe程序可省去用户再安装并配置adb环境。通过上述命令文件和上述批处理文件等文件之间的相互巧妙调用,实现Windows环境下简易CTS测试。更优的是,预先在windows环境下安装java1.6及以上版本以进行CTS测试。Preferably, the batch file generating unit 23 has also generated a batch file that quickly enters the test platform entry: start.bat; and, the batch file generating unit 23 has also generated other auxiliary files applicable to the windows environment, including : cts-tradefed-4.0.x.jar, cts-tradefed-4.1.x.jar, adb.exe, cmd.exe, ls.exe, vi.exe, scp.exe, rm.exe, mv.exe, chmod .exe, etc.; the batch file generation unit 23 places the above-mentioned auxiliary files in the "CtsTool/tools" directory, and places the start.bat batch file in the "CtsTool/" directory. Because some windows system cmd command terminals do not support the CTS test platform, the cmd.exe program can make the CTS test platform not use the cmd command terminal that comes with the windows system; the adb.exe program can save the user from installing and configuring the adb environment. The simple CTS test under the Windows environment is realized through ingenious calls between the above-mentioned command files and the above-mentioned batch files and other files. Even better, install java1.6 and above in the windows environment in advance for CTS testing.
本实施例提供了一种兼容性测试平台搭建装置,通过core.vm-tests-tf生成单元生成用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包、第一nativemeida生成单元生成用于windows环境的android-cts套件中的android.nativemeida测试包以及第二nativemeida生成单元生成用于windows环境的android-cts套件中的android.nativemeida.s1测试包和android.nativemeida.xa测试包等适用于windows环境下的CTS测试的测试包,控制文件生成单元重新编译并生成用于windows环境的兼容性测试的控制文件,实现windows环境下的CTS测试以生成测试结果报告;效果更佳的是,批处理文件生成单元生成用于CTS测试的批处理文件以简化windows环境下的CTS测试;本实施例提供的装置给对linux环境不熟悉的测试人员提供了便利,更具人性化。This embodiment provides a device for building a compatibility test platform, which generates the android.core.vm-tests-tf test package in the android-cts suite for the windows environment through the core.vm-tests-tf generation unit, the first The nativemeida generation unit generates the android.nativemeida test package in the android-cts suite for the windows environment and the second nativemeida generation unit generates the android.nativemeida.s1 test package and android.nativemeida in the android-cts suite for the windows environment. The xa test package and other test packages suitable for the CTS test under the windows environment, the control file generation unit recompiles and generates the control file for the compatibility test of the windows environment, and realizes the CTS test under the windows environment to generate a test result report; effect Even better, the batch file generating unit generates batch files for CTS testing to simplify the CTS testing under the windows environment; the device provided in this embodiment provides convenience to testers who are not familiar with the linux environment and is more humane change.
本发明实施例提供了一种兼容性测试平台搭建方法及装置,通过预先配置${JAR_PATH}变量和${CTS_ROOT}变量以实现windows环境下的CTS测试,并修改后生成适用于windows环境下的批处理运行java文件的语法,生成用于windows环境的android-cts套件中的android.core.vm-tests-tf测试包、生成用于windows环境的android-cts套件中的android.nativemeida测试包以及生成用于windows环境的android-cts套件中的android.nativemeida.s1测试包和android.nativemeida.xa测试包等适用于windows环境下的CTS测试的测试包,重新编译并生成用于windows环境的兼容性测试的控制文件,实现windows环境下的CTS测试以生成测试结果报告,更优的是,通过生成用于CTS测试的批处理文件以简化windows环境下的CTS测试;本发明实施例为对linux环境不熟悉的测试人员提供了便利,更具人性化。The embodiment of the present invention provides a method and device for building a compatibility testing platform. By pre-configuring the ${JAR_PATH} variable and the ${CTS_ROOT} variable, the CTS test in the windows environment is realized, and a modified version is generated that is suitable for the windows environment. The syntax of batch running java files, generating the android.core.vm-tests-tf test package in the android-cts suite for the windows environment, generating the android.nativemeida test package in the android-cts suite for the windows environment, and Generate the android.nativemeida.s1 test package and android.nativemeida.xa test package in the android-cts suite for the windows environment, which are suitable for the CTS test in the windows environment, recompile and generate a compatible test package for the windows environment The control file of performance test realizes the CTS test under the windows environment to generate the test result report, more optimally, by generating the batch file for CTS test to simplify the CTS test under the windows environment; the embodiment of the present invention is for linux It provides convenience for testers who are not familiar with the environment and is more user-friendly.
本领域技术人员可以理解为上述实施例二包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。Those skilled in the art can understand that the various units included in the above-mentioned embodiment 2 are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are also It is only for the convenience of distinguishing each other, and is not intended to limit the protection scope of the present invention.
本领域普通技术人员还可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以在存储于一计算机可读取存储介质中,所述的存储介质,包括ROM/RAM、磁盘、光盘等。Those of ordinary skill in the art can also understand that all or part of the steps in the method of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, so The storage medium mentioned above includes ROM/RAM, magnetic disk, optical disk, etc.
以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下做出若干等同替代或明显变型,而且性能或用途相同,都应当视为属于本发明由所提交的权利要求书确定的专利保护范围。The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be assumed that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field to which the present invention belongs, several equivalent substitutions or obvious modifications are made without departing from the concept of the present invention, and the performance or use is the same, all should be regarded as belonging to the present invention by the submitted claims The scope of patent protection determined by the book.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310017921.4A CN103077115B (en) | 2013-01-17 | 2013-01-17 | A kind of compatibility testing platform building method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310017921.4A CN103077115B (en) | 2013-01-17 | 2013-01-17 | A kind of compatibility testing platform building method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103077115A CN103077115A (en) | 2013-05-01 |
CN103077115B true CN103077115B (en) | 2015-12-23 |
Family
ID=48153648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310017921.4A Expired - Fee Related CN103077115B (en) | 2013-01-17 | 2013-01-17 | A kind of compatibility testing platform building method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103077115B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3136242A1 (en) | 2015-08-27 | 2017-03-01 | Google, Inc. | Systems and methods for device compatibility testing and reporting |
CN105335292A (en) * | 2015-11-12 | 2016-02-17 | 广州华多网络科技有限公司 | Application compatibility testing method and system |
US20180060221A1 (en) * | 2016-08-24 | 2018-03-01 | Google Inc. | Multi-layer test suite generation |
CN109039644B (en) * | 2018-06-29 | 2021-09-24 | 漳州万利达科技有限公司 | TEE authentication key detection method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100218168A1 (en) * | 2009-02-23 | 2010-08-26 | Gonzales Ii Jesus Orlando | System and Method for Generating a Test Environment Script File |
CN102110053A (en) * | 2011-03-18 | 2011-06-29 | 广东欧珀移动通信有限公司 | Random testing method based on Android |
CN102289374A (en) * | 2011-08-31 | 2011-12-21 | 中兴通讯股份有限公司 | Method and device for constructing cross-platform software running environment |
-
2013
- 2013-01-17 CN CN201310017921.4A patent/CN103077115B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100218168A1 (en) * | 2009-02-23 | 2010-08-26 | Gonzales Ii Jesus Orlando | System and Method for Generating a Test Environment Script File |
CN102110053A (en) * | 2011-03-18 | 2011-06-29 | 广东欧珀移动通信有限公司 | Random testing method based on Android |
CN102289374A (en) * | 2011-08-31 | 2011-12-21 | 中兴通讯股份有限公司 | Method and device for constructing cross-platform software running environment |
Non-Patent Citations (1)
Title |
---|
王黨軍.Windows 环境android CTS 配置.《Windows 环境android CTS 配置》.2012,第1-2页. * |
Also Published As
Publication number | Publication date |
---|---|
CN103077115A (en) | 2013-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8612947B2 (en) | System and method for remotely compiling multi-platform native applications for mobile devices | |
WO2017185606A1 (en) | Overlay mechanism-based apk development method and system | |
CN104281518A (en) | Terminal application test method, device, system and platform and mobile terminal | |
CN105159732B (en) | In mobile terminal installation or the method and mobile terminal of more new application | |
CN104298534B (en) | Programmed method and device based on Lua language | |
CN102662648B (en) | A kind of embedded software developing emulation platform of communicating terminal and application thereof | |
CN103077115B (en) | A kind of compatibility testing platform building method and device | |
CN106020877A (en) | Automatic update method and apparatus for system environment configuration | |
CN111209001A (en) | Method, system, equipment and medium for batch generation of APKs of android channels | |
CN108762761A (en) | Generation method, device, server and the storage medium of target channel packet | |
CN111611008A (en) | A software code packaging and deployment method, device, device and storage medium | |
CN103152327A (en) | Configuration method, client and system for plug-in unit compressing and uncompressing | |
CN102446090A (en) | Automatic generation method and device of test script | |
CN111596951A (en) | Method and device for configuring engineering file | |
CN102955739B (en) | A kind of method improving performance test script reuse rate | |
KR102141749B1 (en) | APP program execution method and device | |
CN106649081B (en) | A kind of method and device that commissioning test wraps offline in client application | |
CN104063306B (en) | Automatic logging method, device and system in intelligent terminal software test | |
CN114035786A (en) | Dependency-based micro-front-end compatible migration method and system | |
CN104965719A (en) | Method and apparatus for generating an application installation file | |
CN106354966B (en) | The method of the conversion of chip id E project file and rapid configuration artificial debugging environment | |
WO2019024392A1 (en) | Dependency package tool verification method, storage medium, electronic device and system | |
CN107479895A (en) | A kind of method for parameter configuration and device of same platform project | |
CN114610296A (en) | A front-end development platform based on Electron | |
CN105528292A (en) | Kernel unit test method and system based on kernel module |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20151223 |