An automated testing system and method for APP shell platform
By splitting the functions of the APP shell into three major modules and using keyword-driven technology, an automated test system was designed, which solved the test problem of a set of scripts supporting multiple APP terminals in the existing technology, realized an efficient and flexible test process, and reduced labor and time costs.
Patent Information
- Application Number
- CN202210092279.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-01-26
AI Technical Summary
It is difficult for the existing technology to implement a set of scripts to support multiple APP terminals, and after the APP shell platform function is changed, multiple repeated tests are required, resulting in high labor costs and time.
An automated testing system was designed. By splitting the functions of the APP shell into three major modules: basic functions, background configurable change functions and personalized customization functions, using keyword driving technology and driver data control testing steps in the data module, a set of scripts supports testing of multiple APP terminals, and quickly respond to new terminal APP iterations by updating data modules and method classes.
A set of scripts supports testing of multiple APP terminals has been implemented, which reduces the labor cost and time of manual testing, improves testing efficiency and flexibility, reduces repeated testing between multiple terminals, and reduces script maintenance costs.
Smart Images

Figure CN114490384B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of APP platform testing, and more specifically, to an automated testing system and method for APP shell platform properties. Background Art
[0002] The APP Shell platform includes a backend management system and various terminal APPs. Its main business is to create corresponding configurable project management libraries for each project party in the backend management system and package new APP terminals with APP Shells.
[0003] Therefore, the APP shell has multiple different APP terminals and supports rapid iteration to generate new APP terminals. Therefore, its testing tasks often have the characteristics of short cycle, multiple terminals, and high repetitive workload. Moreover, once the APP shell platform function is changed, multiple terminals need to be retrospectively tested, which has high labor costs.
[0004] However, since each terminal APP is derived from a shell APP, their structures on the APP side are basically the same, and it is feasible to use the same set of scripts for testing. The APP shell has certain platform characteristics, and its functions can be divided into configurable modules and common modules. Therefore, an automation system and method are designed based on these characteristics of the APP shell. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the testing requirements of one shell for multiple APP terminals in existing testing tasks, the present invention needs to solve the following problems: ① one set of scripts supports the execution of multiple APP terminals; ② for newly generated APP terminals in the future, the scripts can be quickly updated to improve the testing efficiency; ③ for the changes in the functions of the APP shell platform, the scripts can be quickly updated to reduce repeated testing between multiple terminals and improve the efficiency of retrospective testing. The goal of increasing efficiency and reducing costs of the overall testing tasks can be gradually achieved.
[0007] 2. Technical solution
[0008] To solve the above problems, the present invention adopts the following technical solutions.
[0009] An automated testing system for an APP shell platform can be divided into three branches from the perspective of horizontal process: basic functions of the APP shell (1), configurable change functions or content in the background (2), and personalized customization functions of each APP terminal (3).
[0010] Furthermore, the basic function (1) branch of the APP shell includes a data module, an APP function module, and a test result module.
[0011] The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains test step keywords, corresponding to the system keyword pool, which are used to drive the execution of test steps;
[0012] The APP function module contains the basic functional objects and methods of the encapsulated APP shell; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results;
[0013] The test result module obtains the test results and outputs a test report.
[0014] The data module uses keyword-driven technology to find specific objects and methods in the APP functional module; after the APP functional module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs a test report.
[0015] Furthermore, the background configurable change function or content (2) branch includes a data module, a management background system module, an APP function module, and a test result module.
[0016] The data module contains test data and driver data;
[0017] The test data includes target APP parameters, background configuration parameters of target APP customized functions, and background configuration parameters of target APP customized content; target APP parameters are used to locate the corresponding target project library in the management background system and the target APP terminal on the APP side; background configuration parameters of target APP customized functions are used to configure customized functions in the management background; background configuration parameters of target APP customized content are used to configure customized content in the management background;
[0018] The driver data contains test step keywords, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of test steps;
[0019] The management backend system module contains the encapsulated configuration function objects and methods; the object mapping system element positioning set is used to locate the specific element position; the management backend system module is responsible for configuring various test functions and contents, and outputting the configuration results;
[0020] The APP function module contains the configurable functions of the encapsulated APP shell, objects and methods of the content; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the APP-side verification of the background configuration functions and content;
[0021] The test result module is responsible for obtaining the test results and outputting the test report.
[0022] The data module uses keyword-driven technology to find the specific configuration function objects and methods in the management background system module; after the configuration is completed, the management background system module outputs the configuration results; the APP function module finds the objects and methods of the corresponding functions or content on the APP side according to the configuration results passed in by the management background system module, and executes them; after the execution of the APP function module, it uses the configuration results passed in by the management background system module to determine the correctness of the APP side functions and content, and returns the test results; after obtaining the test results, the test result module outputs the test report.
[0023] Furthermore, each APP terminal personalized customization function (3) branch includes a data module, an APP function module, and a test result module.
[0024] The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains the customized function keywords of the target APP, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of the test steps;
[0025] The APP function module contains objects and methods of encapsulated APP customized functions; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results;
[0026] The test result module obtains the test results and outputs a test report.
[0027] The data module uses keyword-driven technology to find specific objects and methods in the APP functional module; after the APP functional module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs a test report.
[0028] From the overall structure, the target APP parameters can be extracted as common parameters, and the executed APP terminal can be controlled by the value of the target APP parameters; the differences of each terminal can be adapted by splitting the APP functions into three modules and obtaining the management background configuration results to verify the dynamic functions and content of the APP end;
[0029] Furthermore, the driver data in the data module can contain switch control data to control the scope of the execution case and improve the flexibility of the test system; the driver data in the data module is the execution step containing keywords, and the script execution order can be controlled by adjusting the data sequence; only through the switch and sequence control in the driver data, the existing data can be used to simulate the test of various scenarios;
[0030] Furthermore, the system includes a keyword pool, which provides mapping relationships between various test functions and objects and methods; the system includes an element location set, which contains the location information of each test object element; keywords and elements can be reused. When the keyword pool and element location set are complete enough, testing the newly generated terminal APP only requires updating the data module, without the need for secondary script development;
[0031] Furthermore, when the APP shell platform function is updated, the corresponding method class or element positioning set can be updated to achieve the effect of applying to multiple terminals by updating one script.
[0032] An automated testing system for APP shell platform, the testing method of which includes the following steps:
[0033] S1. Import the target APP parameters as public parameters into the data module;
[0034] S2. Import all test result data of the target APP's APP basic function module and APP customized function module into the data module;
[0035] S3. Import the target APP's APP basic function keywords, background configurable function keywords and APP customized function keyword data into the data module;
[0036] S4. Start the script. The system opens the corresponding project library in the project management background according to the target APP parameters. It decides to execute or skip the data according to the switch control data in the drive data.
[0037] S5. According to the keywords in the execution step data, find the corresponding objects and methods through the mapping relationship of the system keyword pool;
[0038] S6. Find the location data of the object element from the element location set of the system and execute the corresponding method;
[0039] S7. Determine the execution result and save the result after successful configuration;
[0040] S8. Open the target APP terminal according to the target APP parameters;
[0041] S9. According to the switch control data in the drive data, decide to execute or skip the data;
[0042] S10. According to the execution step data, find the corresponding objects and methods through the keywords in the steps, and execute them in turn on the APP side;
[0043] S11. Analyze the execution results according to the expected result data corresponding to the data module and output the test report. 3. Beneficial Effects
[0044] Compared with the prior art, the advantages of the present invention are:
[0045] (I) This solution divides the functions of the APP into three modules, extracts the commonalities of each APP terminal, and weakens the differences. And by controlling the value of the target APP parameter, the executed APP terminal and number are controlled. This enables the test system to implement a set of scripts to support multiple APP terminals, reducing the labor cost and test time of manual testing.
[0046] (ii) Supporting the control of the execution scope of use cases by including switch control data in the driver data of the data module; the driver data in the data module is the execution step containing keywords, and the script execution order can be controlled by adjusting the data sequence; in summary, this solution can use the existing data to simulate various scenario tests only through the switches and sequence control in the driver data, thereby improving the flexibility and reuse rate of the test scripts.
[0047] (III) The system includes a keyword pool, which provides mapping relationships between various test functions, objects, and methods; the system includes an element location set, which contains the location information of each test object element. Keywords and elements can be reused. When the keyword pool and element location set are complete enough, testing the newly generated terminal APP only requires updating the data module without the need for secondary script development. This enables rapid response to new terminal APP iterations and improves the overall delivery efficiency of the team;
[0048] (IV) When the APP shell platform function is updated, the corresponding method class or element location set can be updated to achieve the effect of applying to multiple terminals by updating only one script. This reduces the script maintenance cost and improves the testing efficiency. It can also save the manpower and time cost of regression testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a module block diagram of the present invention;
[0050] Figure 2 The figure is a flow chart of the testing method of the present invention. DETAILED DESCRIPTION
[0051] Example:
[0052] See also Figure 1-2An automated testing system for APP shell platforms. From the horizontal process, it can be divided into three branches: basic functions of APP shell (1), configurable change functions or content in the background (2), and personalized customization functions of each APP terminal (3).
[0053] Furthermore, the basic function (1) branch of the APP shell includes a data module, an APP function module, and a test result module.
[0054] The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains test step keywords, corresponding to the system keyword pool, which are used to drive the execution of test steps;
[0055] The APP function module contains the basic functional objects and methods of the encapsulated APP shell; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results;
[0056] The test result module obtains the test results and outputs a test report.
[0057] The data module uses keyword-driven technology to find specific objects and methods in the APP functional module; after the APP functional module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs a test report.
[0058] Furthermore, the background configurable change function or content (2) branch includes a data module, a management background system module, an APP function module, and a test result module.
[0059] The data module contains test data and driver data;
[0060] The test data includes target APP parameters, background configuration parameters of target APP customized functions, and background configuration parameters of target APP customized content; target APP parameters are used to locate the corresponding target project library in the management background system and the target APP terminal on the APP side; background configuration parameters of target APP customized functions are used to configure customized functions in the management background; background configuration parameters of target APP customized content are used to configure customized content in the management background;
[0061] The driver data contains test step keywords, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of test steps;
[0062] The management backend system module contains the encapsulated configuration function objects and methods; the object mapping system element positioning set is used to locate the specific element position; the management backend system module is responsible for configuring various test functions and contents, and outputting the configuration results;
[0063] The APP function module contains the configurable functions of the encapsulated APP shell, objects and methods of the content; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the APP-side verification of the background configuration functions and content;
[0064] The test result module is responsible for obtaining the test results and outputting the test report.
[0065] The data module uses keyword-driven technology to find the specific configuration function objects and methods in the management background system module; after the configuration is completed, the management background system module outputs the configuration results; the APP function module finds the objects and methods of the corresponding functions or content on the APP side according to the configuration results passed in by the management background system module, and executes them; after the execution of the APP function module, it uses the configuration results passed in by the management background system module to determine the correctness of the APP side functions and content, and returns the test results; after obtaining the test results, the test result module outputs the test report.
[0066] Furthermore, each APP terminal personalized customization function (3) branch includes a data module, an APP function module, and a test result module.
[0067] The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains the customized function keywords of the target APP, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of the test steps;
[0068] The APP function module contains objects and methods of encapsulated APP customized functions; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results;
[0069] The test result module obtains the test results and outputs a test report.
[0070] The data module uses keyword-driven technology to find specific objects and methods in the APP functional module; after the APP functional module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs a test report.
[0071] From the overall structure, the target APP parameters can be extracted as common parameters, and the executed APP terminal can be controlled by the value of the target APP parameters; the differences of each terminal can be adapted by splitting the APP functions into three modules and obtaining the management background configuration results to verify the dynamic functions and content of the APP end;
[0072] Furthermore, the driver data in the data module can contain switch control data to control the scope of the execution case and improve the flexibility of the test system; the driver data in the data module is the execution step containing keywords, and the script execution order can be controlled by adjusting the data sequence; only through the switch and sequence control in the driver data, the existing data can be used to simulate the test of various scenarios;
[0073] Furthermore, the system includes a keyword pool, which provides mapping relationships between various test functions and objects and methods; the system includes an element location set, which contains the location information of each test object element; keywords and elements can be reused. When the keyword pool and element location set are complete enough, testing the newly generated terminal APP only requires updating the data module, without the need for secondary script development;
[0074] Furthermore, when the APP shell platform function is updated, the corresponding method class or element positioning set can be updated to achieve the effect of applying to multiple terminals by updating one script.
[0075] An automated testing system for APP shell platform, the testing method of which includes the following steps:
[0076] S1. Import the target APP parameters as public parameters into the data module;
[0077] S2. Import all test result data of the target APP's APP basic function module and APP customized function module into the data module;
[0078] S3. Import the target APP's APP basic function keywords, background configurable function keywords and APP customized function keyword data into the data module;
[0079] S4. Start the script. The system opens the corresponding project library in the project management background according to the target APP parameters. It decides to execute or skip the data according to the switch control data in the drive data.
[0080] S5. According to the keywords in the execution step data, find the corresponding objects and methods through the mapping relationship of the system keyword pool;
[0081] S6. Find the location data of the object element from the element location set of the system and execute the corresponding method;
[0082] S7. Determine the execution result and save the result after successful configuration;
[0083] S8. Open the target APP terminal according to the target APP parameters;
[0084] S9. According to the switch control data in the drive data, decide to execute or skip the data;
[0085] S10. According to the execution step data, find the corresponding objects and methods through the keywords in the steps, and execute them in turn on the APP side;
[0086] S11. Analyze the execution results according to the corresponding expected result data in the data module and output the test report.
Claims
1. An automated testing system for APP shell platform, characterized by: From the horizontal process, it can be divided into three branches: the basic functions of the APP shell (1), the configurable change functions or content in the background (2), and the personalized customization functions of each APP terminal (3); The basic functions of the APP shell (1) branch includes data module, APP function module, and test result module; The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains test step keywords, corresponding to the system keyword pool, which are used to drive the execution of test steps; The APP function module contains the basic functional objects and methods of the encapsulated APP shell; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results; The test result module obtains the test results and outputs the test report; The data module uses keyword-driven technology to find specific objects and methods in the APP function module; After the APP function module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs the test report The background can be configured to change functions or content (2) branches include data module, management background system module, APP function module, and test result module; The data module contains test data and driver data; The test data includes target APP parameters, background configuration parameters of target APP customized functions, and background configuration parameters of target APP customized contents; target APP parameters are used to locate the corresponding target project library in the management background system and the target APP terminal on the APP side; The background configuration parameters of the target APP’s customized functions are used to configure the customized functions in the management background; the background configuration parameters of the target APP’s customized content are used to configure the customized content in the management background; The driver data contains test step keywords, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of test steps; The management backend system module contains the encapsulated configuration function objects and methods; the object mapping system element positioning set is used to locate the specific element position; the management backend system module is responsible for configuring various test functions and contents, and outputting the configuration results; The APP function module contains the configurable functions of the encapsulated APP shell, objects and methods of the content; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the APP-side verification of the background configuration functions and content; The test result module is responsible for obtaining the test results and outputting the test report; The data module uses keyword-driven technology to find specific configuration function objects and methods in the management background system module; After the configuration is completed, the management backend system module outputs the configuration results; the APP function module finds the objects and methods of the corresponding functions or contents on the APP side and executes them according to the configuration results passed in by the management backend system module; After the APP function module is executed, it uses the configuration results passed in by the management background system module to determine the correctness of the APP functions and content, and returns the test results; After the test result module obtains the test results, it outputs the test report Each APP terminal personalized customization function (3) branch includes data module, APP function module, and test result module; The data module contains test data, expected result data and driver data; the test data contains target APP parameters, which are used to locate the target APP terminal; the expected result data contains test results and phenomenon data, which are used to judge the test results; the driver data contains the customized function keywords of the target APP, corresponding to the system keyword pool, which is used to control the test scope and drive the execution of the test steps; The APP function module contains objects and methods of encapsulated APP customized functions; the object mapping system element positioning set is used to locate the specific element position; the APP function module is responsible for the implementation of specific test operations and judging the test results; The test result module obtains the test results and outputs the test report; The data module uses keyword-driven technology to find specific objects and methods in the APP function module; After the APP function module is executed, it uses the expected result data in the data module to analyze the test results and return the results; after the test result module obtains the test results, it outputs the test report.
2. According to claim 1, an automated testing system for APP shell platform, characterized in that: The driver data in the test data module contains switch control data, which is used to control the scope of execution of the test case.
3. The automated testing system for APP shell platform according to claim 1, characterized in that: The driver data in the data module is the execution steps containing keywords, and the script execution order can be controlled by adjusting the data sequence.
4. The automated testing system for APP shell platform according to claim 1, characterized in that: The test results include variable results and fixed results; variable results are obtained through the return results after the management background configuration; fixed results are obtained through the data module.
5. The automated testing system for APP shell platform according to claim 1, characterized in that: The system includes a keyword pool, which provides mapping relationships between various test functions, objects and methods.
6. The automated testing system for APP shell platform according to claim 1, characterized in that: The system includes an element location set, which includes location information of each test object element.
7. The automated testing system for APP shell platform according to claim 1, characterized in that: The testing method includes the following steps: S1. Import the target APP parameters as public parameters into the data module; S2. Import all test result data of the APP basic function module and APP customized function module of the target APP into the data module; S3. Import the APP basic function keywords, background configurable function keywords and APP customized function keyword data of the target APP into the data module; S4. Start the script, and the system opens the corresponding project library of the project management background according to the target APP parameters; decides to execute or skip the data according to the switch control data in the driver data; S5. According to the keywords in the execution step data, find the corresponding objects and methods through the mapping relationship of the system keyword pool; S6. Find the location data of the object element from the element positioning set of the system, and execute the corresponding method; S7. Determine the execution result and save the result after successful configuration; S8. Open the target APP terminal according to the target APP parameters; S9. Decide to execute or skip the data according to the switch control data in the driver data; S10. According to the execution step data, find the corresponding objects and methods through the keywords in the steps, and execute them on the APP side in turn; S11. Analyze the execution results according to the corresponding expected result data in the data module, and output the test report.
Citation Information
Patent Citations
Automatic software test method and platform, terminal and medium
CN108132879A
Full-life-cycle software automatic testing method and device
CN111459793A