A full flow automated testing method and system
By employing a fully automated testing approach, utilizing Groovy and Python scripts in conjunction with Redis scheduled tasks, we can achieve real-time updates of interface data and complex data comparisons. This addresses the issue of imperfect CI process design and improves the quality and efficiency of automated testing.
Patent Information
- Application Number
- CN202210871241.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-07-22
AI Technical Summary
Existing technologies suffer from imperfect CI process design, low quality of automated testing, high failure rate, lack of visual association display and customization, difficulty in maintaining UI automated testing, and most automated tests only target stable functions, resulting in few defect outputs.
We employ a fully automated testing approach, using Groovy code to implement interface layout data association, combined with Redis scheduled tasks and Python scripts to update interface data in real time, and using general object libraries and tool libraries to perform complex data comparisons. The results are displayed on an integrated automated testing operations platform.
It achieves integrated automated testing from packaging and compilation to the product chain, reducing human resources, improving testing efficiency, reducing project testing rounds, and enhancing R&D efficiency.
Smart Images

Figure CN115145826B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated testing in computer software engineering, and in particular to a fully automated testing method and system. Background Technology
[0002] With the ever-increasing frequency of software development iterations, the coordination and execution efficiency of traditional software engineering development and testing processes, such as the waterfall model, are far from meeting the demands of market version upgrades. To improve development efficiency, major domestic software development companies are committed to implementing DevOps principles to accelerate the entire development process lifecycle. Different software companies are choosing or developing their own unique integrated development and operations systems based on their specific business needs.
[0003] The existing technology has the following shortcomings: the process design and implementation at the CI end are not perfect, and it has not truly achieved sustainable integration and automated testing.
[0004] (1) There are no dedicated personnel to maintain it. Although it appears to be automated, the quality of automated testing is low, the output is low, and the execution failure rate is high.
[0005] (2) In terms of building the entire automated testing process, the mechanism is not sound enough. Usually, it only uses Jenkins in conjunction with open-source automation tools, which does not support complex business scenarios. Moreover, relying on external tools makes maintenance very difficult. In some cases, the automated test results lack visual association and customization, and the troubleshooting is not precise enough.
[0006] (3) UI-based automated testing development is rare in the entire automated testing process because UI changes are frequent and maintenance is difficult, so many vendors give up.
[0007] (4) Most manufacturers' automated tests run stable functions, resulting in very few defects in the output. Summary of the Invention
[0008] To address the shortcomings of existing technologies, such as inadequate CI process design and implementation, failure to achieve truly sustainable integrated automated testing, insufficient robust mechanisms in the construction of the entire automated testing process (typically relying on Jenkins in conjunction with open-source automation tools, which does not support complex business scenarios, makes maintenance extremely difficult due to reliance on external tools, and lacks visualization, correlation, and customization of automated test results, resulting in imprecise and inaccurate troubleshooting), this invention proposes a full-process automated testing method and system to solve the aforementioned technical problems.
[0009] According to a first aspect of the present invention, a fully automated testing method is proposed, comprising:
[0010] S1: Construct the interface layout. The interface uses Groovy code to implement composite text selection boxes for data association.
[0011] S2: Use Redis to start a scheduled task, and execute a Python script in the scheduled task to read cross-domain file information in real time and pass it to Groovy. Use Python to traverse the files in the directory, and then use Groovy to read the returned information to update the UI data in real time.
[0012] S3: Read relevant business data through pipeline statements to form test case configurations and business function configurations, and automatically update the build results to the local machine for the business test framework to read;
[0013] S4: Remote cluster nodes automatically connect and deploy, execute scripts and update configurations to different specified hardware devices. Different hardware devices decompose the updated configuration information into various business test framework process systems and execute concurrently according to test case configuration and business function configuration.
[0014] S5: Based on the read test case configuration, a series of general object libraries, general DLLs, and general code libraries are deployed and executed. During the execution of the test cases, the data generated is passed to the business tool framework for parsing. The business tool framework receives the data through the file path passed in the parameter, judges the file type and data type through the file path, performs similarity and difference matrix comparison, performs complex data fast matching and parsing and content comparison, and records the relevant difference information to the specified report path.
[0015] S6: The business tool framework records the comparison file information and uploads it to the integrated automated testing operation platform for display and parsing. The integrated automated testing operation platform reads the supporting files in the report and parses them. It uses different styles according to the comparison type to parse and display the information in the difference files, and notifies the user to investigate based on the difference information displayed in the completed automated test report.
[0016] In some specific embodiments, the test case configuration in S3 includes a configuration file that automatically converts manual test cases into automated test cases. The business testing framework automatically reads the test case configuration to form a test script to execute the current test case. The business function configuration includes the test project name, function module selection, pipeline information, and installation package information.
[0017] In some specific embodiments, the execution process in S5 specifically includes: the general object library includes a product object UI recognition library, the general dll can reference external dlls for quick calling or related business dlls for referencing, and the general code library combines the general object library and the general dll to call and implement the execution of business test cases.
[0018] In some specific embodiments, the data parameters generated during the execution of use cases in S5 are passed to the business tool framework for parsing, specifically including: parsing and content comparison based on the different database types formed by the data, including SQLite and PostgreSQL; and parsing and content comparison based on the configured data types, including xml, sql, ini, db, CSV, xlsx, word, and pdf.
[0019] In some specific embodiments, the content in S6 that notifies the user to investigate based on the discrepancy information shown in the completed automated test report specifically includes defect information, data discrepancy information, problem video streams, and related log information.
[0020] According to a second aspect of the invention, a computer-readable storage medium is provided on which one or more computer programs are stored, which, when executed by a computer processor, implement any of the methods described above.
[0021] According to a third aspect of the present invention, a fully automated testing system is proposed, the system comprising:
[0022] Pipeline build platform: The configuration is used to build the interface layout. The interface uses Groovy code to implement composite text selection boxes for data association. Redis is used to start a scheduled task, and a Python script is executed in the scheduled task. Cross-domain file information is read in real time and passed to Groovy. Python is used to traverse the directory files, and Groovy reads the returned information to update the build interface data in real time. Pipeline statements read relevant business data to form test case configurations and business function configurations. The build results are automatically updated to the local machine for the business test framework to read. Remote cluster nodes are automatically connected and deployed, and scripts are executed to update the configuration to the specified different hardware equipment machines.
[0023] Business testing framework: The configuration is used to decompose the updated configuration information into various business testing framework processes through different hardware equipment machines. It executes concurrently according to the test case configuration and business function configuration. It unfolds a series of general object libraries, general DLLs and general code libraries based on the read test case configuration. The data generated during the execution of test cases is passed to the business tool framework for parsing.
[0024] Business tool framework: Configured to receive data via file path passed as a parameter, determine file type and data type based on file path, perform similarity and difference matrix comparison to quickly match and parse complex data and compare content, and record relevant difference information to the specified report path. The business tool framework will then upload the recorded comparison file information to the automated testing integrated operation platform for display and parsing.
[0025] The integrated automated testing operation platform is configured to parse the accompanying files in the report, and use different styles according to the comparison type to parse and display the information in the difference files. It notifies users to investigate the difference information displayed in the completed automated test report. The investigation content specifically includes defect information, data difference information, problem video streams, and related log information.
[0026] In some specific embodiments, the test case configuration in the pipeline construction platform includes a configuration file that automatically converts manual test cases into automated test cases. The business testing framework automatically reads the test case configuration to form a test script to execute the current test case. The business function configuration includes the test project name, function module selection, pipeline information, and installation package information.
[0027] In some specific embodiments, the general object library includes a product object UI recognition library, a general DLL that can reference external DLLs for quick calls or related business DLLs, and a general code library that combines the general object library and the general DLL to execute test cases for the business.
[0028] In some specific embodiments, the business tool framework is an N-in-1 business executable tool implemented in Python using pandas, CRC32, json, and numpy.
[0029] In some specific embodiments, the integrated automated testing operation platform uses Python with Bootstrap+redis+uWSGI+Nginx+celery to connect the business testing framework and the business tool framework to upload relevant information.
[0030] This invention proposes a fully automated testing method and system. The pipeline-based sustainable construction platform solves the problem of achieving a complete automated testing system from compilation and packaging to execution for single-business penetration testing. The business testing framework is based on the development of a complete set of business object encapsulations, with custom coding to form object libraries, interface libraries, test case libraries, execution process video libraries, and the addition of intelligent defect judgment mechanisms. The business tool framework is based on a complete set of tools to reduce the execution burden of the testing framework. The integrated automated testing operation platform can achieve comprehensive quality analysis and control through execution result data. This invention proposes a complete set of dedicated, unattended, integrated automated testing operation platforms from packaging and compilation to the complete product chain, forming an end-to-end command system. This enables R&D and testing personnel to skillfully perform comprehensive quality analysis and control through the integrated automated testing operation platform before and after product testing, thereby improving testing efficiency, reducing project testing rounds, and saving related manpower and R&D resources. Attached Figure Description
[0031] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many anticipated advantages of the embodiments will be readily recognized as they become better understood through reference to the following detailed description. Other features, objects, and advantages of this application will become more apparent from reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0032] Figure 1 This is a flowchart of a fully automated testing method according to an embodiment of this application;
[0033] Figure 2 This is a framework diagram of a fully automated testing system according to an embodiment of this application;
[0034] Figure 3 This is a flowchart of a fully automated testing operation according to a specific embodiment of this application;
[0035] Figure 4 This is a compilation and packaging automation test diagram of a specific embodiment of this application;
[0036] Figure 5 This is a flowchart illustrating the test framework execution of a test case for the evidence collection result module, which is a specific embodiment of this application.
[0037] Figure 6 This is an automated test report diagram of a specific embodiment of this application;
[0038] Figure 7This is a data difference information diagram of a specific embodiment of this application;
[0039] Figure 8 This is a schematic diagram illustrating the execution of a specific embodiment of this application;
[0040] Figure 9 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments. Detailed Implementation
[0041] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0042] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0043] A fully automated testing method according to an embodiment of this application. Figure 1 A flowchart illustrating a fully automated testing method according to an embodiment of this application is shown. Figure 1 As shown, the method includes:
[0044] S1: Construct the interface layout. The interface uses Groovy code to implement composite text selection boxes for data association.
[0045] S2: Use Redis to start a scheduled task, and execute a Python script in the scheduled task to read cross-domain file information in real time and pass it to Groovy. Use Python to traverse the files in the directory, and then use Groovy to read the returned information to update the UI data in real time.
[0046] S3: Relevant business data is read through pipeline statements to generate test case configurations and business function configurations. The build results are automatically updated locally for the business testing framework to read. Test case configurations include configuration files that automatically convert manual test cases into automated test cases. The business testing framework automatically reads the test case configurations to generate test scripts to execute the current test cases. Business function configurations include the test project name, function module selection, pipeline information, and installation package information.
[0047] S4: Remote cluster nodes automatically connect and deploy, execute scripts and update configurations to different specified hardware devices. Different hardware devices decompose the updated configuration information into various business test framework processes and execute concurrently according to test case configurations and business function configurations.
[0048] S5: Based on the read test case configuration, a series of general object libraries, general DLLs, and general code libraries are deployed and executed. During the execution of the test cases, the data generated is passed to the business tool framework for parsing. The business tool framework receives the data through the file path passed in the parameter, judges the file type and data type through the file path, and performs complex data fast matching and parsing and content comparison based on the principle of similarity and difference matrix comparison, and records the relevant difference information to the specified report path.
[0049] In a specific embodiment, the execution process includes: a general object library including a product object UI recognition library, a general DLL that can reference external DLLs for quick calls or related business DLLs for reference, and a general code library that combines the general object library and the general DLL to execute test cases of the business.
[0050] In a specific embodiment, the data parameters generated during the execution of the use case are passed to the business tool framework for parsing, which specifically includes: parsing and content comparison based on the different database types formed by the data, including SQLite and PostgreSQL; and parsing and content comparison based on the configured data types, including xml, sql, ini, db, CSV, xlsx, word, and pdf.
[0051] S6: The business tool framework records comparison file information and uploads it to the integrated automated testing operations platform for display and parsing. The integrated automated testing operations platform parses the accompanying files in the report, using different styles depending on the comparison type, and displays the information in the difference files. Users are then notified to investigate the differences shown in the completed automated test report. The investigation specifically includes defect information, data difference information, problematic video streams, and related log information.
[0052] Figure 2 A framework diagram of a fully automated testing system according to an embodiment of this application is shown. The system specifically includes a pipeline construction platform 201, a business testing framework 202, a business tool framework 203, and an integrated automated testing operation platform 204.
[0053] In a specific embodiment, the pipeline build platform 201 is configured to build the interface layout. The interface uses Groovy code to implement composite text selection boxes for data association. A scheduled task is started using Redis, and a Python script is executed in the scheduled task to read cross-domain file information in real time and pass parameters to Groovy. The Python script performs file traversal of the directory, and Groovy reads the returned information to update the build interface data in real time. The pipeline statements read relevant business data to form test case configurations and business function configurations. The build results are automatically updated to the local machine for the business test framework to read. Remote cluster nodes are automatically connected and deployed, and the scripts are executed to update the configurations on the specified different hardware equipment machines.
[0054] In a specific embodiment, the business test framework 202 is configured to decompose the test cases into various business test framework processes based on the updated configuration information through different hardware devices. The test cases are executed concurrently according to the configuration of the test cases and the configuration of the business functions. A series of general object libraries, general DLLs, and general code libraries are executed based on the read test case configuration. The data generated during the execution of the test cases is passed to the business tool framework for parsing.
[0055] In a specific embodiment, the business tool framework 203 is configured to receive data via the file path passed as a parameter, determine the file type and data type through the file path, perform similarity and difference matrix comparison to quickly match and parse complex data and compare content, and record relevant difference information to the specified report path. The business tool framework will then upload the recorded comparison file information to the automated testing integrated operation platform for display and parsing.
[0056] In a specific embodiment, the automated testing integrated operation platform 204 is configured to parse the accompanying files in the report, and use different styles according to the comparison type to parse and display the information in the difference files. The user is then notified to investigate the difference information displayed in the completed automated test report. The investigation content specifically includes defect information, data difference information, problem video streams, and related log information.
[0057] Continue to refer to Figure 3 , Figure 3 A flowchart illustrating a fully automated testing operation according to a specific embodiment of this application is shown, such as... Figure 3 As shown, the operational process includes:
[0058] Step 1: Use the Active Choice and Extended Choice plugins to build the interface layout. This interface can use Groovy code to implement composite text selection boxes for data association, so that the builders can better understand the business construction information.
[0059] Step 2: Use Redis to start a scheduled task and execute a Python script in the scheduled task to read cross-domain file information in real time and pass it to Groovy. Since Groovy cannot retrieve directory files across different network segments, Python is used to traverse the directory files, and then Groovy is used to read the returned information to update and build the interface data in real time, and the information is displayed in conjunction with Step 1.
[0060] Step 3: Using pipeline statements / code, relevant business data read in Step 1 is used to generate test case configurations, business function configurations, and other files, which are then automatically updated locally for the business testing framework to read.
[0061] Test case configuration refers to the configuration file that testers manually convert into automated test cases. The business testing framework then automatically reads the test case configuration to generate test scripts to execute the current test case. The normal format is as follows:
[0062] [Safari browser]
[0063] Id_1 = 218174([iPhone data package name matches requirements] Safari browser - com.apple.mobilesafari) 0.1S
[0064] Explanation of test case configuration: [Safari browser] refers to the application category, 218174 refers to the test case ID, [iPhone data package name is consistent with the requirements] Safari browser-com.apple.mobilesafari refers to the test case content, and 0.1s refers to the test case execution time.
[0065] Business function configuration includes test project name, function module selection, pipeline information, and installation package information. The test project name indicates which business function the business test framework can quickly access for rapid execution. Function module selection refers to the configuration chosen based on product functions. Pipeline information refers to the general configuration carrier information.
[0066] Step 4: Remote cluster nodes automatically connect and deploy via `java -jar agent.jar-jnlpUrl` to execute the scripts from Step 3 and update configurations on the specified hardware devices. This process then distributes the assigned tasks to each connected machine.
[0067] Step 5: Different hardware equipment machines are decomposed into various business test framework processes based on the updated configuration information, and executed concurrently according to test case configuration and business function configuration.
[0068] Step Six: Based on the read test case configuration, deploy and execute a series of general object libraries, general DLLs, and general code libraries. The execution process must utilize the three pillars of the testing framework (spobj, spdll, spcode) to execute the relevant test cases. Among them, the general object library (spobj) refers to the product object UI recognition library. Compared to tools on the market such as QTP, UFT, and roboframework, it has a more powerful and stable ability to recognize product object UIs. For example, it can quickly encapsulate objects that other tools cannot recognize. See the following style:
[0069]
[0070]
[0071]
[0072] 3. Automatically generate the following statement for use: spobj.merge_cases.Click
[0073] A generic DLL (spdll) refers to a DLL that can be quickly invoked from external DLLs and used for custom-developed business logic. A generic code library (spcode) combines a generic object library (spobj) and generic DLLs (spdll) to execute business test cases.
[0074] Step Seven: Data generated during test case execution will be passed to the business tool framework for parsing. For example, the product will parse and compare content based on the data for various database types such as SQLite and PostgreSQL. The product will also parse and compare content based on configured data types such as xml, sql, ini, and db in the directory. In addition to the above types, it also supports data with various file extensions, such as CSV, xlsx, word, and pdf.
[0075] Step 8: The business tool framework receives data via the passed file path. It uses the file path to determine file type and data type, performs similarity and difference matrix comparisons to quickly match and parse complex data, and records relevant difference information to a specified report path. The business tool framework refers to an N-in-1 executable business tool implemented in Python using pandas, CRC32, json, numpy, etc.
[0076] Step Nine: The business tool framework will upload the recorded comparison file information to the automated testing integrated operation platform for display and parsing.
[0077] Step 10: The integrated automated testing operations platform parses the accompanying files within the report, using different styles depending on the comparison type to display the information within the difference files. The integrated automated testing operations platform refers to the integration of business testing frameworks and business tool frameworks using Python (Django) with Bootstrap, Redis, uWSGI, Nginx, and Celery to upload relevant information, enhancing data visualization dashboards.
[0078] Step 11: Notify the user to investigate the discrepancies shown in the completed automated test report. The investigation should include defect information, data discrepancies, problematic video streams, and relevant log information.
[0079] The following descriptions are based on three specific embodiments. Figure 4 An automated test diagram for compilation and packaging according to a specific embodiment of this application is shown, such as... Figure 4 As shown, the entire compilation, packaging, and automated testing process is as follows: 1. Select the product and version number to be packaged. 2. Select the code path and SVN version to be packaged. 3. Select the corresponding automated testing module. 4. Click "Start Build" to compile and package, then enter the automated testing process. 5. After the automated process is completed, relevant information is automatically uploaded to the integrated automated testing platform to display relevant reports. 6. Relevant personnel are automatically notified to investigate related issues on the integrated automated testing platform. 7. End.
[0080] Figure 5 The following is a flowchart illustrating the test framework execution of a test case for a forensic result module according to a specific embodiment of this application: Figure 5 As shown in the diagram, the test framework execution flowchart for the evidence collection result module test cases is as follows: 1. Select the product and version number to be packaged. 2. Select the packaged code path and SVN version. 3. Select the corresponding automated testing module test case for the evidence collection result module. 4. Click "Start Build" to compile and package, then enter the automated testing process. 5. Execute the relevant test case steps according to the flowchart. 6. End.
[0081] Taking the visualization of test results as an example, the process includes: 1. Selecting the product and version number to be packaged. 2. Selecting the packaged code path and SVN version. 3. Selecting the corresponding automated testing module's test cases. 4. Clicking "Start Build" to compile and package, thus entering the automated testing process. 5. After the automated process is complete, relevant information is automatically uploaded to the integrated automated testing platform to display related reports. 6. Conducting troubleshooting based on the automated test results. 7. End. Figure 6 An automated test report diagram is shown according to a specific embodiment of this application. Figure 7A data difference information diagram according to a specific embodiment of this application is shown. From Figure 6 and Figure 7 You can see the overall visualization information of the automated test results, including the test project, the executor, the time spent, the test cases, and the data verification results. You can intuitively see whether there are differences in the content comparison results. The difference information map highlights the difference locations, and different background colors can be used to indicate the matching type. Figure 8 The diagram illustrates the execution of a specific embodiment of this application, showing the automated test execution status, including data such as the number of builds, execution time, data volume, number of test case executions, number of automated defects, and total number of tool executions.
[0082] This application utilizes a fully automated testing method and system. Developers upload code, select relevant automated testing configurations, package and compile it, triggering the pipeline. Once packaged and compiled, the business testing framework executes automated test cases on real devices within the cluster. During execution, in addition to the test scripts, relevant data comparisons (database content comparison, configuration layer verification, interface content comparison, etc.) are triggered by the business tool framework. After automated testing, relevant information is automatically uploaded to the integrated automated testing operation platform, displaying relevant report carriers (test results, defects, product logs, related data content, video streams, etc.) and sending notifications to the project team for investigation. For failed test cases, the system pushes them back to developers for repair and separate verification of failed test cases. This accelerates the improvement of overall code quality and testing efficiency. Unlike other automated testing systems on the market, this application designs and executes tests based on the uniqueness of the business and the development testing process. The entire system is designed for Windows products and is applicable to all software products based on the Windows operating system. It is currently being used in the internal mobile phone forensics business line for developers and testers in their daily automated testing processes.
[0083] The following is for reference. Figure 9 It shows a schematic diagram of the structure of a computer system 900 suitable for implementing electronic devices according to embodiments of the present application. Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0084] like Figure 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the system 900. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0085] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a liquid crystal display (LCD) and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card and a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 910 as needed so that computer programs read from it can be installed into storage section 908 as needed.
[0086] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs the functions defined in the methods of this application. It should be noted that the computer-readable storage medium of this application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0087] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0088] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0089] The modules described in the embodiments of this application can be implemented in software or in hardware.
[0090] On the other hand, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following: It constructs an interface layout, where the interface uses Groovy code to implement composite text selection boxes for data association; it uses Redis to start a scheduled task, and executes a Python script within the scheduled task, reading cross-domain file information in real time and passing parameters to Groovy, performing file traversal of the directory using Python, and then using Groovy to read the returned information and update the constructed interface data in real time; it reads relevant business data through pipelined statements to form test case configurations and business function configurations, and the construction results are automatically updated locally for the business testing framework to read; it automatically connects and deploys to remote cluster nodes, executes scripts and updates configurations to specified different hardware devices, and the different hardware devices decompose the configurations to various business testing frameworks based on the updated configuration information. The process system executes concurrently according to test case configurations and business function configurations. Based on the read test case configurations, it expands and executes a series of general object libraries, general DLLs, and general code libraries. Data generated during test case execution is passed to the business tool framework for parsing. The business tool framework receives data via the passed file path, determines the file type and data type based on the file path, and performs rapid matching and parsing of complex data using similarity and difference matrix comparison principles. It records relevant difference information to a designated report path. The business tool framework then uploads the recorded comparison file information to the integrated automated testing operation platform for display and parsing. The integrated automated testing operation platform reads and parses the files within the report, using different styles depending on the comparison type, and displays the information within the difference files. Users are then notified to investigate based on the difference information displayed in the completed automated test report.
[0091] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A fully automated testing method, characterized in that, include: S1: Construct the interface layout, which uses Groovy code to implement a composite text selection box for data association; S2: Use Redis to start a scheduled task, and execute a Python script in the scheduled task to read cross-domain file information in real time and pass it to the Groovy code. The Python script performs file traversal of the directory, and the Groovy code reads the returned information to update the interface data in real time. S3: Read relevant business data through pipeline statements to form test case configurations and business function configurations, and automatically update the build results to the local machine for the business test framework to read; S4: Remote cluster nodes automatically connect and deploy, execute scripts and update configurations to specified different hardware devices. The different hardware devices are decomposed into various business test framework process systems according to the updated configuration information, and executed concurrently according to the test case configuration and the business function configuration. S5: Based on the test case configuration, a series of general object libraries, general DLLs, and general code libraries are executed. During the execution of the test cases, the data generated is passed to the business tool framework for parsing. The business tool framework receives the data through the file path passed in the parameter, determines the file type and data type through the file path, performs similarity and difference matrix comparison to quickly match and parse complex data and compare content, and records the relevant difference information to the specified report path. The execution process in S5 specifically includes: the general object library includes a product object UI recognition library, the general dll can reference external dlls for quick calling or related business dlls for referencing, and the general code library combines the general object library and the general dll to call and implement the execution of business test cases; S6: The business tool framework records the comparison file information and uploads it to the automated testing integrated operation platform for display and parsing. The automated testing integrated operation platform reads the supporting files in the report for parsing and uses different styles according to the comparison type to parse and display the information in the difference files, and notifies the user to investigate based on the difference information displayed in the completed automated test report.
2. The fully automated testing method according to claim 1, characterized in that, The test case configuration in S3 includes a configuration file that automatically converts manual test cases into automated test cases. The business testing framework automatically reads the test case configuration to form a test script to execute the current test case. The business function configuration includes the test project name, function module selection, pipeline information, and installation package information.
3. The fully automated testing method according to claim 1, characterized in that, The data parameters generated during the execution of test cases in S5 are passed to the business tool framework for parsing, specifically including: parsing and comparing the data based on different database types, including SQLite and PostgreSQL; and parsing and comparing the data based on the configured data types, including xml, sql, ini, db, CSV, xlsx, word, and pdf.
4. The fully automated testing method according to claim 1, characterized in that, The content in S6 that notifies the user to investigate based on the discrepancy information displayed in the completed automated test report specifically includes defect information, data discrepancy information, problem video streams, and related log information.
5. A computer-readable storage medium having one or more computer programs stored thereon, characterized in that, When the one or more computer programs are executed by a computer processor, they perform the method according to any one of claims 1 to 4.
6. A fully automated testing system, characterized in that, The system includes: Pipeline build platform: Configured for building interface layout. The interface uses Groovy code to implement composite text selection boxes for data association. Redis is used to start a scheduled task, and a Python script is executed in the scheduled task to read cross-domain file information in real time and pass it to the Groovy code. The Python script performs file traversal of the directory, and the Groovy code reads the returned information to update the build interface data in real time. Pipeline statements read relevant business data to form test case configuration and business function configuration. The build results are automatically updated to the local machine for the business test framework to read. Remote cluster nodes are automatically connected and deployed, and scripts are executed to update the configuration to the specified different hardware equipment machines. Business testing framework: The configuration is used to decompose the different hardware equipment into various business testing framework process systems according to the updated configuration information, and execute them concurrently according to the test case configuration and the business function configuration. Based on the test case configuration, a series of general object libraries, general DLLs and general code libraries are executed. The data generated during the execution of test cases is passed to the business tool framework for parsing. The general object library includes a product object UI recognition library. The general DLL can reference external DLLs for quick calling or reference related business DLLs. The general code library combines the general object library and the general DLL to implement the execution of business test cases. Business tool framework: Configured to receive data via file path passed as a parameter, determine file type and data type based on the file path, perform similarity and difference matrix comparison to quickly match and parse complex data and compare content, and record relevant difference information to the specified report path. The business tool framework will then upload the recorded comparison file information to the automated testing integrated operation platform for display and parsing. The integrated automated testing operation platform is configured to parse the accompanying files in the report, and use different styles according to the comparison type to parse and display the information in the difference files. It notifies users to investigate the difference information displayed in the completed automated test report. The investigation content specifically includes defect information, data difference information, problem video streams, and related log information.
7. The fully automated testing system according to claim 6, characterized in that, The test case configuration in the pipeline construction platform includes a configuration file that automatically converts manual test cases into automated test cases. The business testing framework automatically reads the test case configuration to form a test script to execute the current test case. The business function configuration includes the test project name, function module selection, pipeline information, and installation package information.
8. The fully automated testing system according to claim 6, characterized in that, The business tool framework is an N-in-1 business executable tool implemented in Python using pandas, CRC32, json, and numpy.
9. The fully automated testing system according to claim 6, characterized in that, The automated testing integrated operation platform is built using Python with Bootstrap, Redis, uWSGI, Nginx, and Celery to connect the business testing framework and the business tool framework for uploading relevant information.
Citation Information
Patent Citations
Node-based automatic test system
CN110928774A
Software testing method and device, computer equipment and storage medium
CN114564385A