Production environment regression verification method and device based on picture comparison, computer equipment and storage medium
Through the production environment regression verification method based on image comparison, the problem that traditional regression tools require a large number of unit use cases and lack of page verification methods is solved, and fast and accurate regression verification is achieved.
Patent Information
- Application Number
- CN202411613829.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-07
AI Technical Summary
Traditional automation regression tools require the development and testing of writing a large number of unit use cases, and lack effective verification methods for the page itself, making it easy to cause omissions.
A production environment regression verification method based on image comparison is adopted to generate comparison reports by obtaining page information, creating comparison tasks, performing regression operations, comparison results and denoising processing to improve verification speed and accuracy.
It significantly reduces the workload and time of regression verification, improves verification speed and accuracy, and avoids errors caused by human factors.
Smart Images

Figure CN119576715A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a production environment regression verification technology, and more specifically to a production environment regression verification method, device, computer equipment and storage medium based on image comparison. Background Art
[0002] As the version continues to iterate, the functions increase day by day, and the system becomes more complex. From the perspective of quality assurance, in addition to ensuring the quality of each new and optimized product, it is also necessary to confirm that the new or modified functions do not affect the previous functions. If a full regression is to be performed, the testing workload will be huge.
[0003] Therefore, a series of automated regression tools are needed to ensure quality. However, traditional automated regression tools require the development and testing of a large number of unit test cases, which is also a considerable workload. In addition, there is no good means of verifying the page itself, and it is usually inspected by human eyes, which is prone to errors.
[0004] Therefore, it is necessary to design a new method to improve the speed of regression verification in the production environment and reduce the workload. Summary of the invention
[0005] The present invention provides a production environment regression verification method, device, computer equipment and storage medium based on image comparison to solve the technical problem that traditional automated regression tools need to develop, test and write a large number of unit use cases, and do not have a good verification method for the page itself, which is prone to errors.
[0006] First, a production environment regression verification method based on image comparison is provided, including:
[0007] Get the page information to be verified by regression;
[0008] Creating a comparison task according to the page information;
[0009] Performing a regression operation according to the comparison task to obtain an execution result;
[0010] Comparing the execution results to obtain a comparison result;
[0011] The comparison result is subjected to noise removal to obtain a comparison report.
[0012] Secondly, a production environment regression verification device based on image comparison is provided, including:
[0013] An acquisition unit, used to acquire page information to be regressed and verified;
[0014] A creating unit, used for creating a comparison task according to the page information;
[0015] An execution unit, used for executing a regression operation according to the comparison task to obtain an execution result;
[0016] A comparison unit, used for comparing the execution results to obtain a comparison result;
[0017] The processing unit is used to perform noise removal on the comparison result to obtain a comparison report.
[0018] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned production environment regression verification method based on image comparison when executing the computer program.
[0019] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned production environment regression verification method based on image comparison are implemented.
[0020] The above-mentioned production environment regression verification method based on image comparison obtains the page information to be regressed, creates a comparison task according to the page information, performs a regression operation according to the comparison task to obtain an execution result, compares the execution result to obtain a comparison result, and performs noise removal on the comparison result to obtain a comparison report. By using the production environment regression verification based on image comparison, the speed of production environment regression verification is improved, the workload is reduced, and errors caused by human factors can be effectively avoided.
[0021] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0023] Figure 1 A schematic diagram of an application scenario of a production environment regression verification method based on image comparison provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of a process flow of a production environment regression verification method based on image comparison provided by an embodiment of the present invention;
[0025] Figure 3 A schematic block diagram of a production environment regression verification device based on image comparison provided by an embodiment of the present invention;
[0026] Figure 4 It is a schematic diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0029] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0031] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of a production environment regression verification method based on image comparison provided in an embodiment of the present invention. Figure 2 A schematic flow chart of a production environment regression verification method based on image comparison provided by an embodiment of the present invention. The production environment regression verification method based on image comparison is applied to a server. The server interacts with a terminal, and the terminal can obtain page information to be regressed, create a comparison task according to the page information, perform a regression operation according to the comparison task to obtain an execution result, compare the execution result to obtain a comparison result, and perform noise removal on the comparison result to obtain a comparison report, thereby improving the speed of production environment regression verification, reducing workload, and effectively avoiding errors caused by human factors.
[0032] Figure 2 1 is a flow chart of a production environment regression verification method based on image comparison provided by an embodiment of the present invention. Figure 2As shown, the method includes the following steps S110 to S150.
[0033] S110, obtaining page information to be verified by regression;
[0034] In this embodiment, the page information includes the page address, whether to log in, and grayscale information.
[0035] Specifically, the page address refers to the network address or URL (Uniform Resource Locator) that can access the page. It is the unique identifier for users or systems to access the page. By entering or clicking this address, the corresponding web page or page can be opened. Whether to log in is an identification information used to indicate whether the user needs to log in to access the page; if login is required, the user must first enter a valid username and password (or other forms of authentication information) before accessing the content of the page; if login is not required, anyone can directly access the page without authentication. Grayscale information is usually related to grayscale release (or grayscale testing). Grayscale release is a software release strategy in which a new version or new function of the software is first released to a small number of users (called "grayscale users") to collect feedback and detect potential problems; if a page contains grayscale information, it may indicate that the page is part of a grayscale release, or that certain functions or content of the page are only available to grayscale users; grayscale information may include whether the user belongs to the target user group of the grayscale release, and the page version or feature set they should see.
[0036] More specifically, the page information to be regressed can be obtained by user input or scanning. That is, the user manually inputs or selects the page information to be regressed through interactive elements such as input boxes and selection boxes on the interface. This information may include the page address, whether login is required, grayscale status, etc. The front-end page will design a corresponding form or input control. After the user fills in the information, the front-end will send this information to the back-end server through an HTTP request. After receiving this information, the back-end server will verify and store it for subsequent regression testing. The user obtains the page information to be regressed by scanning a QR code or barcode containing the page information. This QR code or barcode contains the unique identifier of the page, whether login is required, grayscale status, etc. After the user scans the QR code, the mobile device (such as a mobile phone) will parse the information in the QR code and send this information to the back-end server through a network request. After receiving this information, the back-end server will also verify and store it.
[0037] Among them, through user input or scanning, the page information to be regressed can be quickly obtained, avoiding the tedious process of manual input or search, thereby improving the test efficiency. In addition, the user input or scanning method can reduce the possibility of human input errors, because the user only needs to enter or scan the relevant information according to the prompts, without having to remember or search for complex page information. In addition, the user input or scanning method can be flexibly applied to a variety of test scenarios, such as functional testing, performance testing, compatibility testing, etc., and only needs to adjust the information entered or scanned by the user according to the test requirements. In addition, through the storage and management of page information by the back-end server, the test progress and results can be easily tracked; at the same time, the test data can also be counted and analyzed to provide a basis for subsequent test optimization and improvement.
[0038] S120, creating a comparison task according to the page information;
[0039] In this embodiment, creating a comparison task according to the page information includes: selecting part of the content in the page information to create a comparison task.
[0040] Specifically, first, it is necessary to obtain page information from user input, scanning or other sources. This information may include the page address, whether login is required, grayscale status, and specific content of the page. Then, the obtained page information is parsed to extract the key content required for comparison, which may include the title, body, pictures, links, etc. of the page. According to actual needs, the part to be compared is selected from the parsed page content. For example, only the body of the page may need to be compared, while non-key content such as the title and pictures are ignored. Using the selected comparison content, a comparison task is created, which may involve sending the comparison content to the comparison server, setting comparison parameters (such as comparison algorithm, similarity threshold, etc.), and recording relevant information of the comparison task (such as task ID, creation time, execution status, etc.). The comparison server executes the comparison task according to the set parameters and comparison content, which may involve using text comparison algorithms, image comparison algorithms, etc. to determine the similarity or difference between two or more page contents.
[0041] Among them, by selecting the key content in the page information for comparison, the interference of non-key content in the comparison results can be avoided, thereby improving the accuracy of the comparison. In addition, by parsing and selecting the page information, the amount of data that needs to be compared can be reduced, thereby speeding up the comparison speed and improving the comparison efficiency. In addition, the implementation method can select different comparison contents and comparison parameters according to actual needs, thereby supporting multiple comparison requirements. For example, the full text content, partial paragraphs or specific elements of the page can be compared. In addition, the relevant information recorded when creating the comparison task (such as task ID, creation time, etc.) can facilitate the subsequent tracking and management of the comparison results. At the same time, the comparison results can also be used as the basis for subsequent processing (such as page optimization, error repair, etc.).
[0042] S130, performing a regression operation according to the comparison task to obtain an execution result;
[0043] In this embodiment, the regression operation is performed according to the comparison task to obtain the execution result, including: performing the regression operation on each page in the comparison task, that is, accessing the grayscale environment, production environment, and production copy corresponding to each page respectively, and completing the screenshot to obtain the execution result.
[0044] Specifically, the specific content of the comparison task needs to be clarified first, including which pages need to be compared and the specific requirements of the comparison. According to the task content, the comparison task is assigned to the tester or automated testing tool. For each page in the comparison task, the tester or automated testing tool needs to access the corresponding grayscale environment, production environment and production copy respectively, and take screenshots of the page in each environment to ensure that the current state of the page can be recorded. The screenshot operation can be implemented through various screenshot tools or scripts, such as the screenshot tool provided by the Windows system, third-party screenshot software or the screenshot function built into the browser. Based on the access and screenshot, the regression operation is performed, which usually includes comparing the page screenshots in different environments to check whether the page content, layout, function, etc. are consistent. If inconsistencies are found, they need to be recorded in detail and reported to relevant personnel for processing. The regression operation results of all pages are summarized to form a complete execution result report, which can include information such as screenshot comparison results, detailed descriptions of inconsistencies, and processing suggestions. The report is output to relevant personnel so that they can understand the execution status and results of the regression operation.
[0045] Among them, the screenshot and comparison operations are realized through automated testing tools and scripts, which can greatly improve the comparison efficiency and reduce manual intervention and error rate. In addition, by comparing the screenshots of pages in different environments, the consistency of the pages in different environments can be ensured, thereby avoiding problems caused by environmental differences. In addition, regression operations can promptly discover problems that exist in pages in different environments, such as functional anomalies, disordered layouts, etc., so as to handle and repair them in a timely manner. In addition, through regression testing, it can be ensured that the software can still maintain its original functions and performance after modification or update, thereby improving the overall quality of the software. In addition, through automated regression testing, the cost and time of manual testing can be reduced, and the complexity and cost of software maintenance can be reduced.
[0046] Among them, the grayscale environment refers to a version released in advance before the version is officially changed. This version contains the latest changes and is the version that needs to be verified; the production environment refers to the existing stable running version, which executes the code before the change and is used as a standard reference version; the production copy refers to the service version provided for another computer room in the production environment, which is consistent with the production environment.
[0047] Specifically, the grayscale environment is a version released in advance before the official version change, which contains the latest changes and is used to verify the stability and reliability of new functions. In the software development process, when new functions or changes are developed, they will be deployed and tested in the grayscale environment first. This environment is usually an independent environment similar to the production environment, but it is only open to a small number of users or traffic. By collecting feedback from these users and monitoring the operating status of the system, the stability and reliability of new functions can be evaluated. The implementation of the grayscale environment requires a complete deployment and monitoring system. A load balancer or reverse proxy server can be used to direct part of the traffic to the grayscale environment and divert traffic from the production environment. At the same time, it is necessary to configure a monitoring system and log collection tools to monitor the operating status and performance of the system in real time so that problems can be discovered and handled in a timely manner.
[0048] The production environment is an existing stable version that executes the code before the change and is used as a standard reference version. The production environment is the environment that users ultimately use and the environment in which the software officially runs. In this environment, the software needs to undergo rigorous testing and verification to ensure its stability and reliability. When new functions or changes in the grayscale environment are verified and stable, they will be gradually deployed to the production environment for all users to use. The implementation of the production environment needs to ensure the stability and security of the system. Cluster technology, load balancing technology, database optimization technology and other means can be used to improve the reliability and performance of the system. At the same time, a complete backup and recovery mechanism needs to be established to ensure that the system can be restored in time in the event of an unexpected situation.
[0049] The production replica is a service version used to provide services for another computer room in the production environment, which is consistent with the production environment. In order to ensure the high availability and disaster recovery capabilities of the production environment, a service version that is completely consistent with the production environment, namely the production replica, is usually deployed in another computer room in the production environment. This replica can be synchronized with the production environment in real time or regularly to ensure data consistency and integrity. In the event of an unexpected situation, you can quickly switch to the production replica to ensure service continuity. The implementation of the production replica needs to ensure data synchronization and consistency. Database replication technology, file synchronization technology and other means can be used to achieve real-time or regular synchronization of data. At the same time, a complete switching mechanism and monitoring system need to be established to ensure that you can quickly switch to the production replica when needed.
[0050] That is to say, through the testing and verification of the grayscale environment, potential problems and vulnerabilities can be discovered and fixed in time, improving the stability and reliability of the system. At the same time, the deployment of production copies can ensure that services can be quickly restored in the event of unexpected situations. The gradual release strategy of the grayscale environment can reduce the risk of new version releases. By gradually opening the new version to a small number of users or traffic, user feedback can be collected and the operating status of the system can be monitored to timely discover and handle problems, so as to avoid large-scale problems of the new version directly in the production environment. Testing in the grayscale environment can ensure that new functions or changes have been fully verified and optimized before the official release, thereby improving the user experience. At the same time, the deployment of production copies can ensure that services can be quickly restored in the event of unexpected situations, reducing user waiting time and losses. Through the deployment of grayscale environments and production copies, system resources can be used more reasonably. The grayscale environment can be used as an independent test environment to avoid interference and impact on the production environment. The production copy can be used as a backup environment, which can be quickly switched to the production environment when needed, improving resource utilization and flexibility.
[0051] S140, comparing the execution results to obtain a comparison result;
[0052] In this embodiment, the execution results are compared to obtain comparison results, including: comparing screenshots of the grayscale environment and the production environment of the same page, and screenshots of the production environment and the production copy, and marking difference information to obtain comparison results.
[0053] Specifically, you first need to obtain screenshots of the same page in a grayscale environment, a production environment, and a production copy. These screenshots can be obtained through automated testing tools or manual screenshots to ensure that the screenshots are consistent and clear. Using AI image recognition technology, such as convolutional neural networks (CNNs) in deep learning algorithms, the obtained screenshots are processed and feature extracted. Through the trained AI model, the differences between the two pictures can be identified and compared, including changes in color, shape, texture, etc. After the AI model identifies the difference between the two pictures, it will mark the difference information in a specific way. The marking method can be to directly draw the difference area on the picture, or to explain it in the form of text or charts next to it. Based on the recognition results and difference annotations of the AI model, the final comparison results are generated. The comparison results can include specific descriptions, locations, sizes, and other information of the differences, as well as possible causes and suggestions.
[0054] Among them, the use of AI image recognition technology for image comparison can greatly improve the comparison efficiency and reduce manual intervention and error rate. Especially when processing a large number of screenshots, AI technology can quickly identify and mark the difference information, saving a lot of time and energy. In addition, AI technology has powerful image processing and feature extraction capabilities, and can identify subtle difference information, which makes the comparison results more accurate and reliable, and helps to promptly discover and deal with potential problems. In addition, by directly marking the difference information on the picture, the comparison results are more intuitive and easy to understand, which helps relevant personnel quickly understand the problem and take appropriate measures to repair and improve it. In addition, the use of AI technology for image comparison can reduce dependence on manual resources, which helps to optimize resource utilization and improve overall work efficiency and benefits.
[0055] S150: De-noise the comparison result to obtain a comparison report.
[0056] In this embodiment, the comparison result is denoised to obtain a comparison report, including: the comparison result includes the difference between the screenshot of the grayscale environment and the screenshot of the production environment, that is, the original difference, and the difference between the screenshot of the production environment and the screenshot of the production copy, that is, the noise; the noise is removed from the original difference to obtain a comparison report.
[0057] Specifically, first obtain the comparison results, which include the differences between the grayscale environment and the production environment screenshots (original differences) and the differences between the production environment and the production copy screenshots (noise). Noise usually refers to those contents within the normal range of variation, such as advertisements, recommendations, etc., which may change due to factors such as time and user behavior. In order to identify noise, a large amount of historical data can be trained using machine learning or deep learning algorithms to learn the characteristics of normal changing content. In the actual comparison process, noise is identified by matching these characteristics. Once the noise is identified, it needs to be removed from the original difference, which can be achieved through image processing technology or text processing technology, depending on the form of the comparison result (image or text). For example: in image processing, image filtering or morphological operations can be used to remove noise; in text processing, natural language processing technology can be used to identify and remove irrelevant content. After removing the noise, a comparison report is generated based on the remaining difference information. The comparison report should contain information such as a list of compared pages, the comparison results (success or failure) of each page, and a specific description of the difference. The report can be presented in the form of a table, chart, or text for easy understanding and analysis.
[0058] Among them, by removing noise, the real differences can be identified more accurately, thereby improving the accuracy of the comparison, which helps to reduce wrong decisions and waste of resources caused by false positives or negatives. In addition, the comparison report provides clear and intuitive comparison results, allowing users to more easily understand the differences, which helps users locate problems more quickly, develop solutions, and optimize the overall user experience. In addition, the process of automating noise removal and generating comparison reports can greatly reduce manual intervention and error rates, which helps to improve work efficiency, reduce time costs, and enable developers to focus more on handling core issues. In addition, by accurately identifying and handling differences, potential problems and vulnerabilities can be discovered and fixed in a timely manner, which helps to enhance the stability and reliability of the system and improve the overall service quality and user satisfaction.
[0059] The above-mentioned production environment regression verification method based on image comparison, through the production environment regression verification based on image comparison, the entire process can be highly automated, from obtaining the page information to be regressed, to creating a comparison task, to executing the regression operation, comparison results and de-noising, most of the steps can be completed automatically by the system, which significantly reduces the time of manual operation, thereby improving the overall verification speed. In addition, the image comparison technology can quickly identify the differences between the grayscale environment and the production environment, and between the production environment and the production copy, which enables developers to locate the problem more quickly and reduce the time to find potential problems. In addition, the regression verification method based on image comparison reduces the necessity of manual intervention. Developers do not need to manually check every detail of each page, but can rely on the comparison results provided by the system to quickly identify problems. Through the automated process, more resources can be invested in solving key problems instead of spending on tedious regression verification tasks, which helps to optimize resource allocation and improve overall development efficiency. In addition, the image comparison technology has a high degree of accuracy and can identify small differences, which avoids errors caused by human factors, such as misjudgment caused by visual fatigue and lack of concentration. In addition, through fast and accurate regression verification, potential problems and vulnerabilities can be discovered and fixed in a timely manner, which helps to improve the overall quality of the software and increase user satisfaction. In addition, automated regression verification does not require testers to write a large number of unit tests, but only needs to enter the page address.
[0060] Figure 3 is a schematic block diagram of a production environment regression verification device 300 based on image comparison provided by an embodiment of the present invention. Figure 3 As shown, corresponding to the above-mentioned production environment regression verification method based on image comparison, the present invention also provides a production environment regression verification device 300 based on image comparison. The production environment regression verification device 300 based on image comparison includes a unit for executing the above-mentioned production environment regression verification method based on image comparison, and the device can be configured in a server. Specifically, please refer to Figure 3 , the production environment regression verification device 300 based on image comparison includes an acquisition unit 301, a creation unit 302, an execution unit 303, a comparison unit 304 and a processing unit 305;
[0061] The acquisition unit 301 is used to acquire the page information to be regressed and verified;
[0062] A creating unit 302, configured to create a comparison task according to the page information;
[0063] An execution unit 303 is used to execute a regression operation according to the comparison task to obtain an execution result;
[0064] A comparison unit 304, used to compare the execution results to obtain a comparison result;
[0065] The processing unit 305 is used to perform noise removal on the comparison result to obtain a comparison report.
[0066] In one embodiment, the page information includes a page address, whether to log in, and grayscale information.
[0067] In one embodiment, in the creating unit 302, a comparison task is created by selecting part of the content in the page information.
[0068] In one embodiment, in the execution unit 303, a regression operation is performed on each page in the task through comparison, that is, the grayscale environment, production environment, and production copy corresponding to each page are accessed respectively, and a screenshot is completed to obtain an execution result.
[0069] In one embodiment, the grayscale environment refers to a version released in advance before the version is officially changed, which contains the latest changes and is the version that needs to be verified; the production environment refers to the existing stable running version, which executes the code before the change and is used as a standard reference version; the production copy refers to the service version provided for another computer room in the production environment, which is consistent with the production environment. In one embodiment, the comparison unit 304 compares the screenshots of the grayscale environment and the production environment, and the screenshots of the production environment and the production copy of the same page, and marks the difference information to obtain the comparison result.
[0070] In one embodiment, in the processing unit 305, the comparison result includes the difference between the screenshot of the grayscale environment and the screenshot of the production environment, that is, the original difference, and the difference between the screenshot of the production environment and the screenshot of the production copy, that is, the noise; the noise is removed from the original difference to obtain a comparison report.
[0071] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned production environment regression verification device 300 based on image comparison and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.
[0072] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of a production environment regression verification method based on image comparison.
[0073] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0074] Acquire page information to be regressed and verified; create a comparison task according to the page information; perform a regression operation according to the comparison task to obtain an execution result; compare the execution result to obtain a comparison result; and perform noise removal on the comparison result to obtain a comparison report.
[0075] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0076] Acquire page information to be regressed and verified; create a comparison task according to the page information; perform a regression operation according to the comparison task to obtain an execution result; compare the execution result to obtain a comparison result; and perform noise removal on the comparison result to obtain a comparison report.
[0077] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0079] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0080] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. The production environment regression verification method based on image comparison is characterized by: include: Get the page information to be verified by regression; Creating a comparison task according to the page information; Performing a regression operation according to the comparison task to obtain an execution result; Comparing the execution results to obtain a comparison result; The comparison result is subjected to noise removal to obtain a comparison report.
2. The production environment regression verification method based on image comparison according to claim 1 is characterized in that: The page information includes the page address, whether to log in and grayscale information.
3. The production environment regression verification method based on image comparison according to claim 1 is characterized in that: The creating a comparison task according to the page information includes: Select part of the page information to create a comparison task.
4. The production environment regression verification method based on image comparison according to claim 1 is characterized in that: The performing a regression operation according to the comparison task to obtain an execution result includes: A regression operation is performed on each page in the comparison task, that is, the grayscale environment, production environment, and production copy corresponding to each page are accessed respectively, and screenshots are taken to obtain the execution results.
5. The production environment regression verification method based on image comparison according to claim 4 is characterized in that: The grayscale environment refers to a version released in advance before the version is officially changed. This version contains the latest changes and is the version that needs to be verified; the production environment refers to the existing stable running version, which executes the code before the change and is used as a standard reference version; the production copy refers to the service version used to provide another computer room in the production environment, which is consistent with the production environment.
6. The production environment regression verification method based on image comparison according to claim 5 is characterized in that: The comparing the execution results to obtain a comparison result includes: Compare the screenshots of the grayscale environment and the production environment, as well as the screenshots of the production environment and the production copy of the same page, and mark the difference information to obtain the comparison result.
7. The production environment regression verification method based on image comparison according to claim 6 is characterized in that: The noise removal process of the comparison result to obtain a comparison report includes: The comparison result includes the difference between the screenshot of the grayscale environment and the screenshot of the production environment, that is, the original difference, and the difference between the screenshot of the production environment and the screenshot of the production copy, that is, the noise; the noise is removed from the original difference to obtain a comparison report.
8. A production environment regression verification device based on image comparison, characterized in that: include: An acquisition unit, used to acquire page information to be verified by regression; A creating unit, used for creating a comparison task according to the page information; An execution unit, used for executing a regression operation according to the comparison task to obtain an execution result; A comparison unit, used for comparing the execution results to obtain a comparison result; The processing unit is used to perform noise removal on the comparison result to obtain a comparison report.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the production environment regression verification method based on image comparison as described in any one of claims 1 to 7 are implemented.
10. A storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that: When the computer program is executed by a processor, the steps of the production environment regression verification method based on image comparison as described in any one of claims 1 to 7 are implemented.