Automatic APPUI test system, method, equipment and medium

Through the automated APPUI testing system, UI element positioning and processing screenshots are encapsulated, combined with continuous integration tools, the problems of low manual testing efficiency and complex automated testing are solved, efficient and accurate test report generation and error positioning are achieved, and testing efficiency is improved. quality.

CN118916284APending Publication Date: 2024-11-08SUZHOU MODUO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411029744.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In existing software testing solutions, manual testing is inefficient, cost-effective and difficult to guarantee accuracy. The generation of automated UI test reports is complex and the error screenshots are inconvenient to save, which affects the testing efficiency and effect.

Method used

Provide an automated APPUI testing system, including object library module, operation module, business module and integration module. By encapsulating UI element positioning, processing screenshots and logging, customization of business function testing is realized based on a multi-operation combination, and the testing framework is integrated. To the Continuous Integration Tool, use the Continuous Integration Tool to respond to test capabilities when code updates.

Benefits of technology

It realizes automatic generation of test reports and automatic saving of test error screenshots to ensure application stability and data traceability, help quickly locate problems, improve testing efficiency and quality, and make up for the shortcomings of the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916284A_ABST
    Figure CN118916284A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic APPUI testing system, method and device and a medium, and the system comprises an object library module which is used for packaging UI element positioning of an APP page; the operation module is used for packaging page element operation and processing screenshots and log records; the business module is used for realizing customized business function testing based on multi-operation combination; the configuration file management module is used for managing Allure and Pytest operation parameters; the integration module is used for integrating the test framework to an automatic tool and responding to a test function during code updating by using a continuous integration tool; according to the method, the test report can be automatically generated, the test error screenshot can be automatically saved, the APPUI interface can be automatically tested, the application stability is ensured, the data traceability is ensured, a tester is helped to quickly position and solve problems, and the test efficiency, the test effectiveness and the test quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology. Specifically, the present invention is applied to the field of Internet, and in particular to an automated APPUI testing system, method, device and medium. Background Art

[0002] Currently, in traditional software testing solutions, manual testing is usually used, requiring testers to manually perform operations, manually verify and implement judgment processes.

[0003] However, manual operation solutions have problems such as low efficiency, high manpower and time costs, and difficulty in ensuring the accuracy and consistency of results, which increases the risk of errors in the testing process; furthermore, in automated testing solutions, such as traditional UI automated testing, there are problems such as complex test report generation and inconvenient saving of error screenshots, which also affects test efficiency and effectiveness.

[0004] In summary, existing software testing solutions, whether manual or automated, have risks and problems that affect testing results. Summary of the invention

[0005] The object of the present invention is to provide an automated APPUI testing system, method, device and medium, thereby solving all or one of the above-mentioned problems existing in the prior art.

[0006] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows: In one aspect, the present invention provides an automated APPUI testing system, comprising: Object library module, used to: encapsulate the UI element positioning of the APP page; Operation module, used to encapsulate page element operations, process screenshots and log records; Business module, used to: implement customized business function testing based on multiple operation combinations; Configuration file management module, used to manage Allure and Pytest running parameters; Integration module, used to integrate the test framework into the automation tool and use the continuous integration tool to respond to the test function when the code is updated.

[0007] In one embodiment, the object library module further includes: a separation processing unit; The separation processing unit is used to separate the page element reference from the test logic.

[0008] In one embodiment, the operation module further includes: a screenshot processing unit; The screenshot processing unit is used to: in response to a test failure, take a failure screenshot and integrate the screenshots.

[0009] In one embodiment, the business module further includes: a login function testing unit; The login function testing unit is used to implement login function testing through a combination of multiple operations.

[0010] In one embodiment, the operating parameters include: test data path, report generation location, and test environment configuration; The configuration file management module performs adaptive adjustment of the test framework by managing the test data path, the report generation location, and the test environment configuration.

[0011] In one embodiment, the integration module further includes: a continuous integration processing unit; The continuous integration processing unit is used to call the continuous integration tool to trigger testing when the code is changed and generate a test report.

[0012] In one embodiment, the page element operation includes: clicking, sliding and searching.

[0013] On the other hand, the present invention also provides an automated APPUI testing method, comprising the following steps: Encapsulate the UI element positioning of the APP page; Encapsulate page element operations, process screenshots and log records; Customized business function testing based on multiple operation combinations; Manage Allure and Pytest running parameters; Integrate the testing framework into automation tools and use continuous integration tools to respond to testing functions when code is updated.

[0014] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the automated APPUI testing method are implemented.

[0015] On the other hand, the present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the automated APPUI testing method by running the program stored in the memory.

[0016] The beneficial effects of the technical solution of the present invention are: 1. The automated APPUI testing system of the present invention can automatically generate test reports and automatically save test error screenshots through the mutual cooperation of system modules, and perform automatic testing on the APPUI interface to ensure application stability and data traceability, thereby helping testers to quickly locate and solve problems, improve test efficiency, test effectiveness and test quality, make up for the shortcomings of the existing technology, and have high application value.

[0017] 2. The automated APPUI testing method described in the present invention can call the system modules in an orderly manner, thereby realizing the system logic of the automated APPUI testing system described in the present invention.

[0018] 3. The computer-readable storage medium described in the present invention can realize the cooperation of the guiding system module, thereby realizing the automated APPUI testing method described in the present invention, and the computer-readable storage medium described in the present invention also effectively improves the operability of the automated APPUI testing method.

[0019] 4. The computer device described in the present invention can store and execute the computer-readable storage medium, thereby realizing the automated APPUI testing method described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 This is a schematic diagram of the architecture of the automated APPUI testing system described in Example 1 of the present invention; Figure 2 It is a detailed architecture diagram of the automated APPUI testing system described in Example 1 of the present invention; Figure 3 It is a flowchart of the automated APPUI testing method described in Example 2 of the present invention; Figure 4 is a schematic diagram of the structure of the computer device described in Example 4 of the present invention; The symbols in the accompanying drawings are explained as follows: 1501, processor; 1502, communication interface; 1503, memory; 1504, communication bus. DETAILED DESCRIPTION

[0022] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0023] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0024] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. Example 1

[0025] This embodiment provides an automated APPUI testing system. Figure 1 and Figure 2 As shown, including: The core functions of this system are: using automated testing technologies and tools to achieve automated test execution and verification, improve test efficiency and test accuracy, and reduce the risk of human errors; in addition, this solution supports continuous integration and delivery, can work closely with the software development process, and ensure the quality stability and reliability of the software development and testing process; in summary, this system can solve the efficiency, accuracy, stability and sustainability problems of manual testing in the existing technology, as follows: This system implements automated testing of APP UI based on Python, Appium, Pytest and Allure in Page Object mode, including the following core components: 1. Object library module (i.e. object library layer), which is used to encapsulate the positioning of UI elements on the APP page; Specifically, this module also separates page element references from test logic, thereby improving code readability and maintainability.

[0026] (ii) Operation module (i.e., operation layer), which is used to encapsulate page element operations and process auxiliary functions such as screenshots and log records to ensure test transparency and traceability; Specifically, this module automatically takes screenshots and integrates them into reports when a test fails; Specifically, page element operations include: clicking, sliding, and searching, etc.

[0027] (iii) Business module (i.e., business layer), which is used to combine multiple operations to complete specific business function testing, ensure the completeness and accuracy of the test, and reduce the difficulty of writing test cases; Specifically, this module is able to combine multiple operations to implement the test of the login function.

[0028] (iv) Configuration file management module, which is used to manage Allure and Pytest running parameters, so that the test framework can flexibly adapt to different needs and environments, reduce its limitations and expand its application scope; Specifically, the operating parameters include: test data path, report generation location, and test environment configuration, etc.

[0029] (V) Integration module (i.e. CI / CD integration) is used to: integrate the test framework into the CI / CD pipeline (i.e. automation tool), and use continuous integration tools such as Jenkins to automatically trigger tests when the code is changed and generate detailed reports; through the above operations, problems during code updates can be discovered in real time and in a timely manner, and repaired efficiently, ensuring the quality and stability of the software.

[0030] To sum up, this system adopts a structured solution to implement an efficient, maintainable and scalable APP UI automated testing framework, which can improve testing efficiency, reduce costs, improve testing reliability and stability, and ensure user experience.

[0031] It should be noted that all the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention. Example 2

[0032] This embodiment is based on the same inventive concept as the automated APPUI testing system described in Embodiment 1, and provides an automated APPUI testing method, such as Figure 3 As shown, the following steps are included: This method implements automated testing of APP UI based on Python, Appium, Pytest and Allure in Page Object mode, which includes the following steps: S100. Encapsulate the UI element positioning of the APP page, separate the page element reference and test logic, and thus improve the code readability and maintainability.

[0033] S200, encapsulates page element operations, handles auxiliary functions such as screenshots and log records, and ensures test transparency and traceability; when the test fails, automatically takes screenshots and integrates them into the report; among them, page element operations include: click, slide, and search, etc.

[0034] S300, combining multiple operations to complete specific business function testing, ensuring the completeness and accuracy of the test, and reducing the difficulty of writing test cases; such as combining multiple operations to implement the test of the login function; S400, manage Allure and Pytest running parameters, so that the test framework can flexibly adapt to different needs and environments, reduce its limitations and expand the scope of application; among them, the running parameters include: test data path, report generation location and test environment configuration, etc.; S500, integrate the test framework into the CI / CD pipeline, and use tools such as Jenkins to automatically trigger tests when the code changes and generate detailed reports; through the above operations, ensure real-time and timely discovery of problems during code updates, and perform efficient repairs to ensure the quality and stability of the software.

[0035] It should be noted that all the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention. Example 3

[0036] This embodiment provides a computer-readable storage medium, including: The storage medium is used to store computer software instructions used to implement the automated APPUI testing method described in the above-mentioned embodiment 2, which includes instructions for executing the above-mentioned program set for the automated APPUI testing method; specifically, the executable program can be built into the automated APPUI testing system described in embodiment 1, so that the automated APPUI testing system can implement the automated APPUI testing method described in embodiment 2 by executing the built-in executable program.

[0037] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof. Example 4

[0038] This embodiment provides an electronic device, such as Figure 4As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0039] Memory 1503, used for storing computer programs; The processor 1501 is used to implement the steps of the automated APPUI testing method described in the above-mentioned embodiment 1 when executing the computer program stored in the memory 1503.

[0040] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0041] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.

[0042] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0043] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0044] Different from the existing technology, the present application adopts an automated APPUI testing system, method, equipment and medium, which can automatically generate test reports, automatically save test error screenshots, and automatically test the APPUI interface to ensure application stability and data traceability, help testers quickly locate and solve problems, improve test efficiency, test effectiveness and test quality, make up for the shortcomings of the existing technology, and have high application value.

[0045] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0046] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0047] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.

[0048] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific logical process of the method described above can refer to the corresponding working processes of the systems, devices and units in the aforementioned method embodiments, and will not be repeated here.

[0049] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.

[0050] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0051] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0052] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0053] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An automated APPUI testing system, characterized in that: include: Object library module, used to: encapsulate the UI element positioning of the APP page; Operation module, used to encapsulate page element operations, process screenshots and log records; Business module, used to: implement customized business function testing based on multiple operation combinations; Configuration file management module, used to manage Allure and Pytest running parameters; Integration module, used to integrate the test framework into the automation tool and use the continuous integration tool to respond to the test function when the code is updated.

2. The automated APPUI testing system according to claim 1, characterized in that: The object library module further includes: a separation processing unit; The separation processing unit is used to separate the page element reference from the test logic.

3. The automated APPUI testing system according to claim 1, characterized in that: The operation module further includes: a screenshot processing unit; The screenshot processing unit is used to: in response to a test failure, take a failure screenshot and integrate the screenshots.

4. The automated APPUI testing system according to claim 1, characterized in that: The business module also includes: a login function testing unit; The login function testing unit is used to implement login function testing through a combination of multiple operations.

5. The automated APPUI testing system according to claim 1, characterized in that: The operating parameters include: test data path, report generation location and test environment configuration; The configuration file management module performs adaptive adjustment of the test framework by managing the test data path, the report generation location, and the test environment configuration.

6. The automated APPUI testing system according to claim 1, characterized in that: The integration module further includes: a continuous integration processing unit; The continuous integration processing unit is used to call the continuous integration tool to trigger testing when the code is changed and generate a test report.

7. The automated APPUI testing system according to claim 1, characterized in that: The page element operations include: clicking, sliding and searching.

8. An automated APPUI testing method, characterized in that: The following steps are involved: Encapsulate the UI element positioning of the APP page; Encapsulate page element operations, process screenshots and log records; Customized business function testing based on multiple operation combinations; Manage Allure and Pytest running parameters; Integrate the testing framework into automation tools and use continuous integration tools to respond to testing functions when code is updated.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the automated APPUI testing method of claim 8.

10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the automated APPUI testing method described in claim 8 by running the program stored in the memory.