Regression testing method, device, electronic device and storage medium

Through slice division and the use of virtual environment containers in the software product testing environment, automated regression testing is realized, solving the problems of high labor consumption and low accuracy caused by manual participation in the prior art, and improving testing efficiency and accuracy.

CN114490365BActive Publication Date: 2024-11-08BEIJING QIERBULAITE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210050503.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2024-11-08
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

The existing regression test requires a lot of manual participation, resulting in high labor time consumption and low accuracy, and it is impossible to efficiently complete the version iteration and functional modification of the software product.

Method used

By setting up a software product test environment, forming a test case according to the slice segmentation of functional modules, using the virtual environment container and port to obtain the test results stored in slice segmentation, automatically comparing the expected and actual results, and real regression testing is realized.

Benefits of technology

The regression testing process is automated, which improves testing efficiency, saves testing time, directly displays the inconsistency of test results, and reduces the need for manual verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490365B_ABST
    Figure CN114490365B_ABST
Patent Text Reader

Abstract

The present invention discloses a regression testing method, device, electronic device and storage medium, the method comprising the steps of: setting a test environment for a software product and creating a test task for the software product; obtaining a virtual environment container for the test task for the software product and a port for the test task for the software product according to the test environment for the software product and the test task for the software product; obtaining a test result stored by slicing the test task for the software product; creating a case for regression testing of the software product according to the test result stored by slicing the test task for the software product, and obtaining regression test results requested by multiple software product test tasks. The present application can automatically obtain nodes with problems in software testing, realize microservices for software product testing by slicing and storing, improve the efficiency of regression testing, save test time, directly display the inconsistency of test results, and does not require manual verification of test results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a regression testing method, device, electronic equipment and storage medium. Background Art

[0002] In order to meet the needs of software products, software systems will be frequently modified and innovated throughout their life cycle. The version iteration process will cause code modifications and additions. After the original functions are modified and new functions are added, regression testing is required for the application interface and functions to verify whether the code modifications and additions will introduce errors. In the existing technology, regression testing needs to be done manually, which consumes a lot of testers' working hours, but the accuracy and return rate are very low.

[0003] Therefore, a regression testing method is needed that can slice and divide the test software product into cases according to the model classification, and obtain the regression test results by comparing the results during regression testing. Summary of the invention

[0004] To this end, the present invention provides a regression testing method, device, electronic device and storage medium, in an effort to solve or at least alleviate at least one of the above problems.

[0005] According to one aspect of the present invention, a regression testing method is provided. The method sets a software product testing environment, slices and divides the software product according to the functional modules to form a software product test case, marks the expected result, and performs a result comparison and verification based on the software product test case during the subsequent software product regression test. The method comprises the steps of:

[0006] A test environment for a software product is set up and a test task for the software product is created, wherein the test environment includes network information, tracking point information, and interface request information; based on the test environment for the software product and the test task for the software product, a virtual environment container for the test task for the software product and a port for the test task for the software product are obtained; based on the virtual environment container for the test task for the software product and the port for the test task for the software product, test results stored in slices of the test task for the software product are obtained, wherein the test results include interface operation results, tracking point information results, and interface request information results; based on the test results stored in slices of the test task for the software product, a case for regression testing of the software product is obtained; based on the case for regression testing of the software product, regression test results requested by multiple test tasks for the software product are obtained.

[0007] In another embodiment, the steps of setting up a test environment for a software product and creating a test task for a software product include: setting an IP address and domain name for the software product test, a reporting uniform resource locator for tracking information of the software product test, a reporting uniform resource locator for interface information, and uniform resource locator parameters for a virtual object interface request and a response result for a virtual object interface request, to obtain the test environment for the software product; and creating a test task for the software product based on relevant configuration parameters in the test environment for the software product.

[0008] In another embodiment, the step of acquiring the virtual environment container of the software product test task and the port of the software product test task based on the test environment of the software product and the test task of the software product includes: creating an image of the virtual environment container of the software product test environment based on the test environment of the software product; creating the virtual environment container of the software product test task based on the image of the virtual environment container of the software product test environment and the software product test task; acquiring the service port of the virtual environment container of the software product test task based on the virtual environment container of the software product test task; acquiring the port proxy of the software product test environment and the software product test task based on the service port of the virtual environment container of the software product test task.

[0009] In another embodiment, the step of obtaining the test results stored in the slice division of the software product test task based on the virtual environment container of the software product test task and the port of the software product test task, wherein the test results include interface operation results, tracking information results, and interface request information results, comprises: obtaining a code automatic generator encapsulated by the test content elements of the software product based on the test content of the software product test task; obtaining the python code automatically generated by the test content elements of the software product based on the code automatic generator; obtaining the application module classification of the python code based on the python code automatically generated by the test content elements of the software product; obtaining the expected interface operation results after the test of the application module classification, and the tracking information, interface information and tracking information results, and interface information results stored in the slice division during the test based on the application module classification; obtaining the tracking information mark and interface information mark after the expected interface operation results after the test of the application module classification, and the tracking information, interface information and tracking information results, and interface information results stored in the slice division during the test, based on the expected interface operation results after the test of the application module classification, and the tracking information, interface information and tracking information results, and interface information results stored in the slice division during the test,

[0010] In another embodiment, the test content elements of the software product include: element click, image click, page jump, text input, and sliding.

[0011] In another embodiment, the step of obtaining regression test results of multiple software product test task requests based on a software product regression test case includes: obtaining the software product test environment for the regression test of each software product test task request, the service port of each software product test task request, and the operation playback of the software product regression test case based on the test steps of the software product regression test case; testing each of the software product test task requests to obtain actual test results of the software product test task request, the actual test results including tracking point information, interface request information, interface information and tracking point information results, interface request information results, and interface information results; based on the actual test results of the software product test task request, obtaining test information that is inconsistent with the actual test results of the software product test task request and the test playback of the software product regression test case.

[0012] In another embodiment, the step of obtaining, based on the actual test result of the software product test task request, test information that is inconsistent with the actual test result of the software product test task request and the test playback of the software product regression test case includes:

[0013] Obtaining the inconsistency between the expected interface operation results, buried point information, and interface request information in the actual test results and the expected interface operation results, buried point information marks, and interface information marks in the test playback;

[0014] Based on the inconsistency, a visual display result of comparing the actual test result with the test playback is obtained.

[0015] According to another aspect of the present invention, a regression testing device is disclosed. The device sets a software product test environment, slices and divides the software product according to the functional modules of the software product to form a software product test case, marks the expected result, and performs result comparison and verification based on the software product test case during the subsequent software product regression test. The device comprises: a test environment configuration module, which is used to set the test environment of the software product and create a test task of the software product, wherein the test environment includes network information, tracking information, and interface request information; obtain a virtual environment container of the software product test task and a port of the software product test task according to the test environment of the software product and the test task of the software product; a test case generation module, which is used to obtain a test result stored in the slice division of the software product test task according to the virtual environment container of the software product test task and the port of the software product test task, wherein the test result includes an interface operation result, a tracking information result, and an interface request information result; obtain a case of software product regression testing according to the test result stored in the slice division of the software product test task; and a software regression testing module, which is used to obtain regression test results requested by multiple software product test tasks according to the case of software product regression testing.

[0016] According to another aspect of the present invention, there is provided a computing device, comprising: one or more processors; and a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the regression testing methods described above.

[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, enable the computing device to perform any of the regression testing methods described above.

[0018] According to the regression test scheme of the present invention, by setting the test environment of the software product and creating the test task of the software product; according to the test environment of the software product and the test task of the software product, obtaining the virtual environment container of the software product test task and the port of the software product test task; according to the virtual environment container of the software product test task and the port of the software product test task, obtaining the test result stored by slicing the software product test task; according to the test result stored by slicing the software product test task, obtaining the case of software product regression test; according to the case of software product regression test, obtaining the regression test results requested by multiple software product test tasks. The present application can utilize the test software of the prior art to automatically obtain the nodes with problems in the software test, and can realize the microservice of software product testing by slicing and dividing the storage, facilitate the extraction of cases, improve the efficiency of regression testing, save test time, directly display the inconsistency of test results, and do not need to manually check the test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.

[0020] Figure 1 A schematic diagram showing the structure of a computing device 100 according to an embodiment of the present invention; and

[0021] Figure 2 A flowchart of a regression testing method 200 according to an embodiment of the present invention is shown; and

[0022] Figure 3 A schematic structural diagram of a regression testing device 300 according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0024] Figure 11 is a block diagram of an example computing device 100. In a basic configuration 102, computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between processor 104 and system memory 106.

[0025] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.

[0026] Depending on the desired configuration, the system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 may be arranged to operate on the operating system using the program data 124. In some embodiments, the computing device 100 is configured to execute a regression testing method 200, which can form a software product test case by slicing and dividing the software product according to the functional modules of the software product by setting a software product test environment, marking the expected results, and performing result comparison and verification based on the software product test case during subsequent software product regression testing. The program data 124 includes instructions for executing the method 200.

[0027] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164.

[0028] A network communication link may be an example of a communication medium. The communication medium may generally be embodied as a computer-readable instruction, data structure, program module in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. A "modulated data signal" may be a signal in which one or more of its data sets or its changes may be performed in a manner that encodes information in the signal. As a non-limiting example, the communication medium may include a wired medium such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used herein may include both storage media and communication media. In some embodiments, one or more programs are stored in a computer-readable medium, and the one or more programs include instructions for executing certain methods, such as, according to an embodiment of the present invention, the computing device 100 executes the regression testing method 200 by means of the instructions.

[0029] The computing device 100 may be implemented as part of a small-sized portable (or mobile) electronic device, such as a cellular phone, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application-specific device, or a hybrid device that may include any of the above functions. The computing device 100 may also be implemented as a personal computer including desktop and notebook computer configurations.

[0030] Figure 2 FIG. 2 is a flowchart of a regression testing method 200 according to an embodiment of the present invention. Figure 2As shown, the method 200 sets up a software product test environment, slices and divides the software product according to the functional modules of the software product to form a software product test case, marks the expected results, and performs a result comparison and verification based on the software product test case during subsequent software product regression testing. The method 200 starts at step S210, sets up a software product test environment and creates a software product test task, wherein the test environment includes network information, tracking point information, and interface request information.

[0031] Specifically, the test environment of a software product is the system for testing the software product and the network parameters and system parameters that need to be configured. In the embodiment of the present application, the software product refers to the application software that is installed on the mobile terminal and is ready for testing. The network information of the test environment is the IP address, domain name and other information set for the software product to be tested. It is also necessary to set the uniform resource locator information reported by the embedding point and the uniform resource locator information reported by the interface. In some special cases, if a mock service test is required for a specific interface, it is also necessary to set the mock interface request uniform resource locator parameters and the interface return response value. The mock service test is to create a virtual object for testing some objects that are not easy to construct or obtain during the test process.

[0032] Specifically, in one embodiment of the present application, the steps of setting up a test environment for a software product and creating a test task for the software product include:

[0033] Set the IP address and domain name for software product testing, the reporting uniform resource locator of the tracking point information of the software product testing, the reporting uniform resource locator of the interface information, the uniform resource locator parameters of the virtual object interface request and the virtual object interface request response result, and obtain the test environment of the software product;

[0034] Create test tasks for software products based on relevant configuration parameters in the test environment of the software products.

[0035] Specifically, the test environment information of the software product that has been set up can be stored in a set test environment service system, so that when testing other software products, the test environment information of the software product can be directly called without repeated settings. After the test environment information of the software product is set up, the test task of the software product can be created. The test task of the software product is to load the relevant software product to be tested onto the software test program, and the software test program tests the corresponding software product. The test task of the software product first needs to be stored in the test environment service system together with the test environment of the software product. The test environment information for the software product can be set up in advance and then called by the system, so it can greatly save the testing time and the time for development and troubleshooting.

[0036] Through step S220, according to the test environment of the software product and the test task of the software product, a virtual environment container of the test task of the software product and a port of the test task of the software product are obtained.

[0037] Specifically, the virtual environment container Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable container, and then publish them to any popular Linux machine. It can also achieve virtualization. The container completely uses the sandbox mechanism, and there will be no interface between each other. By creating a docker image, and then creating a docker container based on the test environment and test tasks of the software product, an independent port can be mounted for each software product test task.

[0038] Specifically, in one embodiment of the present application, the step of obtaining the virtual environment container of the software product test task and the port of the software product test task according to the test environment of the software product and the test task of the software product includes:

[0039] Based on the test environment of the software product, create an image of the virtual environment container of the software product test environment; the image of the virtual environment container of the software product test environment is a special file system, which not only provides the programs, libraries, resources, configurations and other files required for the runtime of the virtual environment container, but also includes some configuration parameters prepared for runtime.

[0040] Based on the image of the virtual environment container of the software product testing environment and the software product testing task, a virtual environment container of the software product testing task is created; the virtual environment container is created based on the image of the virtual environment container, that is, the process in the virtual environment container depends on the files in the image of the virtual environment container, and the files here include executable files, dependent software, library files, configuration files, etc. required for the process to run; the concept of the virtual environment container image is similar to the image of a virtual machine, which is a read-only template, an independent file system, including the data required to run the virtual environment container, and can be used to create a new virtual environment container.

[0041] According to the virtual environment container of the software product testing task, the service port of the virtual environment container of the software product testing task is obtained; specifically, for a software product testing task, an independent virtual environment container port is assigned, and independent service for the software product testing task is implemented through the independent port.

[0042] According to the service port of the virtual environment container of the software product test task, the port proxy of the software product test environment and the software product test task is obtained. After the setting of the virtual environment container and the configuration of the service port are completed, the corresponding port proxy is established through the port configuration of the software product test environment and the software product test task, and the corresponding test data can be obtained through the port proxy to test the software product related data.

[0043] By setting an independent service port for the software product testing task and a port proxy between the software product testing environment and the software product testing task, each device and each application can run independently during the software product testing, achieving isolation conditions and solving the problem of parallel operation without affecting each other.

[0044] Through step S230, based on the virtual environment container of the software product testing task and the port of the software product testing task, the test results stored in the slice division of the software product testing task are obtained, and the test results include interface operation results, tracking point information results, and interface request information results.

[0045] Specifically, after completing the corresponding configuration, according to the software product test tasks and the ports of the software product test tasks, the software product can be tested based on Appium. Appium is an open source, cross-platform automated testing tool for testing native and lightweight mobile applications, supporting iOS, Android and FirefoxOS platforms. It supports multiple platforms and languages, such as python, java, ruby, js, c#, etc.; it can be used on OSX, Windows and Linux desktop systems; it adopts the Client / Server design mode, as long as the client can send http requests to the server, then the client can be implemented in any language. In an embodiment of the present application, Appuim encapsulates operations such as element clicks, image clicks, page jumps, text input, and sliding of a software product, creates an automatic code generator, performs full-process testing on the software product, and generates Python code based on the automatic code generator to record the tracking information and interface request information generated during the software product testing process, as well as the tracking information results and node request information results. When testing the software product, the software product is sliced ​​according to modular requirements, and each slice segment is stored separately. The expected interface operation results after the test are set for each slice division, and the expected interface operation results, combined with the tracking information results and the interface request information results, are stored separately on the test server.

[0046] Specifically, in one embodiment of the present application, the step of obtaining the test results stored in the slice division of the software product test task based on the virtual environment container of the software product test task and the port of the software product test task, wherein the test results include interface operation results, buried point information results, and interface request information results, comprises:

[0047] According to the test content of the software product test task, an automatic code generator encapsulated by the test content elements of the software product is obtained; in an embodiment of the present application, the test content elements of the software product include: element click, picture click, page jump, text input, sliding and other operations.

[0048] Obtaining the Python code automatically generated by the test content element of the software product according to the automatic code generator;

[0049] According to the python code automatically generated by the test content element of the software product, the application module classification of the python code is obtained; specifically, for a software product, it can be divided into multiple functional modules, and the display interface or application function of each functional module is independent. Therefore, the software product testing task can be classified according to each application module, and a software product testing task can be sliced ​​and divided. In this way, a software product testing task is divided into subtasks of multiple software product testing tasks. In particular, when only one or several functions of the software product are tested, it is only necessary to divide the slice for testing to complete the testing task, thereby improving the testing efficiency.

[0050] According to the application module classification of the Python code, the expected interface operation results after the test of the application module classification, and the tracking information, interface information and tracking information results, and interface information results stored in the slice division during the test are obtained; specifically, after the software product test task is sliced, the tracking information, interface information and tracking information results, interface information results of each slice division, and the expected interface operation results after the test are stored according to the slice division.

[0051] According to the expected interface operation results after the test classified by the application module, and the embedded point information, interface information and embedded point information results, and interface information results stored by slicing during the test, the embedded point information mark and interface information mark after combining the expected interface operation results and interface information results stored by slicing are obtained. By marking the embedded point information mark and interface information mark, preparation is made for building a case for regression testing of software products.

[0052] Through step S240, the stored test results are divided according to the slices of the software product test task to obtain a case of software product regression test.

[0053] Specifically, after a software product testing task is completed, the test results of the software product can be used as a case for continued testing after improving one or more modules of the software product. By comparing the case with the results of continued testing after later improving one or more modules of the software product, the inconsistency between the two can be clearly identified.

[0054] Through step S250, regression test results of multiple software product test task requests are obtained according to the software product regression test case.

[0055] Specifically, the multiple software product testing task requests here are modifications or new tests on the software products in the software product regression test cases. The test results generated by the software product testing tasks are used as comparison data for the test results of the multiple software product testing task requests. The inconsistency between the two is obtained through data comparison, thereby obtaining the differences in the interface operations of the multiple software product testing task requests.

[0056] Specifically, in one embodiment of the present application, the step of obtaining regression test results of multiple software product test task requests based on a software product regression test case includes:

[0057] According to the test steps of the software product regression test case, obtain the software product test environment of the regression test requested by each software product test task, the service port of each software product test task request, and the operation playback of the software product regression test case; specifically, the test environment configuration of the software product test task request needs to be the same as the test environment configuration of the software product regression test case, determine the test environment of the regression test, the test scope of the software product and the software product to be tested that has been connected to the port, and then test each software product test task request according to the same steps and test software as the software product regression test case, set replay on each software product test task request, the purpose of replay is to obtain the data content and results of the software product regression test case, by creating a virtual environment container for each software product test task request, each virtual environment container mounts an independent port, and connects the proxy port on the target device.

[0058] Test each of the software product test task requests to obtain actual test results of the software product test task requests, wherein the actual test results include burying point information, interface request information, interface information and burying point information results, interface request information results, and interface information results;

[0059] According to the actual test results of the software product test task request, the test information that is inconsistent with the actual test results of the software product test task request and the test playback of the software product regression test case is obtained. Specifically, by replaying the data content and results of the software product regression test case, the actual results, buried points, interface requests, interface return results and other information of the software product regression test case are collected during the playback and stored in the replay server, and the actual test results of the software product test task request are compared with the data content and results of the software product regression test case to obtain the inconsistency of the data content and results.

[0060] Specifically, based on the slice division of regression test cases of software products that have been determined to require regression testing, they can be replayed and tested in parallel on multiple devices, thereby improving regression testing efficiency and saving labor costs.

[0061] Specifically, in one embodiment of the present application, the step of obtaining, based on the actual test result of the software product test task request, test information that is inconsistent with the actual test result of the software product test task request and the test playback of the software product regression test case includes:

[0062] Obtaining the inconsistency between the expected interface operation results, buried point information, and interface request information in the actual test results and the expected interface operation results, buried point information marks, and interface information marks in the test playback;

[0063] According to the inconsistency, a visual display result of the comparison between the actual test result and the test playback is obtained. Specifically, by displaying the comparison between the actual test result and the test playback in a visual display manner, the result of the software modification or update can be obtained more clearly. Through the visual display, there is no need for manual verification.

[0064] Specifically, during the software product testing process, tracking information is collected and recorded, and the results are verified based on the tracking information generated by each node, which reduces the time for manual verification and avoids omissions and inconsistency judgment errors in tracking test. Modifications to interface codes during software product testing require regression testing of the interface. The interface has many parameters and the returned results are logically complex. Manual verification is very time-consuming. Through interface information interception, the interface requests in the specified test environment are denoised and then played back in the test environment that needs regression. This saves the time for manual verification of each parameter of the interface and improves testing efficiency.

[0065] In the embodiment of the present application, the test task of the software product supports multi-task parallelism. The task created according to the test environment, the uniform resource locator of the reported buried point, the uniform resource locator of the interface request, the mock service and other information generates an independent configuration task ID, thereby triggering the corresponding scene recording and replay tasks. Specifically, it includes the following contents: obtaining the device application installed on the system, and after the task is triggered, it will be distributed to the specified device in the resource pool; when the task is triggered, the container is automatically applied, so the task will be distributed to the device mounted with the corresponding container to run, and ensure that each device has an independent port to run to avoid port conflicts; trigger the start and replay buttons on the task to generate data that can be stored on the test server and the replay server.

[0066] According to the regression test scheme of the present invention, by setting the test environment of the software product and creating the test task of the software product; according to the test environment of the software product and the test task of the software product, obtaining the virtual environment container of the software product test task and the port of the software product test task; according to the virtual environment container of the software product test task and the port of the software product test task, obtaining the test result stored by slicing the software product test task; according to the test result stored by slicing the software product test task, obtaining the case of software product regression test; according to the case of software product regression test, obtaining the regression test results requested by multiple software product test tasks. The present application can utilize the test software of the prior art to automatically obtain the nodes with problems in the software test, and can realize the microservice of software product testing by slicing and dividing the storage, facilitate the extraction of cases, improve the efficiency of regression testing, save test time, directly display the inconsistency of test results, and do not need to manually check the test results.

[0067] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0068] In one embodiment, Figure 3As shown, a regression testing device 300 is provided, wherein the device 300 sets a software product testing environment, slices and divides the software product according to the functional modules to form software product test cases, marks expected results, and performs result comparison and verification based on the software product test cases during subsequent software product regression testing. The device 300 includes: a test environment configuration module, a test case generation module, and a software regression testing module.

[0069] The test environment configuration module is used to set the test environment of the software product and create the test task of the software product, wherein the test environment includes network information, embedding information, and interface request information; based on the test environment of the software product and the test task of the software product, the virtual environment container of the test task of the software product and the port of the test task of the software product are obtained;

[0070] A test case generation module is used to obtain the test results stored in the slice division of the software product test task according to the virtual environment container of the software product test task and the port of the software product test task, wherein the test results include interface operation results, tracking point information results, and interface request information results; and obtain the case of software product regression test according to the test results stored in the slice division of the software product test task;

[0071] The software regression testing module is used to obtain regression testing results of multiple software product testing task requests based on software product regression testing cases.

[0072] Specifically, in another embodiment of the present application, the test environment configuration module is used to set the IP address and domain name for the software product test, the reporting uniform resource locator of the tracking point information of the software product test, the reporting uniform resource locator of the interface information, and the uniform resource locator parameters of the virtual object interface request and the virtual object interface request response result, to obtain the test environment of the software product; and create a test task for the software product based on the relevant configuration parameters in the test environment of the software product.

[0073] Specifically, in another embodiment of the present application, the test environment configuration module is used to create an image of the virtual environment container of the software product test environment based on the test environment of the software product; create a virtual environment container of the software product test task based on the image of the virtual environment container of the software product test environment and the software product test task; obtain a service port of the virtual environment container of the software product test task based on the virtual environment container of the software product test task; obtain a port proxy of the software product test environment and the software product test task based on the service port of the virtual environment container of the software product test task.

[0074] Specifically, in another embodiment of the present application, the test case generation module is used to obtain a code automatic generator encapsulated by the test content elements of the software product based on the test content of the software product test task; obtain the python code automatically generated by the test content elements of the software product based on the code automatic generator; obtain the application module classification of the python code based on the python code automatically generated by the test content elements of the software product; obtain the expected interface operation results after the test of the application module classification, and the buried point information, interface information and buried point information results, and interface information results stored in the slice division during the test based on the application module classification; obtain the buried point information mark and interface information mark that are the combination of the expected interface operation results and the interface information results stored in the slice division based on the expected interface operation results after the test of the application module classification, and the buried point information, interface information and buried point information results, and interface information results stored in the slice division during the test.

[0075] Specifically, in another embodiment of the present application, the software regression testing module is used to obtain the software product testing environment for the regression test of each software product testing task request, the service port of each software product testing task request, and the operation playback of the software product regression testing case according to the testing steps of the software product regression testing case; test each of the software product testing task requests to obtain the actual test results of the software product testing task request, and the actual test results include tracking point information, interface request information, interface information and tracking point information results, interface request information results, and interface information results; based on the actual test results of the software product testing task request, obtain the test information that is inconsistent with the actual test results of the software product testing task request and the test playback of the software product regression testing case.

[0076] Specifically, in another embodiment of the present application, the software regression testing module is used to obtain the inconsistency between the expected interface operation results, tracking information, interface request information in the actual test results and the expected interface operation results, tracking information marks, and interface information marks in the test playback; based on the inconsistency, obtain a visual display result of the comparison between the actual test results and the test playback.

[0077] According to the regression test scheme of the present invention, the test environment of the software product is set and the test task of the software product is created through the test environment configuration module; according to the test environment of the software product and the test task of the software product, the virtual environment container of the software product test task and the port of the software product test task are obtained; the test case generation module obtains the test result stored by slicing the software product test task according to the virtual environment container of the software product test task and the port of the software product test task; according to the test result stored by slicing the software product test task, the case of software product regression test is obtained; the software regression test module obtains the regression test results requested by multiple software product test tasks according to the case of software product regression test. The present application can utilize the test software of the prior art to automatically obtain the nodes with problems in the software test, and can realize the microservice of software product testing by slicing and dividing the storage, facilitate the extraction of cases, improve the efficiency of regression testing, save test time, directly display the inconsistency of test results, and do not need to manually check the test results.

[0078] It should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0079] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0080] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0081] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0082] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0083] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0084] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.

Claims

1. A regression testing method, wherein the method sets up a software product testing environment, slices and divides the software product according to the functional modules to form a software product test case, marks the expected result, and performs a result comparison and verification based on the software product test case during subsequent software product regression testing. The method comprises the steps of: Setting up a test environment for a software product and creating a test task for the software product, wherein the test environment includes network information, embedding information, and interface request information; According to the test environment of the software product and the test task of the software product, a virtual environment container of the test task of the software product and a port of the test task of the software product are obtained, specifically including: according to the test environment of the software product, an image of the virtual environment container of the test environment of the software product is created; according to the image of the virtual environment container of the test environment of the software product and the test task of the software product, a virtual environment container of the test task of the software product is created; according to the virtual environment container of the test task of the software product, a service port of the virtual environment container of the test task of the software product is obtained; according to the service port of the virtual environment container of the test task of the software product, a port proxy of the test environment of the software product and the test task of the software product is obtained; According to the virtual environment container of the software product test task and the port of the software product test task, the test results of the sliced ​​storage of the software product test task are obtained, and the test results include interface operation results, buried point information results, and interface request information results; Obtaining cases of regression testing of software products according to the test results stored in the slice division of the software product testing task; Based on the cases of software product regression testing, regression test results of multiple software product testing task requests are obtained.

2. The method of claim 1, wherein: The steps of setting up a test environment for the software product and creating a test task for the software product include: Set the IP address and domain name for software product testing, the reporting uniform resource locator of the tracking point information of the software product testing, the reporting uniform resource locator of the interface information, the uniform resource locator parameters of the virtual object interface request and the virtual object interface request response result, and obtain the test environment of the software product; Create test tasks for software products based on relevant configuration parameters in the test environment of the software products.

3. The method of claim 1, wherein: The step of obtaining the test results of the sliced ​​partitioning and storage of the software product test task based on the virtual environment container of the software product test task and the port of the software product test task, wherein the test results include interface operation results, buried point information results, and interface request information results, comprises: According to the test content of the software product test task, obtain a code automatic generator encapsulated by the test content elements of the software product; Obtaining the Python code automatically generated by the test content element of the software product according to the automatic code generator; According to the python code automatically generated by the test content element of the software product, obtaining the application module classification of the python code; According to the application module classification of the Python code, the expected interface operation results after the test of the application module classification are obtained, and the embedded point information, interface information and embedded point information results, and interface information results stored by slicing and dividing during the test process; Based on the expected interface operation results after the test classified by the application module, and the embedded point information, interface information and embedded point information results, and interface information results stored in the slice division during the test, the embedded point information mark and interface information mark that are a combination of the expected interface operation results and interface information results stored in the slice division are obtained.

4. The method of claim 3, wherein: The test content elements of the software product include: Element click, image click, page jump, text input, sliding.

5. The method of claim 1, wherein: The step of obtaining regression test results of multiple software product test task requests based on the case of software product regression testing includes: According to the test steps of the software product regression test case, obtain the software product test environment for the regression test requested by each software product test task, the service port requested by each software product test task, and the operation playback of the software product regression test case; Test each of the software product test task requests to obtain actual test results of the software product test task requests, wherein the actual test results include burying point information, interface request information, interface information and burying point information results, interface request information results, and interface information results; According to the actual test result of the software product test task request, test information that is inconsistent with the actual test result of the software product test task request and the test playback of the software product regression test case is obtained.

6. The method of claim 5, wherein: The step of obtaining, based on the actual test result of the software product test task request, test information that is inconsistent with the actual test result of the software product test task request and the test playback of the software product regression test case comprises: Obtaining the inconsistency between the expected interface operation results, buried point information, and interface request information in the actual test results and the expected interface operation results, buried point information marks, and interface information marks in the test playback; Based on the inconsistency, a visual display result of comparing the actual test result with the test playback is obtained.

7. A regression testing device, which sets up a software product testing environment, slices and divides the software product into software product test cases according to the functional modules of the software product, marks the expected results, and compares and verifies the results of subsequent software product regression testing based on the software product test cases, the device comprising: A test environment configuration module is used to set up a test environment for a software product and create a test task for the software product, wherein the test environment includes network information, tracking point information, and interface request information; based on the test environment for the software product and the test task for the software product, a virtual environment container for the test task for the software product and a port for the test task for the software product are obtained, specifically including: based on the test environment for the software product, an image of the virtual environment container for the test environment for the software product is created; based on the image of the virtual environment container for the test environment for the software product and the test task for the software product, a virtual environment container for the test task for the software product is created; based on the virtual environment container for the test task for the software product, a service port of the virtual environment container for the test task for the software product is obtained; based on the service port of the virtual environment container for the test task for the software product, a port proxy for the test environment for the software product and the test task for the software product is obtained; A test case generation module is used to obtain the test results stored in the slice division of the software product test task according to the virtual environment container of the software product test task and the port of the software product test task, wherein the test results include interface operation results, tracking point information results, and interface request information results; and obtain the case of software product regression test according to the test results stored in the slice division of the software product test task; The software regression testing module is used to obtain regression testing results of multiple software product testing task requests based on software product regression testing cases.

8. An electronic device comprising: one or more processors; and Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods according to claims 1-6.

9. A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device performs any one of the methods according to claims 1-6.