A method, device, storage medium and terminal for testing an application program

Through automated testing framework and text information matching technology, the high labor costs and error problems caused by manual verification in existing software tests are solved, and efficient testing of multi-page applications is achieved.

CN113268416BActive Publication Date: 2024-12-03SHENZHEN TCL NEW-TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110533018.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-17
Publication Date
2024-12-03
Estimated Expiration
2041-05-17

AI Technical Summary

Technical Problem

In existing software testing, text testing methods rely on manual verification, resulting in high labor costs and prone to errors, affecting testing efficiency, especially in applications with more pages.

Method used

Design an application testing method and device, by receiving test instructions, executing test scripts, obtaining application page text information, and matching with the preset text information database according to the language type, generating test results, and using an automated test framework to simulate user operations, automatically Compare text content and generate a test report.

Benefits of technology

It reduces labor costs, improves software testing efficiency, reduces test errors, and realizes automated testing of multi-page applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113268416B_ABST
    Figure CN113268416B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a testing method, device, storage medium and terminal for an application program. The solution performs automated testing on the application to be tested installed on the device under test by designing an automated testing framework for application pages. During the testing process, the user is simulated to click buttons, slide pages and perform other operations on the application to be tested to obtain all application pages of the application to be tested, and then the text content of all pages is compared with the preset text content, and a test report is generated according to the comparison results. The entire automated testing process does not require additional resource investment, greatly reducing labor costs and improving software testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and terminal for testing an application. Background Art

[0002] Software testing is an essential part of the software development process. Its purpose is to discover potential defects in the software, reduce software development and maintenance costs, and promote the improvement of software quality.

[0003] During the software testing process, in addition to routine testing of the application such as functional testing, stress testing, and performance testing, testers also need to test the text of each page of the application.

[0004] The existing text testing method mainly relies on testers to check, but for some applications with more pages, the manpower cost is high and the test is prone to errors, which affects the efficiency of software testing. Summary of the invention

[0005] The embodiments of the present application provide a method, device, storage medium and terminal for testing an application program, which can improve software testing efficiency.

[0006] The present application embodiment provides a method for testing an application program, including:

[0007] Receiving a test instruction for an application under test in a device under test, and executing a test script, wherein the test script is used to trigger the application under test to display an application page in the device under test;

[0008] Obtaining the text information to be tested in the application page;

[0009] According to the language type of the text information to be tested, the text information to be tested is matched with a preset text information library, wherein the preset text information library includes preset text information of the application page;

[0010] A test result of the application to be tested is generated based on the matching result.

[0011] Accordingly, the embodiment of the present application further provides a testing device for an application program, including:

[0012] A receiving unit, configured to receive a test instruction for an application under test in a device under test, and execute a test script, wherein the test script is configured to trigger the application under test to display an application page in the device under test;

[0013] A first acquisition unit, used to acquire the text information to be tested in the application page;

[0014] a matching unit, configured to match the text information to be tested with a preset text information library according to a language type of the text information to be tested, wherein the preset text information library includes preset text information of the application page;

[0015] A generating unit is used to generate a test result of the application to be tested based on the matching result.

[0016] In some embodiments, the matching unit includes:

[0017] An identification subunit, used to identify the language type of the text information to be tested and obtain a target language type;

[0018] A first acquisition subunit is used to acquire preset text information corresponding to the application page from a preset text information library based on the target language type to obtain the target text information;

[0019] The matching subunit is used to match the text information to be tested with the target text information.

[0020] In some embodiments, the apparatus further comprises:

[0021] A second acquisition unit, configured to acquire a text information set corresponding to the application page from the preset text information library based on the page identifier of the application page;

[0022] The dividing unit is used to divide the text information set into a plurality of candidate text information according to a plurality of preset language types, wherein different candidate text information corresponds to different preset language types.

[0023] In some embodiments, the acquisition subunit is specifically used for:

[0024] Based on the target language type, corresponding candidate text information is acquired from a plurality of candidate text information to obtain the target text information, wherein the candidate text information has the same language type as the target text information.

[0025] In some embodiments, the apparatus further comprises:

[0026] A third acquisition unit is used to acquire the number of application pages of the application to be tested;

[0027] a determining unit, configured to determine the number of devices under test according to the number of application pages if the number of application pages is greater than a preset number;

[0028] The establishing unit is used to establish connections with the number of devices under test.

[0029] In some embodiments, the receiving unit includes:

[0030] A division subunit, used for dividing the application pages of the application to be tested based on the number of devices under test;

[0031] The triggering subunit is used to trigger the application under test to display different application pages in different devices under test according to the division result, and the application pages displayed in different devices under test constitute all application pages of the application under test.

[0032] In some embodiments, the trigger subunit is specifically used for:

[0033] Obtaining automated test cases corresponding to each application page of the application to be tested;

[0034] The automated test case corresponding to the application page is executed through the device under test corresponding to the application page.

[0035] In some embodiments, the generating unit comprises:

[0036] A second acquisition subunit is configured to acquire preset text information corresponding to the application page if the matching result indicates that the text information to be tested fails to match the preset text information library;

[0037] The generating subunit is used to generate a text information comparison table according to the text information to be tested and the preset text information to obtain the test result.

[0038] In some embodiments, the apparatus further comprises:

[0039] A detection unit, configured to detect the application to be tested by using an anomaly detection algorithm during the execution of the test script;

[0040] The adding unit is used to generate exception information when it is detected that the application to be tested fails to switch to the displayed application page, and add the exception information to the test result.

[0041] Correspondingly, an embodiment of the present application further provides a storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the test method of the application as described above.

[0042] Correspondingly, an embodiment of the present application further provides a terminal, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the test method of the application as described above.

[0043] The embodiment of the present application designs an application page automation testing framework to perform automated testing on the application to be tested installed on the device to be tested. During the testing process, the user is simulated to click buttons, slide pages, and perform other operations on the application to be tested to obtain all application pages of the application to be tested, and then the text content of all pages is compared with the preset text content, and a test report is generated according to the comparison results. The entire automated testing process does not require additional resource investment, greatly reduces labor costs, and can improve software testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A schematic diagram of an application scenario of a method for testing an application provided in an embodiment of the present application.

[0046] Figure 2 A flowchart of a method for testing an application provided in an embodiment of the present application.

[0047] Figure 3 A schematic diagram of an application page of a method for testing an application provided in an embodiment of the present application.

[0048] Figure 4 A flowchart of another method for testing an application provided in an embodiment of the present application.

[0049] Figure 5 A structural block diagram of a testing device for an application provided in an embodiment of the present application.

[0050] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0052] The embodiment of the present application provides a method, device, storage medium and terminal for testing an application. Specifically, the terminal provided in the embodiment of the present application may include a testing device and a device under test. The testing device may be a computer or other device, and the device under test may be a mobile phone or other device.

[0053] For example, see Figure 1 , Figure 1 A schematic diagram of an application scenario of a method for testing an application provided in an embodiment of the present application. Figure 1 A test system is provided. The test system comprises a test device and a device under test. The test device and the device under test can be connected by wire.

[0054] Among them, the test device can receive test instructions for the application to be tested in the device under test, execute the test script, trigger the application to be tested to display the application page in the device under test; obtain the text information to be tested in the application page; match the text information to be tested with a preset text information library according to the language type of the text information to be tested; and generate the test results of the application to be tested based on the matching results.

[0055] Above Figure 1 The example is only an example of a system architecture for implementing the embodiment of the present invention. The embodiment of the present invention is not limited to the above Figure 1 The system structure shown is based on which various embodiments of the present invention are proposed.

[0056] Based on the above problems, the embodiments of the present application provide a method, device, storage medium and terminal for testing an application program, which can improve the efficiency of software testing. The following are detailed descriptions. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0057] Please refer to Figure 2 , Figure 2 A flowchart of a method for testing an application provided in an embodiment of the present application. Taking the application testing method applied to a test device as an example, the specific process of the application testing method can be as follows:

[0058] 101. Receive a test instruction for an application to be tested in a device under test, and execute a test script.

[0059] The device under test refers to a device installed with the application under test, for example, the device under test may be a mobile phone, etc. The device under test may install the application under test in a variety of ways.

[0060] For example, the device under test may download the installation package of the application under test from the Internet, or share the installation package of the application under test through a third-party device, and then install the application under test.

[0061] The application to be tested refers to the application software that needs to be tested. Software testing is the process of running or measuring a software system using manual or automatic means. The purpose of software testing methods includes: discovering errors in software programs, verifying whether the software meets the design requirements and whether it meets the technical requirements to be achieved in the contract, and evaluating the quality of the software. Ultimately, the goal of delivering high-quality software systems to users is achieved.

[0062] In an embodiment of the present application, the test device may be installed with programming software, which may be used by testers to write test scripts.

[0063] Among them, the test script is used to trigger the application under test to display the application page in the device under test. A test script generally refers to a series of instructions for a specific test, which can be executed by an automated testing tool. In order to improve the maintainability and reusability of test scripts, they must be constructed before executing the test scripts. Test scripts are computer-readable instructions that automatically execute the test process (or part of the test process). Test scripts can be created (recorded) or automatically generated using a test automation tool, or programmed in a programming language, or a combination of the first three methods.

[0064] Among them, the embodiments of the present application can perform automated testing, which is a process of converting human-driven test behavior into machine execution. Usually, after the test case is designed and passed the review, the tester performs the test step by step according to the procedures described in the test case to obtain a comparison between the actual result and the expected result. In this process, in order to save manpower, time or hardware resources, improve test efficiency.

[0065] For example, in an embodiment of the present application, by using UI (user interface) automation testing frameworks such as airtest / Appium, automated operations can be performed on the application to be tested, such as simulating clicking buttons, sliding pages, switching screens, and other behaviors, and through UI control instructions, functions such as entering the secondary interface, tertiary interface, and turning pages can be realized, and then the text information of all application pages in the application to be tested can be obtained.

[0066] In some embodiments, in order to save testing time, after the step of “receiving a test instruction for the application to be tested in the device under test” and before the step of “executing the test script”, the following steps may also be included:

[0067] Obtain the number of application pages of the application to be tested;

[0068] If the number of application pages is greater than a preset number, determining the number of devices under test according to the number of application pages;

[0069] Connections are established to the stated number of devices under test.

[0070] The number of application pages refers to all application pages of the application to be tested. For example, the application to be tested may include 10 application pages, and the number of application pages of the application to be tested is: 10.

[0071] When performing software testing on an application under test, it is necessary to test the text of each application page of the application under test. When the number of application pages is small, it will not take too long to complete the test of all application pages through one device under test. However, if there are many application pages of the application under test, it may take a long time to complete the test of all application pages through one device under test. Therefore, when there are many application pages of the application under test, different application pages of the application under test can be tested simultaneously through multiple devices under test to quickly complete the test of all application pages of the application under test.

[0072] The preset number is used to detect whether it is necessary to simultaneously test different application pages of the application under test through multiple devices under test. For example, the preset number may be 8. The preset number may be set according to actual test conditions and is not limited here.

[0073] Specifically, when the number of application pages of the application to be tested is less than or equal to the preset number, the test of all application pages of the application to be tested can be completed by one device under test; when the number of application pages of the application to be tested is greater than the preset number, the synchronous test of all application pages of the application to be tested can be completed by multiple devices under test.

[0074] For example, the preset number may be 8, the number of application pages of the application to be tested obtained may be 10, and if the number of application pages of the application to be tested is greater than the preset number, the application pages of the application to be tested may be synchronously tested through multiple devices under test.

[0075] Specifically, the number of devices under test may be determined according to the number of application pages of the application to be tested. For example, a preset number may be used as the number of application pages tested for each device under test.

[0076] For example, the number of application pages can be 20, the preset number can be 8, then the number of test devices can be determined to be: 3, and the devices under test can include: a first device under test, a second device under test, and a third device under test. The application pages of the application to be tested can be synchronously tested through the three devices under test.

[0077] Then, a connection with the device under test is established. The tester can connect the test device and the device under test through a data line connection to ensure that the test device controls the device under test to execute the test script.

[0078] In some embodiments, the device under test may be provided with different operating systems. In order to complete the test, the devices under test of different operating systems may be connected in different ways. The operating system may include at least a first operating system and a second operating system. The connection mode may include at least a first connection mode and a second connection mode.

[0079] If the operating system of the device under test is the first operating system, it can be connected to the device under test through the first connection method; if the operating system of the device under test is the second operating system, it can be connected to the device under test through the second connection method, so as to ensure data transmission between the test device and the device under test.

[0080] For example, the first operating system can be an Android system, and the test device and the device under test can be connected through adb uiautomator. adb uiautomator refers to a way to connect to an Android phone. uiautomator is an automated testing tool used to control the Android UI, which is called by calling uiautomator related instructions under adb shell. The second operating system can be an iOS system, and the test device and the device under test can be connected through appium (an application program) to control the running of the application under test on the device under test.

[0081] After the connection between the test device and the device under test is completed, the test can be executed on the application under test. Specifically, the step "Execute the test script" may include the following operations:

[0082] Dividing the application pages of the application to be tested based on the number of devices under test;

[0083] According to the division result, the application to be tested is triggered to display different application pages in different devices to be tested, and the application pages displayed in different devices to be tested constitute all application pages of the application to be tested.

[0084] Specifically, dividing the application pages according to the number of devices under test may include multiple division methods. For example, in order to ensure that each device under test completes the same workload, all application pages of the application under test may be evenly distributed to each device under test.

[0085] For example, the number of application pages can be 21, and the number of test devices can be 3. The devices under test are determined to include: the first device under test, the second device under test, and the third device under test. The 1st to 21st application pages of the application under test are divided according to the average division method, and the division results are: the 1st to 7th application pages, the 8th to 14th application pages, and the 15th to 21st application pages. Then, the 1st to 7th application pages are tested synchronously through the first device under test, the 8th to 14th application pages are tested through the second device under test, and the 15th to 21st application pages are tested through the third device under test. In this way, testing time can be saved.

[0086] In some embodiments, in order to improve test efficiency, the step of “triggering the application to be tested to display different application pages in the number of devices under test” may include the following operations:

[0087] Obtaining automated test cases corresponding to each application page of the application to be tested;

[0088] The automated test case corresponding to the application page is executed through the device under test corresponding to the application page.

[0089] Among them, a test case is a set of conditions or variables in software testing. Testers use the test cases to determine whether the application software or software system works correctly. The method of determining whether a software program or system passes the test is called a test criterion. Specifically, an automated test case includes test steps for testing the application to be tested.

[0090] In the embodiment of the present application, the application page display content of the application to be tested can be tested, and the automated test case can include: automatic operation of application page elements, such as clicking buttons, switching pages, sliding pages, etc., to simulate the actual operation scenario of the tester. The tester can write a test script based on the automated test case.

[0091] When different application pages of the application under test are tested synchronously through multiple devices under test, that is, the test device controls the device under test to execute the test steps in the automated test cases corresponding to different application pages, the display content of all application pages of the application under test is finally tested.

[0092] 102. Obtain the text information to be tested in the application page.

[0093] The text information to be tested refers to the text content displayed in the application page.

[0094] For example, see Figure 3 , Figure 3 A schematic diagram of an application page of a method for testing an application provided in an embodiment of the present application. Figure 3It can be the home page of the application to be tested. Figure 3 The application page shown includes four controls: "Startup page" control, "Shutdown page" control, "Settings page" control, and "Mode selection page" control. By touching the controls, the display page of the application to be tested can be switched. Among them, the text information to be tested includes: "Startup page", "Shutdown page", "Settings page", and "Mode selection page".

[0095] 103. Match the text information to be tested with a preset text information database according to the language type of the text information to be tested.

[0096] The language type refers to the language used in different countries. The language type may include multiple types. For example, the language type may include: Chinese, English, French, German, etc.

[0097] In the embodiment of the present application, the application to be tested may have multiple language versions. The application page of the application to be tested may display text corresponding to the language type according to the set language type.

[0098] For example, in Figure 3 In the test, the language type of the application to be tested can be set to Chinese. Figure 3 The application page displayed is in Chinese text.

[0099] The preset text information library includes: preset text information of all application pages of the application to be tested.

[0100] For example, the application to be tested includes a first application page, a second application page, and a third application page. The language types supported by the application to be tested may include: Chinese, English, French, etc. Then the preset text information library includes: Chinese text of the first application page, English text of the first application page, French text of the first application page; Chinese text of the second application page, English text of the second application page, French text of the second application page; Chinese text of the third application page, English text of the third application page, French text of the third application page.

[0101] In some embodiments, in order to avoid matching the text information to be tested with all the text information in the preset text information library one by one during the test process, which results in an increased workload during the test process, the step of "matching the text information to be tested with the preset text information library according to the language type of the text information to be tested" may include the following operations:

[0102] Identifying the language type of the text information to be tested to obtain a target language type;

[0103] Based on the target language type, obtaining preset text information corresponding to the application page from a preset text information library to obtain the target text information;

[0104] The text information to be tested is matched with the target text information.

[0105] Specifically, the text information to be tested can be identified by text recognition technology, which includes: collection of text information, analysis and processing of information, classification and identification of information, etc. Among them, template matching method can be used when classifying text information.

[0106] For example, text collection is performed on the acquired text information to be tested, and the collected text is matched with given standard texts (templates) of various categories, and the similarity between the input text and each template is calculated. The category with the greatest similarity is taken as the recognition result, and the language type of the text information to be tested, that is, the target language type, can be determined.

[0107] Furthermore, after determining the target language type of the text information to be tested, the preset text information corresponding to the target language type of the page to be applied can be obtained, and then the text information to be tested is matched with the preset text information.

[0108] In some embodiments, in order to improve the text information matching efficiency, before the step of "matching the text information to be tested with a preset text information library according to the language type of the text information to be tested", the following steps may also be included:

[0109] Acquire, from the preset text information library, a text information set corresponding to the application page based on the page identifier of the application page;

[0110] The text information set is divided into a plurality of candidate text information according to a plurality of preset language types, wherein different candidate text information corresponds to different preset language types.

[0111] Among them, the text information set represents all the text information corresponding to the application page. Page identifiers refer to different identifiers set for different application pages to distinguish different application pages. For example, the application to be tested includes: home page, startup page, shutdown page, etc., then the page identifier of the home page can be set as "home page", the page identifier of the startup page can be set as "startup page", and the page identifier of the shutdown page can be set as "shutdown page". Correspondingly, in the preset text information library, the information of the corresponding application page is stored according to the page identifier of the application page.

[0112] For example, the application page may be the first application page, and the language types supported by the application to be tested may include: Chinese, English, French, etc. Then the text information set corresponding to the first application page includes: the Chinese text of the first application page, the English text of the first application page, and the French text of the first application page.

[0113] The preset language type, that is, the language type supported by the application to be tested, can be designed by developers during the application design phase.

[0114] Specifically, the text information set is divided according to the preset language type, that is, the text information corresponding to the same language type in the text information set is divided into candidate text information.

[0115] For example, for the text information set corresponding to the application page, the Chinese text of the application page is divided into the first candidate text information, the English text of the application page is divided into the second candidate text information, and the French text of the application page is divided into the third candidate text information, so that multiple candidate text information corresponding to the application page can be obtained.

[0116] Furthermore, the step of “obtaining preset text information corresponding to the application page from a preset text information library based on the target language type to obtain the target text information” may include the following operations:

[0117] Based on the target language type, corresponding candidate text information is acquired from a plurality of candidate text information to obtain the target text information, wherein the candidate text information has the same language type as the target text information.

[0118] For example, the application page is the first application page, and it is identified that the target language type of the text information to be tested of the first application page can be English. The English candidate text information of the first application page is obtained, and then the text information to be tested is matched with the preset text information in the English candidate text information, so as to quickly determine the preset text information that matches the text information to be tested from the preset text information library, thereby improving the text information matching efficiency.

[0119] 104. Generate test results of the application to be tested based on the matching results.

[0120] The test result may at least include a test report of the application to be tested, where the test report records the text information to be tested that fails to match the preset text information, so as to facilitate the tester to quickly find the problem of the application to be tested.

[0121] In some embodiments, in order to improve the test efficiency, the step of "generating the test result of the application to be tested based on the matching result" may include the following operations:

[0122] If the matching result indicates that the text information to be tested fails to match the preset text information library, obtaining the preset text information corresponding to the application page;

[0123] A text information comparison table is generated according to the text information to be tested and the preset text information to obtain the test result.

[0124] For example, the text information to be tested of the application page obtained includes: "Bot page", "Close page", "Setting page" and "Mode selection page", and the preset text information of the application page is: "Boot page", "Close page", "Setting page" and "Mode selection page". By matching the text information to be tested with the preset text information, it can be determined that the text information to be tested "Bot page" fails to match the preset text information "Boot page".

[0125] The text information comparison table includes erroneous text information in the displayed application page, that is, text information that is inconsistent with expected text information, and records the erroneous text information and expected text information corresponding to the erroneous text information.

[0126] For example, please refer to Table 1, which is a text information comparison table provided in an embodiment of the present application.

[0127] Wrong text information to be tested Expected text information Bot page Boot page Cloe page Close page Mode selection page Mode selection page

[0128] Table 1

[0129] In Table 1, the erroneous text information to be tested during the test is recorded, and the erroneous text information to be tested includes: "Bot page", "Cloe page", and "Mode selection page". Then, the expected text information corresponding to each erroneous text information to be tested is obtained to obtain a corresponding table of erroneous text information and expected text information: "Bot page" corresponds to the expected text information "Boot page", "Cloe page" corresponds to the expected text information "Close page", and "Mode selection page" corresponds to the expected text information "Mode selection page". By recording the information that does not match the expected result during the test process in the above manner, and recording the erroneous information corresponding to the expected information, it is convenient for testers to quickly find problems and save test time.

[0130] In some embodiments, in order to simultaneously detect the software running status, the method may further include the following steps:

[0131] During the execution of the test script, the application to be tested is detected by using an anomaly detection algorithm;

[0132] When it is detected that the application to be tested fails to switch to the displayed application page, abnormal information is generated and added to the test result.

[0133] Among them, the anomaly detection algorithm is an anomaly detection tool provided in the programming software, which can be used to detect abnormal situations that occur during the operation of the software. For example, abnormal situations may include: software crashes, page display failures, etc. Testers can adjust the parameters of the anomaly detection tool according to the operating parameters of the application to be tested to facilitate anomaly detection for specific applications to be tested.

[0134] In the embodiment of the present application, since all application pages of the application to be tested need to be displayed during the test process, the tester can use the anomaly detection tool to design anomaly detection for: software crashes and page switching failures. Furthermore, during the test process, while testing the text information of the application page, the operation of the application to be tested can also be tested. When the above anomalies are detected in the application to be tested, anomaly information can be generated.

[0135] For example, during the test process, when it is detected that the application under test fails to switch from the current application page to the next application page, an exception message can be generated: "Failed to switch from the current page to the next application page", and the exception message is added to the test results so that the tester can view and correct the problem.

[0136] The embodiment of the present application discloses a testing method for an application, and the testing method for the application includes: receiving a test instruction for the application to be tested in the device under test, executing a test script; obtaining the text information to be tested in the application page; matching the text information to be tested with a preset text information library according to the language type of the text information to be tested; and generating a test result of the application to be tested based on the matching result. By designing an application page automation testing framework, an automated test is performed on the application to be tested installed on the device under test. During the test, the user is simulated to click buttons, slide pages, and other operations on the application to be tested to obtain all application pages of the application to be tested, and then the text content of all pages is compared with the preset text content, and a test report is generated according to the comparison result. The entire automated testing process does not require additional resource investment, greatly reducing labor costs and improving software testing efficiency.

[0137] refer to Figure 4 , Figure 4 A flowchart of another application testing method provided in an embodiment of the present application. Take the application testing method applied to a test terminal and a tested terminal as an example, wherein the test terminal may be a computer and the tested terminal may be a mobile phone. The application testing method may be specifically as follows:

[0138] 201. The test terminal obtains a text translation summary table of the application to be tested and all application pages of the application to be tested.

[0139] The text translation table can be designed in advance, and the content of the text translation table includes: the translation results of multiple languages ​​corresponding to all texts in the application to be tested, which are the correct translation results defined by the product end of the application to be tested.

[0140] For example, the application to be tested may be a smart home control application, and the application pages of the smart home control application may include: a power-on page, a power-off page, a mode selection page, and a setting page, etc. The language types that the smart home control application may support include: Chinese, English, German, etc. Then the text translation table corresponding to the smart home control application includes: Chinese text of the power-on page, English text of the power-on page, German text of the power-on page; Chinese text of the power-off page, English text of the power-off page, German text of the power-off page; Chinese text of the mode selection page, English text of the mode selection page, German text of the mode selection page; Chinese text of the setting page, English text of the setting page, German text of the setting page.

[0141] In an embodiment of the present application, the text translation summary table of the application to be tested can be based on Chinese, and translation results in multiple national languages ​​are provided. Therefore, automated test cases are written according to the specific content of the application page. For example, taking the smart home control application as an example, it can be written separately according to the basic shutdown page, power-on page, mode selection page, wind speed selection page, timing page, setting page and other contents in the smart home control application, and the control strategy is set according to each application page scene. The control strategy includes: covering all pages of the function according to the interactive logic of the smart home control application; according to the test execution process, the decoupling of each test scene is realized (decoupling means that each test case does not interfere with each other. The present application can realize the test of a certain application page in the smart home control application separately, without covering all application pages every time, which can reduce the operation steps), and the operation of any test scene will not affect the test of other scenes.

[0142] 202. The test terminal generates a data-driven table corresponding to each application page according to the text translation master table.

[0143] The data-driven table includes: preset text information for a language type corresponding to any application page of the application to be tested. The data-driven table is the translation result of the text to be tested in each test case. For example, the homepage of the application to be tested, then the data-driven table of the homepage contains all the preset text information of the homepage.

[0144] Specifically, the Chinese translation result of each text in each application page of the application to be tested can be determined first, and a data-driven table can be established according to the Chinese representation. The data-driven table can be named as the current application page, such as the shutdown page, the startup page, the mode selection page, etc. Taking the startup page as an example, the data-driven table corresponding to the startup page of the application to be tested has the following contents: shutdown, mode, wind speed, energy saving, wind direction, and sleep content. In this way, by switching different pages, the Chinese text corresponding to all texts can be counted.

[0145] Furthermore, for different language types, the Chinese text fields in the data-driven table are the same. This solution can automatically detect each Chinese field in the data-driven table by running the data-driven table update code, and automatically update the translation results of the corresponding language in the translation master table to each data-driven table, thereby establishing a mapping relationship between each text in the application page of the application to be tested and the corresponding standard translation result.

[0146] Among them, the data-driven table update code mainly copies the contents of the corresponding fields in the text translation table to the data-driven table by running the code. For example, the homepage of the application to be tested may include several controls such as power on, power off, mode selection, and timing. Then the data-driven table corresponds to the Chinese fields of these controls, and each field has a corresponding translation result. The data-driven table update code can determine the language type of the current application page (by determining the name of the document), and then find the corresponding language translation result of the Chinese field in the text translation table, and copy it to the data-driven table. In this way, by changing the document name, data-driven tables of all language types can be obtained, without the need to manually search in the translation table, thereby improving efficiency.

[0147] For example, the design of the data-driven table update code is as follows:

[0148]

[0149]

[0150] The implementation logic of the above data-driven table update code is to traverse all the contents in the text translation table and find the corresponding translation results under the Chinese field of the text content of the application page.

[0151] 203. The testing terminal establishes a data connection with the tested terminal.

[0152] Specifically, the tester can connect the terminal under test to the test terminal via a USB (Universal Serial Bus) data cable to ensure that the terminal under test can be controlled by the test terminal using an automation framework. The automation framework used in the embodiment of the present application can be a unitttest framework.

[0153] For example, if the operating system of the terminal under test is Android, before connecting to the test terminal, ensure that the developer mode of the terminal under test is turned on, connect to the terminal under test with a data cable, and connect through adb uiautomator; if the operating system of the terminal under test is iOS, you can use appium to connect to the terminal under test to ensure data transmission. To ensure the stability of the connection during the test, choose to connect using a data cable. Then you can start the screen light function of the terminal under test, and ensure that the terminal under test is always in the monitoring state when the battery of the terminal under test is sufficient.

[0154] 204. The test terminal executes the test script, triggering the application to be tested to display an application page on the terminal to be tested.

[0155] Among them, the test script is pre-written by the tester. In the embodiment of the present application, Python (Python is a cross-platform computer programming language) language can be used as a programming language, and programming software and airtest and poco third-party libraries can be installed in the test terminal.

[0156] Specifically, you can use airtest IDE to locate the application page elements of the application to be tested, write UI automation test scripts, and use test scripts to automatically operate the application page elements, such as clicking screen buttons, switching pages, sliding the screen, etc., to simulate the real operation scenarios of testers.

[0157] Furthermore, the control click function in the poco library is used to simulate the tester's click action, so that the shutdown page of the application to be tested is switched to the startup page. For other pages, the control function is also combined according to the test scenario to simulate the tester's operation process. The main control functions used are shown in the following code:

[0158] poco(text).exists(), used to determine whether the text in the application page exists;

[0159] poco(name).click(), used to click the control according to its name;

[0160] poco.click(pos), used to click the coordinate point of the control on the screen of the terminal being tested

[0161] Controls;

[0162] poco.swipe(x,y) is used to slide from coordinate point x to coordinate point y of the application page displayed on the terminal under test.

[0163] In this example, the tester designs a set of automated test cases and data-driven tables that can be reused in all language tests. For different languages, the different parts of the test cases are only the translation results corresponding to the Chinese fields in the data-driven table. This method can automatically update the translation language corresponding to each Chinese field in the data-driven table by executing the data-driven table update code. By executing the test script, the application page corresponding to each language type is detected, reducing the workload of the tester.

[0164] 205. The test terminal obtains the text information to be tested of the application page, matches the text information to be tested with the data driven table, and obtains a matching result.

[0165] By executing the test script, the application to be tested displays each application page in the terminal to be tested, and the text information of each application page when displayed can be obtained, that is, the text information to be tested of the application page can be obtained.

[0166] For example, during the execution of automated test cases, the acquired text information to be tested of each application page is compared with the correct translation result in the data-driven table corresponding to the application page, that is, the text information to be tested is matched with the data-driven table to obtain a matching result.

[0167] 206. The test terminal generates a test report according to the matching result, and determines whether the test report is normal.

[0168] The test results include: the translation text being checked is not found, the test case execution of the application page fails, and all the text content of the application page is saved.

[0169] For example, if a text in the text information to be tested is detected to be inconsistent with the correct translation result in the data-driven table, it can be determined that the test case corresponding to the application page has failed. Then, the Chinese field corresponding to the text with inconsistent results in the data-driven table will be recorded. The test report will give the specific text that was not detected in the data-driven table, so as to determine the erroneous text in the application page and record it in the test report.

[0170] During the entire automated testing process, the tester does not need to intervene and runs all test cases through the test terminal. When the test is completed, the automated test script will generate the final test report and test log and save them locally.

[0171] The test log records the log of the automated test script execution, and the test report records the test results of each application page of the application to be tested when displayed in different language types. Each language type corresponds to a test report.

[0172] Furthermore, the tester can check the test report to confirm whether the result of the test report is normal. If the result of the test report indicates that the test is normal, step 207 is executed; if the result of the test report indicates that the test is abnormal, step 208 is executed.

[0173] 207. The test terminal saves the test report.

[0174] For example, if the result of the test report indicates that the test is normal, the tester can locate the erroneous text of the application page of the application to be tested and submit the corresponding defect according to the test result given in the test report, thereby completing the automated test of the application to be tested.

[0175] 208. The test terminal generates abnormal information.

[0176] If there are abnormal results, confirm whether it is a problem with the test case and data-driven table, correct the problem in time, and retest.

[0177] The embodiment of the present application discloses a testing method for an application program. The scheme obtains a text translation table of the application to be tested and all application pages of the application to be tested through a test terminal; the test terminal generates a data-driven table corresponding to each application page according to the text translation table; the test terminal establishes a data connection with the terminal to be tested; the test terminal executes a test script to trigger the application to be tested to display the application page on the terminal to be tested; the test terminal obtains the text information to be tested of the application page, matches the text information to be tested with the data-driven table, and obtains a matching result; the test terminal generates a test report according to the matching result, and determines whether the test report is normal; the test terminal saves the test report; and the test terminal generates abnormal information. In this way, the efficiency of software testing can be improved.

[0178] In order to better implement the application testing method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above application testing method. The meanings of the terms are the same as those in the above application testing method, and the specific implementation details can refer to the description in the method embodiment.

[0179] See also Figure 5 , Figure 5 The structural block diagram of a test device for an application provided in an embodiment of the present application, the test device for the application can be applied to mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (Portable Media Player, PMP), and fixed terminals such as desktop computers, and the device includes:

[0180] The receiving unit 301 is used to receive a test instruction for an application under test in a device under test, and execute a test script, wherein the test script is used to trigger the application under test to display an application page in the device under test;

[0181] A first acquisition unit 302 is used to acquire the text information to be tested in the application page;

[0182] A matching unit 303, configured to match the text information to be tested with a preset text information library according to a language type of the text information to be tested, wherein the preset text information library includes preset text information of the application page;

[0183] The generating unit 304 is configured to generate a test result of the application to be tested based on the matching result.

[0184] In some embodiments, the matching unit 303 may include:

[0185] An identification subunit, used to identify the language type of the text information to be tested and obtain a target language type;

[0186] A first acquisition subunit is used to acquire preset text information corresponding to the application page from a preset text information library based on the target language type to obtain the target text information;

[0187] The matching subunit is used to match the text information to be tested with the target text information.

[0188] In some embodiments, the apparatus may further include:

[0189] A second acquisition unit, configured to acquire a text information set corresponding to the application page from the preset text information library based on the page identifier of the application page;

[0190] The dividing unit is used to divide the text information set into a plurality of candidate text information according to a plurality of preset language types, wherein different candidate text information corresponds to different preset language types.

[0191] In some embodiments, the acquisition subunit is specifically used for:

[0192] Based on the target language type, corresponding candidate text information is acquired from a plurality of candidate text information to obtain the target text information, wherein the candidate text information has the same language type as the target text information.

[0193] In some embodiments, the apparatus may further include:

[0194] A third acquisition unit is used to acquire the number of application pages of the application to be tested;

[0195] a determining unit, configured to determine the number of devices under test according to the number of application pages if the number of application pages is greater than a preset number;

[0196] The establishing unit is used to establish connections with the number of devices under test.

[0197] In some embodiments, the receiving unit 301 may include:

[0198] A division subunit, used for dividing the application pages of the application to be tested based on the number of devices under test;

[0199] The triggering subunit is used to trigger the application under test to display different application pages in different devices under test according to the division result, and the application pages displayed in different devices under test constitute all application pages of the application under test.

[0200] In some embodiments, the trigger subunit may be specifically used for:

[0201] Obtaining automated test cases corresponding to each application page of the application to be tested;

[0202] The automated test case corresponding to the application page is executed through the device under test corresponding to the application page.

[0203] In some embodiments, the generating unit 304 may include:

[0204] A second acquisition subunit is configured to acquire preset text information corresponding to the application page if the matching result indicates that the text information to be tested fails to match the preset text information library;

[0205] The generating subunit is used to generate a text information comparison table according to the text information to be tested and the preset text information to obtain the test result.

[0206] In some embodiments, the apparatus may further include:

[0207] A detection unit, configured to detect the application to be tested by using an anomaly detection algorithm during the execution of the test script;

[0208] The adding unit is used to generate exception information when it is detected that the application to be tested fails to switch to the displayed application page, and add the exception information to the test result.

[0209] The embodiment of the present application discloses a testing device for an application, which includes: a receiving unit 301 receives a test instruction for an application to be tested in a device under test, and executes a test script, wherein the test script is used to trigger the application to be tested to display an application page in the device under test; a first acquisition unit 302 acquires text information to be tested in the application page; a matching unit 303 matches the text information to be tested with a preset text information library according to the language type of the text information to be tested, wherein the preset text information library includes preset text information of the application page; and a generating unit 304 generates a test result of the application to be tested based on the matching result. In this way, the efficiency of software testing can be improved.

[0210] The present application also provides a terminal. Figure 6 As shown, the terminal may include a radio frequency (RF) circuit 601, a memory 602 including one or more storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi) module 607, a processor 608 including one or more processing cores, and a power supply 609. Those skilled in the art will appreciate that Figure 6 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0211] The RF circuit 601 can be used for receiving and sending signals during the process of sending and receiving information. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 608 for processing; in addition, the uplink data is sent to the base station. Generally, the RF circuit 601 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 601 can also communicate with the network and other devices through wireless communication.

[0212] The memory 602 can be used to store software programs and modules, and the processor 608 executes various functional applications and application program tests by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 608 and the input unit 603 with access to the memory 602.

[0213] The input unit 603 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 603 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display or touchpad, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch-sensitive surface), and drive the corresponding connection device according to a pre-set program. In addition to the touch-sensitive surface, the input unit 603 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0214] The display unit 604 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the server, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 604 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 608 to determine the type of touch event. The processor 608 then provides a corresponding visual output on the display panel according to the type of touch event. Although in Figure 6 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.

[0215] The terminal may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and the backlight when the server is moved to the ear.

[0216] The audio circuit 606, the speaker, and the microphone can provide an audio interface between the user and the server. The audio circuit 606 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and converted into audio data, and then the audio data is processed by the output processor 608 and sent to, for example, a terminal through the RF circuit 601, or the audio data is output to the memory 602 for further processing. The audio circuit 606 may also include an earplug jack to provide communication between an external headset and the server.

[0217] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 607. It provides users with wireless broadband Internet access. Figure 6 A WiFi module 607 is shown, but it is understandable that it is not a necessary component of the terminal and can be omitted as needed without changing the essence of the application.

[0218] The processor 608 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the server and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 608.

[0219] The terminal also includes a power supply 609 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 608 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 609 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0220] Specifically in this embodiment, the processor 608 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 608 will run the applications stored in the memory 602 to implement various functions:

[0221] Receiving a test instruction for an application under test in a device under test, and executing a test script, wherein the test script is used to trigger the application under test to display an application page in the device under test;

[0222] Obtaining the text information to be tested in the application page;

[0223] According to the language type of the text information to be tested, the text information to be tested is matched with a preset text information library, wherein the preset text information library includes preset text information of the application page;

[0224] A test result of the application to be tested is generated based on the matching result.

[0225] The embodiment of the present application discloses a testing method, device, storage medium and terminal for an application. The testing method for the application includes: receiving a test instruction for the application to be tested in the device under test, executing a test script; obtaining the text information to be tested in the application page; matching the text information to be tested with a preset text information library according to the language type of the text information to be tested; and generating a test result of the application to be tested based on the matching result. By designing an application page automation testing framework, an automated test is performed on the application to be tested installed in the device under test. During the test, the user is simulated to click buttons, slide pages and other operations on the application to be tested to obtain all application pages of the application to be tested, and then the text content of all pages is compared with the preset text content, and a test report is generated according to the comparison result. The entire automated testing process does not require additional resource investment, greatly reducing labor costs and improving software testing efficiency.

[0226] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium and loaded and executed by a processor.

[0227] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any application test method provided in the embodiment of the present application. For example, the instructions can execute the following steps:

[0228] Receive a test instruction for an application to be tested in a device under test, execute a test script, wherein the test script is used to trigger the application to be tested to display an application page in the device under test; obtain text information to be tested in the application page; match the text information to be tested with a preset text information library according to a language type of the text information to be tested, wherein the preset text information library includes preset text information of the application page; and generate a test result of the application to be tested based on the matching result.

[0229] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0230] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0231] Since the instructions stored in the storage medium can execute the steps in the testing method of any application provided in the embodiments of the present application, the beneficial effects that can be achieved by the testing method of any application provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0232] The above is a detailed introduction to the testing method, device, storage medium and terminal of the application provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for testing an application program, It is characterized in that include: Receiving a test instruction for an application under test in a device under test, and executing a test script, wherein the test script is used to trigger the application under test to display an application page in the device under test; Acquire the text information to be tested in the application page, wherein the text information to be tested refers to the text content displayed in the application page; According to the language type of the text information to be tested, the text information to be tested is matched with a preset text information library, wherein the preset text information library includes preset text information of the application page; Generating a test result of the application to be tested based on the matching result; After receiving a test instruction for the application to be tested in the device under test, before executing the test script, the method further includes: Obtaining the number of application pages of the application to be tested; If the number of application pages is greater than a preset number, determining the number of devices under test according to the number of application pages; establishing connections to the number of devices under test; The execution of the test script includes: Dividing the application pages of the application to be tested based on the number of devices under test; According to the division result, the test script is executed to trigger the application under test to display different application pages in different devices under test, and the application pages displayed in different devices under test constitute all application pages of the application under test; The matching the text information to be tested with a preset text information library according to the language type of the text information to be tested includes: Identifying the language type of the text information to be tested to obtain a target language type; Based on the target language type, obtaining preset text information corresponding to the application page from a preset text information library to obtain target text information; Matching the text information to be tested with the target text information; The triggering the application to be tested to display different application pages in the number of devices to be tested includes: Obtaining automated test cases corresponding to each application page of the application to be tested; The automated test case corresponding to the application page is executed through the device under test corresponding to the application page.

2. The method according to claim 1, It is characterized in that Before matching the text information to be tested with a preset text information library according to the language type of the text information to be tested, the method further includes: Acquire, from the preset text information library, a text information set corresponding to the application page based on the page identifier of the application page; Dividing the text information set into a plurality of candidate text information according to a plurality of preset language types, wherein different candidate text information corresponds to different preset language types; The acquiring, based on the target language type, preset text information corresponding to the application page from a preset text information library to obtain the target text information includes: Based on the target language type, corresponding candidate text information is acquired from a plurality of candidate text information to obtain the target text information, wherein the candidate text information has the same language type as the target text information.

3. The method according to claim 1, It is characterized in that Generating the test result of the application to be tested based on the matching result includes: If the matching result indicates that the text information to be tested fails to match the preset text information library, obtaining the preset text information corresponding to the application page; A text information comparison table is generated according to the text information to be tested and the preset text information to obtain the test result.

4. The method according to claim 1, It is characterized in that Also includes: In the process of executing the test script, the application to be tested is detected by using an anomaly detection algorithm; When it is detected that the application to be tested fails to switch to the displayed application page, abnormal information is generated and added to the test result.

5. A test device for an application program, It is characterized in that include: A receiving unit, configured to receive a test instruction for an application under test in a device under test, and execute a test script, wherein the test script is configured to trigger the application under test to display an application page in the device under test; A first acquisition unit is used to acquire the text information to be tested in the application page, wherein the text information to be tested refers to the text content displayed in the application page; a matching unit, configured to match the text information to be tested with a preset text information library according to a language type of the text information to be tested, wherein the preset text information library includes preset text information of the application page; A generating unit, configured to generate a test result of the application to be tested based on the matching result; After receiving the test instruction for the application under test in the device under test, before executing the test script, including: Obtaining the number of application pages of the application to be tested; If the number of application pages is greater than a preset number, determining the number of devices under test according to the number of application pages; establishing connections to the number of devices under test; The execution of the test script includes: Dividing the application pages of the application to be tested based on the number of devices under test; According to the division result, the test script is executed to trigger the application under test to display different application pages in different devices under test, and the application pages displayed in different devices under test constitute all application pages of the application under test; The matching the text information to be tested with a preset text information library according to the language type of the text information to be tested includes: Identifying the language type of the text information to be tested to obtain a target language type; Based on the target language type, obtaining preset text information corresponding to the application page from a preset text information library to obtain target text information; Matching the text information to be tested with the target text information; The triggering the application to be tested to display different application pages in the number of devices to be tested includes: Obtaining automated test cases corresponding to each application page of the application to be tested; The automated test case corresponding to the application page is executed through the device under test corresponding to the application page.

6. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the test method of the application program according to any one of claims 1 to 4.

7. A terminal, It is characterized in that The invention comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the test method of the application program according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automated testing method and device

    CN106294178A

  • Automatic comparison test method for multi-language entries of Android television

    CN111737071A

  • Software testing method, device and system, equipment and storage medium

    CN112463574A