WO2019019454A1 - 分层测试方法、装置、计算机设备和存储介质 - Google Patents
分层测试方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2019019454A1 WO2019019454A1 PCT/CN2017/108271 CN2017108271W WO2019019454A1 WO 2019019454 A1 WO2019019454 A1 WO 2019019454A1 CN 2017108271 W CN2017108271 W CN 2017108271W WO 2019019454 A1 WO2019019454 A1 WO 2019019454A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- test
- subroutine
- tested
- layer
- function point
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Definitions
- the present application relates to the field of computer technology, and in particular, to a layered test method, apparatus, computer device, and storage medium.
- a layered test method, apparatus, computer device, and storage medium are provided.
- a layered test method that includes:
- test script corresponding to the test layer and a test case corresponding to the test subroutine
- the test result is output, and if the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- a layered testing device comprising:
- An identification module configured to acquire a subroutine to be tested of the application, and identify a test layer corresponding to the subroutine to be tested;
- test module configured to invoke a test script corresponding to the test layer and a test case corresponding to the test subroutine; and the test subroutine is tested by the test script and the test case;
- the positioning module is configured to output a test result, and if the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- test terminal comprising a memory and one or more processors having stored therein computer readable instructions that, when executed by the processor, cause the one or more processors to execute The following steps:
- test script corresponding to the test layer and a test case corresponding to the test subroutine
- the test result is output, and if the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of:
- test script corresponding to the test layer and a test case corresponding to the test subroutine
- the test result is output, and if the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- 1 is a flow chart of a layered test method in an embodiment
- Figure 2 is a block diagram of a layered test apparatus in one embodiment
- FIG. 3 is a block diagram of a computer device in one embodiment.
- a layered test method is provided. It should be understood that although the steps in the flowchart of FIG. 2 are sequentially displayed as indicated by the arrows, these steps are not necessarily in accordance with The order indicated by the arrows is performed in order. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in FIG. 2 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the order of execution thereof is not necessarily This may be performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
- the method is applied to the test terminal as an example, and includes:
- Step 102 Acquire a subroutine to be tested of the application, and identify a test layer corresponding to the subroutine to be tested.
- Step 104 Call a test script corresponding to the test layer and a test case corresponding to the subroutine to be tested.
- step 106 the test subroutine is tested by the test script and the test case.
- step 108 the test result is output. If the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- An application can be split into multiple subroutines according to its software architecture during development. Each subroutine can have independent functions. During the development of the application, the tester can independently test the completed subroutine (ie, the subroutine to be tested) through the test terminal, and does not need to wait until the application is fully developed before testing.
- the automated test platform can call automated test scripts to test subroutines.
- the automated test platform can be divided into multiple layers according to its software architecture, including the control layer, interface layer, database layer and service layer.
- Automated test scripts can also be divided into multiple layers according to the software architecture of the automated test platform, including the control layer, interface layer, database layer and service layer.
- the divided layer can also be called a test layer. Different test scripts can be called through different test layers for different functional tests.
- the test layer has a corresponding test layer configuration file
- the step of identifying the test layer corresponding to the subroutine to be tested includes: obtaining version information corresponding to the subroutine to be tested; and the version information includes the subroutine corresponding to the subroutine to be tested.
- Function point obtain multiple test layer configuration files
- test layer configuration file includes function points corresponding to the test layer
- the subroutine to be tested may have corresponding identification and version information.
- the test terminal can obtain the identifier of the subroutine to be tested, and obtain corresponding version information according to the identifier.
- One or more function points of the subroutine to be tested can be recorded in the version information.
- Each test layer can have a corresponding test layer configuration file. Multiple configuration items and corresponding function points are recorded in the test layer configuration file.
- the test terminal can identify the required test layer according to the version information of the subroutine to be tested.
- the test terminal can obtain a test layer configuration file corresponding to multiple test layers, and query the multiple configuration files by using the function points corresponding to the test subroutine. If one or more function points corresponding to the subroutine to be tested are queried in the test layer configuration file, the test terminal configures the test layer The corresponding test layer is recorded as the test layer required for the subroutine to be tested. This makes it possible to accurately obtain all the test layers required for each subroutine to be tested.
- the step of identifying a test layer corresponding to the subroutine to be tested includes: running a subroutine to be tested, detecting a test layer that interacts with the subroutine; and recording a test layer that interacts with the subroutine to be tested as The test layer required for the subroutine to be tested.
- test terminal can detect the test layer interacting with the subroutine to be tested through the automated test platform calling thread, record the name of the test layer in which the interaction occurs, and record it as the test layer required by the subroutine to be tested. This makes it possible to accurately obtain all the test layers required for each subroutine to be tested.
- test terminal After identifying the test layer required by the subroutine to be tested, the test terminal calls the test script corresponding to the test layer through the automated test platform.
- the test scripts for different test layers are different.
- the test terminal can also obtain corresponding test cases according to the subroutine program through the automated test platform. Different test subroutines have different function points, and the required test cases can be different. Test cases can exist locally on the test terminal or on the server.
- the test terminal runs the test script corresponding to the test layer through the automated test platform, and calls the corresponding test case to test the test subroutine. Tests from different test layers can be isolated from each other during the test. The test terminal can independently test different subroutines to be tested. After the test of the subroutine to be tested is completed, the test result can be output through the automated test platform.
- the test terminal asserts the test results.
- the test result includes multiple interface parameters, and multiple interface parameters may be described by using a regular expression, and the test result described by the regular expression is compared with the expected result. If they are consistent, the test passes. If they are inconsistent, the test fails. If the test fails, the test terminal can locate the failure reason of the test subroutine according to the test layer. That is, the test terminal can determine which test layer the failure cause of the subroutine to be tested occurs, thereby enabling accurate positioning.
- the subroutine to be tested is described as "login".
- the test terminal can recognize that the required test layer can only have the interface layer.
- the interface layer script calls the corresponding test case for testing. If the test fails, it can be pointed out that the reason for the failure is located in the interface layer test failure.
- the test terminal can recognize that the required test layer can include an interface layer, a database layer, and a service layer. Each test layer calls a different test case to test.
- the login request is sent to the server by the subroutine to be tested, and the login request carries information such as a username, a password, and a verification code.
- the interface layer test script performs interface layer testing based on the login request.
- the database layer test script calls the verification logic of the database for verification test based on the user name, password, and verification code.
- the service layer test script calls the interface for page jump testing. Among them, the test of the interface layer, database layer and service layer can be completely isolated. If the test result of a layer indicates that the test of the layer fails, the cause of the failure can be located to the layer, and the test layer that fails the test can be one or more. This enables precise positioning.
- the required test layer can be identified according to the subroutine to be tested.
- the test subroutine is automatically tested by calling the test script corresponding to the test layer and the test case corresponding to the subroutine to be tested. If the test fails, the cause of the failure can be accurately located to the corresponding test layer. In this process, since the multiple subroutines of the application are independently tested, if the test fails, the cause of the failure can be accurately located only for the subroutine to be tested, and the entire application is not required to be excluded as a whole. The reason for failure can effectively improve the positioning efficiency of the cause of the test failure.
- the subroutine to be tested has corresponding version information, and the version information includes a version number.
- the method further includes: obtaining a test case configuration file, and the test case configuration file records the version number of the subroutine to be tested and the corresponding Test case name; obtain the corresponding test case name according to the version number of the subroutine to be tested; call the corresponding test case according to the test case name.
- test terminal before testing the subroutine to be tested, the test terminal also needs to obtain a corresponding test case.
- Test cases can be stored locally on the test terminal or on the server.
- the test case has a corresponding test case configuration file.
- the test case configuration file can be stored locally on the test terminal or on the server.
- test case configuration file records the test cases required for all subroutines of the application to be tested, including the identifier of the subroutine to be tested, the version number, and the corresponding test case name.
- Each subroutine to be tested can also have a separate test case configuration file. Only a single test case configuration file can record only The test cases required for the subroutine test to be tested include the identification of the subroutine to be tested, the version number, and the corresponding test case.
- the test terminal can obtain the shared test case configuration file, and retrieve the corresponding test case name in the shared test case configuration file according to the identifier and version number of the test subroutine to be tested.
- the test terminal invokes the corresponding test case according to the retrieved test case name, so as to test the test subroutine.
- the test terminal can also obtain an independent test case configuration file according to the identifier of the subroutine to be tested, and retrieve the corresponding test case name by using the version number of the subroutine to be tested in the independent test case configuration file.
- the test terminal invokes the corresponding test case according to the retrieved test case name, so as to test the test subroutine.
- the test cases corresponding to the version number of the subroutine to be tested can be quickly obtained, which is beneficial to improve the test efficiency.
- the method further includes: acquiring a mapping file of a current version of the subroutine to be tested; the mapping file of the current version includes a function point of the current version, a storage path, and a corresponding test case; and acquiring the subroutine to be tested
- a version of the mapping file includes the function points, storage paths, and corresponding test cases of the previous version; compares the mapping file of the current version with the mapping file of the previous version, and obtains the function points that have changed. And/or a changed storage path; identifying the function point to be tested by using the changed function point and/or the changed storage path; and using the current version of the mapping file to obtain the test case corresponding to the function point to be tested in the subroutine to be tested.
- the regression test can be considered in the regression test of the subroutine to be tested, and only the repaired function points or newly added function points are tested.
- the subroutine to be tested may include one or more function points. Function points can be implemented in code files to achieve their corresponding functions.
- the tester can generate a mapping file according to the function point of the subroutine to be tested, the storage path corresponding to the code file, and the test case corresponding to the function point through the test terminal. Different versions of the subroutine to be tested can have different mapping files.
- the test terminal obtains the mapping file of the current version of the subroutine to be tested and the mapping file of the previous version, and compares the two mapping files to obtain the changed function point and/or the changed storage path.
- the current version can fix one or more feature points in the previous version.
- the repaired function points can also be referred to as function points that have changed.
- the current version can also add function points.
- the new function points can also be called function points that have changed compared with the function points of the previous version.
- the code file of each function point of the current version of the subroutine to be tested may also be changed compared to the code files of the previous version.
- the code file corresponding to the repaired function point may exist in a different path from the previous one. It is also possible to replace the previous version of the code file in the previous path.
- the test terminal obtains the current version of the code file and the code file of the previous version according to the changed function point and/or the changed storage path, and compares the two versions of the code file. If different, the current version is The function points corresponding to the code file are recorded as the function points to be tested.
- the test terminal retrieves the corresponding test case name in the test case configuration file according to the function point to be tested.
- the corresponding test case is called according to the test case name to test the test subroutine.
- the changed function point and/or the changed storage path are obtained. Further, the function point to be changed and/or the changed storage path can be used to accurately identify the function point to be tested, and the corresponding test case is obtained through the function point to be tested. Therefore, the test range can be accurately determined in the regression test of the subroutine to be tested, thereby effectively improving the test efficiency.
- a layered testing device comprising: an identification module 202, a testing module 204, and a positioning module 206, wherein:
- the identification module 202 is configured to acquire a subroutine to be tested of the application, and identify a test layer corresponding to the subroutine to be tested.
- the test module 204 is configured to invoke a test script corresponding to the test layer and a test case corresponding to the test subroutine; and test the test subroutine through the test script and the test case.
- the positioning module 206 is configured to output a test result. If the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- the test layer has a corresponding test layer configuration file
- the identification module 202 is further configured to obtain version information corresponding to the subroutine to be tested; the version information includes a function point corresponding to the subroutine to be tested; and acquiring multiple test layers Configuration file; the test layer configuration file includes the function corresponding to the test layer Point; according to the function point corresponding to the subroutine to be tested, the function points corresponding to the test layer in the plurality of test layer configuration files are retrieved, and the test layer required for the subroutine to be tested is obtained.
- the identification module 202 is further configured to run a subroutine to be tested, detect a test layer that interacts with the subroutine, and record a test layer that interacts with the subroutine to be tested as a test layer required by the subroutine to be tested. .
- the subroutine to be tested has corresponding version information, and the version information includes a version number.
- the test module 204 is further configured to obtain a test case configuration file, and the test case configuration file records the version number and corresponding of the subroutine to be tested.
- the name of the test case obtain the corresponding test case name according to the version number of the subroutine to be tested; and call the corresponding test case according to the test case name.
- the test module 204 is further configured to obtain a mapping file of a current version of the subroutine to be tested; the mapping file of the current version includes a function point, a storage path, and a corresponding test case of the current version; and acquiring the subroutine to be tested.
- a point and/or a changed storage path identifying a function point to be tested by using a changed function point and/or a changed storage path; and using the current version of the mapping file to obtain a test case corresponding to the function point to be tested in the subroutine to be tested .
- a computer device including the test terminal mentioned in the above embodiments.
- the computer device includes a processor, a memory, and a network interface connected by a system bus.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the non-volatile storage medium of the computer device stores an operating system and computer readable instructions that are executed by the processor to implement a layered test method.
- the internal memory of the computer device provides an environment for the operation of an operating system and computer readable instructions in a non-volatile storage medium.
- the network interface of the computer device is used for communicating with an external server through a network connection, for example, sending a login request to the server, and the like.
- the processor can perform the following steps when executing computer readable instructions:
- FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
- the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
- test layer has a corresponding test layer configuration file
- processor performs the following steps when executing the computer readable instructions:
- the version information includes a function point corresponding to the subroutine to be tested;
- test layer configuration file includes function points corresponding to the test layer
- the function points corresponding to the test layer in the plurality of test layer configuration files are retrieved according to the function points corresponding to the subroutine to be tested, and the test layer required for the subroutine to be tested is obtained.
- the processor also performs the following steps when executing the computer readable instructions:
- the test layer that interacts with the subroutine to be tested is recorded as the test layer required for the subroutine to be tested.
- the subroutine to be tested has corresponding version information
- the version information includes a version number
- the processor further performs the following steps when executing the computer readable instructions:
- test case configuration file Obtain a test case configuration file, and record the version number of the subroutine to be tested and the corresponding test case name in the test case configuration file;
- test case name The corresponding test case is called according to the test case name.
- the processor also performs the following steps when executing the computer readable instructions:
- mapping file of a current version of the subroutine to be tested includes a function point, a storage path, and a corresponding test case of the current version;
- mapping file of the previous version of the subroutine to be tested includes the function points, storage paths, and corresponding test cases of the previous version;
- test case corresponding to the function point to be tested in the subroutine to be tested is obtained by using the mapping file of the current version.
- one or more computer readable non-volatile storage media having computer readable instructions, when executed by one or more processors, causing one or more processors Perform the following steps:
- Test the test subroutine through test scripts and test cases
- test result is output. If the test result indicates that the test fails, the cause of the failure is located to the corresponding test layer.
- the test layer has a corresponding test layer configuration file that, when executed by the processor, also performs the following steps:
- the version information includes a function point corresponding to the subroutine to be tested;
- test layer configuration file includes function points corresponding to the test layer
- the function points corresponding to the test layer in the plurality of test layer configuration files are retrieved according to the function points corresponding to the subroutine to be tested, and the test layer required for the subroutine to be tested is obtained.
- the computer readable instructions when executed by the processor, also perform the following steps:
- the test layer that interacts with the subroutine to be tested is recorded as the test layer required for the subroutine to be tested.
- the subroutine to be tested has corresponding version information, and the version information includes a version number.
- the computer readable instructions are executed by the processor, the following steps are also performed:
- test case configuration file Obtain a test case configuration file, and record the version number of the subroutine to be tested and the corresponding test case name in the test case configuration file;
- test case name The corresponding test case is called according to the test case name.
- the computer readable instructions when executed by the processor, also perform the following steps:
- mapping file of a current version of the subroutine to be tested includes a function point, a storage path, and a corresponding test case of the current version;
- mapping file of the previous version of the subroutine to be tested includes the function points, storage paths, and corresponding test cases of the previous version;
- test case corresponding to the function point to be tested in the subroutine to be tested is obtained by using the mapping file of the current version.
- the readable storage medium which when executed, may include the flow of an embodiment of the methods as described above.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
Claims (20)
- 一种分层测试方法,包括:获取应用程序的待测子程序,识别待测子程序对应的测试层;调用与所述测试层对应的测试脚本以及与所述待测子程序对应的测试用例;通过所述测试脚本和测试用例对所述待测子程序进行测试;及输出测试结果,若所述测试结果表示测试失败,则将失败原因定位至对应的测试层。
- 根据权利要求1所述的方法,其特征在于,所述测试层具有对应的测试层配置文件,所述识别待测子程序对应的测试层的步骤包括:获取所述待测子程序对应的版本信息;所述版本信息中包括待测子程序对应的功能点;获取多个测试层配置文件;所述测试层配置文件中包括测试层对应的功能点;及根据所述待测子程序对应的功能点对多个测试层配置文件中的测试层对应的功能点进行检索,得到所述待测子程序所需的测试层。
- 根据权利要求1所述的方法,其特征在于,所述识别待测子程序对应的测试层的步骤包括:运行所述待测子程序,检测与所述子程序发生交互的测试层;及将与所述待测子程序发生交互的测试层记录为所述待测子程序所需的测试层。
- 根据权利要求1所述的方法,其特征在于,所述待测子程序具有对应的版本信息,所述版本信息包括版本号,所述方法还包括:获取测试用例配置文件,所述测试用例配置文件中记录了待测子程序的版本号与对应的测试用例名称;根据所述待测子程序的版本号获取对应的测试用例名称;及根据所述测试用例名称调用对应的测试用例。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:获取所述待测子程序的当前版本的映射文件;所述当前版本的映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取所述待测子程序的上一版本的映射文件;所述上一版本的映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述当前版本的映射文件与所述上一版本的映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;及利用所述当前版本的映射文件获取所述待测子程序中待测功能点对应的测试用例。
- 一种分层测试装置,包括:识别模块,用于获取应用程序的待测子程序,识别待测子程序对应的测试层;测试模块,用于调用与所述测试层对应的测试脚本以及与所述待测子程序对应的测试用例;通过所述测试脚本和测试用例对所述待测子程序进行测试;及定位模块,用于输出测试结果,若所述测试结果表示测试失败,则将失败原因定位至对应的测试层。
- 根据权利要求6所述的装置,其特征在于,所述测试层具有对应的测试层配置文件,所述识别模块还用于获取所述待测子程序对应的版本信息;所述版本信息中包括待测子程序对应的功能点;获取多个测试层配置文件;所述测试层配置文件中包括测试层对应的功能点;及根据所述待测子程序对应的功能点对多个测试层配置文件中的测试层对应的功能点进行检索,得到所述待测子程序所需的测试层。
- 根据权利要求6所述的装置,其特征在于,所述识别模块还用于运行所述待测子程序,检测与所述子程序发生交互的测试层;及将与所述待测子 程序发生交互的测试层记录为所述待测子程序所需的测试层。
- 根据权利要求6所述的装置,其特征在于,所述待测子程序具有对应的版本信息,所述版本信息包括版本号,所述测试模块还用于获取测试用例配置文件,所述测试用例配置文件中记录了待测子程序的版本号与对应的测试用例名称;根据所述待测子程序的版本号获取对应的测试用例名称;及根据所述测试用例名称调用对应的测试用例。
- 根据权利要求6所述的装置,其特征在于,所述测试模块还用于获取所述待测子程序的当前版本的映射文件;所述当前版本的映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取所述待测子程序的上一版本的映射文件;所述上一版本的映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述当前版本的映射文件与所述上一版本的映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;及利用所述当前版本的映射文件获取所述待测子程序中待测功能点对应的测试用例。
- 一种测试终端,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取应用程序的待测子程序,识别待测子程序对应的测试层;调用与所述测试层对应的测试脚本以及与所述待测子程序对应的测试用例;通过所述测试脚本和测试用例对所述待测子程序进行测试;及输出测试结果,若所述测试结果表示测试失败,则将失败原因定位至对应的测试层。
- 根据权利要求11所述的测试终端,其特征在于,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取所述待测子程序对应的版本信息;所述版本信息中包括待测子程序 对应的功能点;获取多个测试层配置文件;所述测试层配置文件中包括测试层对应的功能点;及根据所述待测子程序对应的功能点对多个测试层配置文件中的测试层对应的功能点进行检索,得到所述待测子程序所需的测试层。
- 根据权利要求11所述的测试终端,其特征在于,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:运行所述待测子程序,检测与所述子程序发生交互的测试层;及将与所述待测子程序发生交互的测试层记录为所述待测子程序所需的测试层。
- 根据权利要求11所述的测试终端,其特征在于,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取测试用例配置文件,所述测试用例配置文件中记录了待测子程序的版本号与对应的测试用例名称;根据所述待测子程序的版本号获取对应的测试用例名称;及根据所述测试用例名称调用对应的测试用例。
- 根据权利要求11所述的测试终端,其特征在于,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取所述待测子程序的当前版本的映射文件;所述当前版本的映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取所述待测子程序的上一版本的映射文件;所述上一版本的映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述当前版本的映射文件与所述上一版本的映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;及利用所述当前版本的映射文件获取所述待测子程序中待测功能点对应的测试用例。
- 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取应用程序的待测子程序,识别待测子程序对应的测试层;调用与所述测试层对应的测试脚本以及与所述待测子程序对应的测试用例;通过所述测试脚本和测试用例对所述待测子程序进行测试;及输出测试结果,若所述测试结果表示测试失败,则将失败原因定位至对应的测试层。
- 根据权利要求16所述的存储介质,其特征在于,所述测试层具有对应的测试层配置文件,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取所述待测子程序对应的版本信息;所述版本信息中包括待测子程序对应的功能点;获取多个测试层配置文件;所述测试层配置文件中包括测试层对应的功能点;及根据所述待测子程序对应的功能点对多个测试层配置文件中的测试层对应的功能点进行检索,得到所述待测子程序所需的测试层。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:运行所述待测子程序,检测与所述子程序发生交互的测试层;及将与所述待测子程序发生交互的测试层记录为所述待测子程序所需的测试层。
- 根据权利要求16所述的存储介质,其特征在于,所述待测子程序具有对应的版本信息,所述版本信息包括版本号,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取测试用例配置文件,所述测试用例配置文件中记录了待测子程序的版本号与对应的测试用例名称;根据所述待测子程序的版本号获取对应的测试用例名称;及根据所述测试用例名称调用对应的测试用例。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取所述待测子程序的当前版本的映射文件;所述当前版本的映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取所述待测子程序的上一版本的映射文件;所述上一版本的映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述当前版本的映射文件与所述上一版本的映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;及利用所述当前版本的映射文件获取所述待测子程序中待测功能点对应的测试用例。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710618312.2A CN107688534A (zh) | 2017-07-26 | 2017-07-26 | 分层测试方法、装置、计算机设备和存储介质 |
CN201710618312.2 | 2017-07-26 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019019454A1 true WO2019019454A1 (zh) | 2019-01-31 |
Family
ID=61153035
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/108271 WO2019019454A1 (zh) | 2017-07-26 | 2017-10-30 | 分层测试方法、装置、计算机设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107688534A (zh) |
WO (1) | WO2019019454A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110874315B (zh) * | 2018-08-30 | 2024-04-19 | 阿里巴巴新加坡控股有限公司 | 测试方法、装置、电子设备和存储介质 |
CN109491916B (zh) * | 2018-11-12 | 2022-03-25 | 北京东土科技股份有限公司 | 一种操作系统的测试方法、装置、设备、系统和介质 |
CN109684112B (zh) * | 2018-12-29 | 2021-06-29 | 北京小米移动软件有限公司 | 程序文件运行方法、装置、终端及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070279701A1 (en) * | 2006-05-30 | 2007-12-06 | Microsoft Corporation | Automatic Test Case For Graphics Design Application |
CN104598376A (zh) * | 2014-12-30 | 2015-05-06 | 中国科学院计算机网络信息中心 | 一种数据驱动的分层自动化测试系统和方法 |
CN105260300A (zh) * | 2015-09-24 | 2016-01-20 | 四川长虹电器股份有限公司 | 基于会计准则通用分类标准应用平台的业务测试方法 |
CN106201894A (zh) * | 2016-07-21 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | 一种软件测试装置和方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101017457A (zh) * | 2007-02-09 | 2007-08-15 | 山东浪潮齐鲁软件产业股份有限公司 | 一种计算机软件的自动化测试方法 |
CN102750145B (zh) * | 2012-06-05 | 2015-02-25 | 怯肇乾 | 一种网络系统软件体系框架及其实现方法 |
JP2014056388A (ja) * | 2012-09-12 | 2014-03-27 | Hitachi Solutions Ltd | ソフトウェア業務処理テスト簡易化装置 |
CN103699488B (zh) * | 2013-12-30 | 2017-01-04 | 优视科技有限公司 | 基于调用关系依赖图的回归测试方法及系统 |
CN104317559A (zh) * | 2014-08-26 | 2015-01-28 | 国家电网公司 | 基于gmf的可视化建模平台 |
-
2017
- 2017-07-26 CN CN201710618312.2A patent/CN107688534A/zh active Pending
- 2017-10-30 WO PCT/CN2017/108271 patent/WO2019019454A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070279701A1 (en) * | 2006-05-30 | 2007-12-06 | Microsoft Corporation | Automatic Test Case For Graphics Design Application |
CN104598376A (zh) * | 2014-12-30 | 2015-05-06 | 中国科学院计算机网络信息中心 | 一种数据驱动的分层自动化测试系统和方法 |
CN105260300A (zh) * | 2015-09-24 | 2016-01-20 | 四川长虹电器股份有限公司 | 基于会计准则通用分类标准应用平台的业务测试方法 |
CN106201894A (zh) * | 2016-07-21 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | 一种软件测试装置和方法 |
Also Published As
Publication number | Publication date |
---|---|
CN107688534A (zh) | 2018-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10055338B2 (en) | Completing functional testing | |
US10372594B2 (en) | Method and device for retrieving test case based on code coverage | |
US9672029B2 (en) | Determining test case priorities based on tagged execution paths | |
US8151247B2 (en) | Test data management | |
US9026998B2 (en) | Selecting relevant tests to quickly assess code stability | |
KR101410099B1 (ko) | 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법 | |
US20150007148A1 (en) | Identifying Test Cases Based on Changed Test Code | |
BR102015030798A2 (pt) | sistema e método | |
US20170220458A1 (en) | Orchestrating and providing a regression test | |
WO2019019647A1 (zh) | 应用程序测试范围确定方法、系统、服务器和存储介质 | |
US10565091B2 (en) | Method and apparatus for automatic cross-system program debugging | |
US10049031B2 (en) | Correlation of violating change sets in regression testing of computer software | |
WO2019019454A1 (zh) | 分层测试方法、装置、计算机设备和存储介质 | |
CN111290941A (zh) | 多个接口的测试方法、装置、计算设备和介质 | |
US9183122B2 (en) | Automated program testing to facilitate recreation of test failure | |
WO2017036068A1 (zh) | 一种实现软件自动化测试的方法和系统 | |
US11663113B2 (en) | Real time fault localization using combinatorial test design techniques and test case priority selection | |
US9842044B2 (en) | Commit sensitive tests | |
US11132286B1 (en) | Dynamic reordering of test case execution | |
WO2023207973A1 (zh) | 编译器测试方法、用例生成方法、装置及指令存储结构 | |
CN113806209A (zh) | 接口测试方法、框架、计算机设备和存储介质 | |
CN111666200A (zh) | 一种pc软件冷启动耗时的测试方法及终端 | |
US11748246B2 (en) | Crowd-sourced QA with trusted compute model | |
US20160275002A1 (en) | Image capture in application lifecycle management for documentation and support | |
CN117435503A (zh) | 测试工具的生成方法、测试方法、装置、设备及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17919641 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17919641 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.08.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17919641 Country of ref document: EP Kind code of ref document: A1 |