CN116932413B - Defect processing method, defect processing device and storage medium for test task - Google Patents

Defect processing method, defect processing device and storage medium for test task Download PDF

Info

Publication number
CN116932413B
CN116932413B CN202311183333.8A CN202311183333A CN116932413B CN 116932413 B CN116932413 B CN 116932413B CN 202311183333 A CN202311183333 A CN 202311183333A CN 116932413 B CN116932413 B CN 116932413B
Authority
CN
China
Prior art keywords
test
defect
regression
defect information
management platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311183333.8A
Other languages
Chinese (zh)
Other versions
CN116932413A (en
Inventor
余伟
刘鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhicheng Software Technology Service Co ltd
Shenzhen Smart City Technology Development Group Co ltd
Original Assignee
Shenzhen Zhicheng Software Technology Service Co ltd
Shenzhen Smart City Technology Development Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhicheng Software Technology Service Co ltd, Shenzhen Smart City Technology Development Group Co ltd filed Critical Shenzhen Zhicheng Software Technology Service Co ltd
Priority to CN202311183333.8A priority Critical patent/CN116932413B/en
Publication of CN116932413A publication Critical patent/CN116932413A/en
Application granted granted Critical
Publication of CN116932413B publication Critical patent/CN116932413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a defect processing method, a defect processing device and a storage medium for a test task, wherein the method comprises the following steps: obtaining defect information corresponding to a current test, and sending the defect information to a defect management platform; receiving regression testing basic data fed back by the defect management platform based on the defect information; determining a regression test case according to the defect information, and testing the regression test basic data based on the regression test case; and when the test fails, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform. According to the invention, after the defect information corresponding to the test task is sent to the defect management platform, the regression test data corresponding to the defect management platform is received, so that the regression test of the defect information is further carried out, and in the process, the test platform can follow the life cycle of the defect information in real time, so that the UI test efficiency with defects is improved.

Description

Defect processing method, defect processing device and storage medium for test task
Technical Field
The present invention relates to the field of data processing, and in particular, to a defect processing method, a defect processing device, and a storage medium for a test task.
Background
UI (user interface) automated testing is a testing process that converts human-driven testing into machine execution.
In a related UI test scheme, chinese patent application No. 202010526714.1 discloses an automatic test method based on UI and interfaces, and the scheme mainly discloses that the UI automatic test is realized by carrying out storage and calling on a plurality of source code versions and simultaneously realizing the UI automatic test for testing a first delivery to be tested and the interface automatic test for testing a second delivery to be tested.
However, when the test task is defective, the UI automation test platform needs to remind the corresponding developer by sending a mail, so that the developer uploads the defect information to the defect management platform, and after the defect information is repaired, the developer manually performs the regression test. Therefore, the current UI automation test solution cannot follow the life cycle of the defect, resulting in low test efficiency of the defective test task.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a defect processing method, a defect processing device and a storage medium for a test task, which solve the problem of low test efficiency of the test task with defects in the prior art.
In order to achieve the above object, the present invention provides a defect processing method for a test task, the method comprising the steps of:
obtaining defect information corresponding to a current test, and sending the defect information to a defect management platform;
receiving regression testing basic data fed back by the defect management platform based on the defect information;
determining a regression test case according to the defect information, and testing the regression test basic data based on the regression test case;
and when the test fails, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
Optionally, the step of obtaining defect information corresponding to the current test and sending the defect information to the defect management platform includes:
Acquiring the defect information, and a test path, failure content and interface name corresponding to the defect information;
determining a defect identifier corresponding to the defect information according to the test path, the failure content and the interface name;
and when the defect identification does not exist in the defect management platform, sending the defect identification and the defect information to the defect management platform.
Optionally, the step of determining a regression testing case according to the defect information and testing the regression testing basic data based on the regression testing case includes:
determining defects needing regression verification according to the defect identifiers corresponding to the defect information;
and generating the regression test case according to the test case number corresponding to the defect information, and testing based on the regression test case corresponding to the regression test basic data.
Optionally, after the step of determining a regression testing case according to the defect information and testing the regression testing basic data based on the regression testing case, the method further includes:
when the test fails, determining a regression identifier corresponding to the regression test case;
Submitting the regression identification and regression defect information associated with the regression identification to a defect management platform when the regression identification is different from the defect identification, and executing the step of receiving regression test basic data fed back by the defect management platform based on the defect information based on the regression defect information in a jumping manner; or alternatively
And when the regression identification is the same as the defect identification, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
Optionally, before the step of obtaining the defect information corresponding to the current test and sending the defect information to the defect management platform, the method further includes:
when a test task is received, determining a predicted image set corresponding to each test step of the test task;
acquiring a target image when the test task is executed, and comparing the target image with a target predicted image corresponding to the predicted image set to obtain image similarity;
and when the image similarity is smaller than a preset similarity, determining test content corresponding to the target image, executing the step of acquiring defect information corresponding to the current test, and sending the defect information to a defect management platform.
Optionally, when the test task is received, the step of determining the predicted image set corresponding to each test step of the test task includes:
when the test task is received, determining the test step associated with the test task;
determining test areas corresponding to the test steps, and acquiring the prediction image set based on the test areas and the test steps, wherein the prediction image set is associated with step numbers of the test steps.
Optionally, the step of obtaining the target image when the test task is executed and comparing the target image with the target predicted image corresponding to the predicted image set to obtain the image similarity further includes:
acquiring a target image when the test task is executed, and determining a step number associated with the target image;
selecting the target predicted image in the predicted image set based on the step number, and comparing the target predicted image with the target image to obtain a pixel comparison result;
and obtaining the image similarity according to the pixel comparison result.
Optionally, after the step of determining a regression testing case according to the defect information and testing the regression testing basic data based on the regression testing case, the method further includes:
When the test fails, acquiring the failure times of the regression test cases corresponding to the defect information;
when the failure times are greater than preset times, marking the test cases corresponding to the defect information as to-be-reconstructed cases, and sending the to-be-reconstructed cases to the defect management platform; or alternatively
And when the test passes, closing the defect processing flow corresponding to the defect information.
In addition, in order to achieve the above object, the present invention also provides a defect processing apparatus including a memory, a processor, and a defect processing program stored on the memory and executable on the processor, the defect processing program implementing the steps of the defect processing method of the test task as described above when executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a defect processing program which, when executed by a processor, implements the steps of the defect processing method of the test task as described above.
The embodiment of the invention provides a defect processing method, a defect processing device and a storage medium for a test task, wherein when the current UI test fails, a test platform can directly send defect information to a defect management platform, and further a regression test case is generated according to regression test basic data fed back by the defect management platform, and the test is continued based on the regression test case. Based on the method, manual intervention during defect information uploading is reduced, the degree of automation of UI testing is improved, the testing platform can follow the life cycle of the defects, and the defect management platform can timely receive corresponding information, so that the current defects can be repaired more rapidly, testing tasks can be completed more rapidly, and the testing efficiency of the testing tasks with defects is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a first embodiment of a defect handling method for testing tasks according to the present invention;
FIG. 2 is a detailed flowchart of step S10 of a first embodiment of a defect processing method for testing tasks according to the present invention;
FIG. 3 is a flow chart of a second embodiment of a defect handling method for testing tasks according to the present invention;
FIG. 4 is a schematic diagram of a testing flow of a defect processing method of the testing task according to the present invention;
FIG. 5 is a schematic diagram of a terminal hardware architecture of various embodiments of a defect handling method for test tasks according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
When the test task is defective, the UI automatic test platform needs to remind corresponding developers through sending mails, and then the developers upload defect information to the defect management platform, and after the defect information is repaired, the developers manually carry out regression test. Therefore, the current UI automation test solution cannot follow the life cycle of the defect, resulting in low test efficiency of the defective test task.
In order to solve the above-mentioned drawbacks, an embodiment of the present invention provides a method for processing a defect of a test task, which mainly includes the following steps:
obtaining defect information corresponding to a current test, and sending the defect information to a defect management platform;
receiving regression testing basic data fed back by the defect management platform based on the defect information;
determining a regression test case according to the defect information, and testing the regression test basic data based on the regression test case;
and when the test fails, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
According to the invention, manual intervention during uploading of defect information can be reduced, the degree of automation of UI test is improved, the test platform can follow the life cycle of the defect, and the defect management platform can timely receive corresponding information, so that the current defect can be repaired more rapidly, the test task can be completed more rapidly, and the test efficiency of the test task with the defect is improved.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First embodiment
Referring to fig. 1, in a first embodiment, the steps of the defect processing method of the test task of the present invention include:
step S10, obtaining defect information corresponding to a current test, and sending the defect information to a defect management platform;
the current test refers to UI automation test, and when the current UI automation test platform executes the UI automation test, if the current test has a defect (i.e. bug), an automation test report can be generated, and the report contains defect information of the current test task. The manager of the UI automation platform is then required to send the automated test report of the current defect to the mailbox system of the corresponding developer in the form of a mailbox. At this time, it is difficult for a developer to quickly learn about the failure condition of the test, resulting in low efficiency of defect repair of the test task, so that the test efficiency is low in the whole test process.
In this embodiment, a UI automation test task is received at the UI automation test platform, and a corresponding test action is executed based on a test case corresponding to the task. When a defect occurs in a current test task, such as clicking a login function and the UI interface has no jump reaction or no relevant corresponding information, the current test is considered to have the defect, and the UI automatic test platform collects the current defect information, wherein the defect information at least comprises a test path of the defect, content of assertion failure, interface name where the test failure is located, screenshot of the test failure, version number of a tested object, environment information used for the test, test case number and name and the like.
After the UI automatic test platform acquires the defect information, the defect information can be directly sent to the defect management platform, and because a developer works based on the defect management platform, after the UI automatic test platform sends the defect information to the defect management platform, the defect management platform pops up corresponding prompt information, and at the moment, the developer can quickly learn the defect information of the current test task according to the prompt information, further can quickly repair the defect information and feed back regression test contents of the defect. After the defect information is sent to the defect management platform, one attribute of the defect information is changed into a 'to-be-repaired state'.
It should be noted that, when the UI test platform sends the defect information to the defect management platform, the defect life cycle corresponding to the defect information is in a "new" state, and after the developer repairs the defect, the state corresponding to the defect information may be changed into a "resolved" state.
Optionally, when the defect information is sent to the defect management platform, in order to avoid the problem that the login is abnormal in different test cases, for example, in order to avoid the current repeated uploading of the content with the same defect, only one defect information needs to be sent to the defect management platform at this time, so that the problem that the developer repeatedly processes the content with the same defect to affect the test efficiency of the whole test task is avoided. Therefore, referring to fig. 2, in order to avoid repeated uploading of defect information, step S10 specifically includes:
step S11, obtaining the defect information, and a test path, failure content and interface name corresponding to the defect information;
step S12, determining a defect identifier corresponding to the defect information according to the test path, the failure content and the interface name;
and step S13, when the defect identification does not exist in the defect management platform, the defect identification and the defect information are sent to the defect management platform.
In this embodiment, in the process of executing a test task, the UI automation test platform can convert a unique identifier of a defect according to a test path, contents of assertion failure, and an interface name where the test failure is located after a test failure of a certain test case. The unique identifier refers to a defect identifier corresponding to defect information, and the current defect identifier can be converted through a test path corresponding to a test task, a content of assertion failure and a data table associated with an interface name in a database. Before the defect content information is sent to the defect management platform, the UI automation test platform needs to query a defect identifier corresponding to the defect information to be repaired in the defect management platform, and when the defect management platform does not have the current defect identifier information, the UI automation test platform can send the defect identifier and the defect information to the defect management platform.
Optionally, when the defect identifier exists in the defect management platform, a life cycle of defect information corresponding to the defect identifier in the defect management platform is recorded, and when the defect information is in a "resolved state", regression test basic data corresponding to the defect identifier can be directly obtained.
Step S20, receiving regression testing basic data fed back by the defect management platform based on the defect information;
in this embodiment, after receiving the defect prompt information corresponding to the defect management platform, the developer can quickly respond to the defect information of the current UI automation test, and repair the defect according to the defect content. After the defect repair is completed, the developer changes the 'to-be-repaired state' of the defect information into the 'repaired state', and then resends the repaired test version (i.e. the regression test basic data) to the UI automatic test platform. The UI automation test platform receives the regression test base data so that the UI automation test platform can reformulate the regression test case based on the data.
Step S30, determining a regression test case according to the defect information, and testing the regression test basic data based on the regression test case;
in this embodiment, after the UI automation test platform receives the regression test basic data, it indicates that a regression test is required for the test content. For example, when the defect information is a login defect, it is necessary to construct a login regression test case based on the login defect. Specifically, after receiving the corresponding regression test data, the UI automation test platform can traverse the regression test number associated with the defect type in the database according to the defect type corresponding to the defect information. After determining the regression test number, writing an automatic test script for regression test according to the defect type corresponding to the defect information, wherein the automatic test script covers key function nodes and change points required by regression test, and further selects a test environment corresponding to the defect information, wherein the test environment comprises but is not limited to an operating system, a browser, test equipment and the like, and further ensures that the test environment is the same as a target environment when the UI automatic test platform carries out regression test on a test task with defects. And then the UI automation test platform constructs the regression test case based on the defect type, the regression test number, the automation test script and the test environment.
After the regression test case is constructed, the UI automation test platform executes the regression test case based on the automation test script on the basis of the test environment, and further tests regression test basic data (i.e. test contents after repair processing) corresponding to the current test.
Optionally, when the defect information is sent to the defect management platform, the defect identifier corresponding to the defect information can be synchronously sent to the defect management platform, and the defect identifier is associated with a unique defect type, so that the regression test case can be determined according to the defect identifier. Namely traversing the corresponding regression test numbers according to the defect identification, writing the automatic test script for regression test, selecting the test environment and the like.
Optionally, the UI automation test platform may traverse defect states of all defect information in the defect management platform according to the defect identifier, then obtain a defect record of the defect information, and extract repaired defect content corresponding to the defect identifier, so as to obtain test content that needs to be subjected to regression verification. Because the defect record corresponding to the defect information is obtained, at the moment, a corresponding automatic test script and a corresponding test environment are generated according to the test case number corresponding to the current test task in the defect record, and finally a new automatic test task is customized based on the current test case number, the test environment and the automatic test script, namely, a regression test case is generated, and then the regression test basic data is tested according to the automatic test script based on the regression test case and the test environment.
Optionally, after the UI automation test platform obtains the regression test basic data fed back by the defect management platform, the code analysis tool is used to analyze the regression test basic data, so as to obtain a distinguishing point before the regression test basic data and the test content corresponding to the current test are not repaired, and determine the defect type required to be subjected to the regression test according to the function corresponding to the distinguishing point, so as to obtain an automation test script, a test environment and the regression test case according to the defect type, and execute the regression test case based on the test environment and the automation test script, so as to ensure whether the current defect information is reliable after repair.
Optionally, after the UI automation test platform obtains the regression test basic data, a function corresponding to the regression test basic data may be further determined, for example, when the regression test function corresponding to the regression test basic data is a login control skip function or a login interface skip function, a regression test case number corresponding to the login control skip or the login interface skip time may be selected in the database based on the regression test case number, and a regression test case may be generated, and then, according to the regression test function, a corresponding automation test script may be generated, and a test environment may be selected. And then testing the regression test case based on an automatic test script and a test environment.
And step S40, when the test fails, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
In this embodiment, the regression test case is not executed, and usually defaults that the current defect content is not completely repaired (i.e. a repeated defect occurs), and the UI automation test platform changes the state corresponding to the defect into the "re-open" state after determining that the regression test case is not executed. If the current test fails and the corresponding defect information is identical to the defect information corresponding to the previous test, the step of step S10 needs to be skipped so that the developer can repair again based on the same defect problem.
Optionally, if the regression test case passes, the state of the corresponding defect can be changed into closed, that is, the defect processing flow corresponding to the defect information is closed, so far, the UI automation test platform completes the follow-up of the whole life cycle from new creation, repair to closing of the defect information, and automatically completes the test process of the UI automation test task with the defect in the process, thereby reducing the manual participation and improving the test efficiency of the UI automation test task with the defect.
Optionally, when the execution of the regression test case fails, if another defect appears as "the login control fails to respond" due to the failure of the execution of the regression test case, and then when the test of the login function is performed by the regression test case, the page is successfully jumped when the login control is clicked, and when the corresponding account information needs to be input, the page cannot respond to the content input by the UI automation test platform, and at the moment, the new defect is "the login process number input fails to respond". The UI automation test platform cannot directly perform the contents of step S10 at this time.
Therefore, when the test fails, the regression identifier corresponding to the regression test case needs to be determined, and whether the reason that the current regression test case fails is the same as the reason in the previous test is judged according to the regression identifier. And when the regression identifier is different from the defect identifier, the reason for the failed regression test case is the same as the reason for the failed previous test, so that the regression defect information related to the regression identifier and the regression identifier needs to be submitted to a defect management platform, and the step S20 of receiving the regression test basic data fed back by the defect management platform based on the defect information is performed based on the regression defect information jump, namely receiving the target regression test basic data fed back by the defect management platform based on the regression defect information. And when the regression mark is the same as the defect mark, the defect content indicating the defect is the same as that of the previous test, and step S10 can be skipped to obtain the defect information corresponding to the current test and the defect information is sent to the defect management platform. It should be noted that, the problem of the regression test case which fails the test is traced, and then the regression defect information of the regression test case which fails the test is subjected to corresponding jump processing, so that the UI automation test platform is prevented from repeatedly sending the repaired defect content.
Optionally, when the test fails, the number of failures of the regression test case of the same type may be recorded, for example, the test cannot be performed normally due to the fact that the login control is not responded in the current test, after the defect is repaired, if the same problem still occurs in the regression test, the problem is repeatedly described after the repair, which indicates that the test environment or the test parameters corresponding to the current test task do not meet the requirements of the UI automation test platform. Specifically, when the test fails, the failure times of the regression test case corresponding to the defect information are obtained, and when the failure times are larger than the preset times, the test case corresponding to the defect information is marked as a to-be-reconstructed case, and the to-be-reconstructed case is sent to the defect management platform, so that a developer can reconstruct the current to-be-reconstructed case based on the defect management platform, and the defect is prevented from being repeatedly processed to cause low processing efficiency of a test task.
In the technical scheme disclosed in this embodiment, by acquiring defect information and defect identifiers corresponding to a current test, and directly sending the defect information and the defect identifiers to a defect management platform, a developer responds to the defect information at a first time, and improves the automation degree of a test flow, further after receiving regression test basic data, a regression test case is generated according to the defect information and the defect identifiers, the regression test case is tested, and after the test is passed, the defect is closed or the defect is opened again when the test is failed, so that the closed loop of the test process is realized. In the process, the UI automatic test platform can learn that defect information is changed from new built and repaired to closed or re-opened states in the defect management platform, and can automatically follow the life cycle of the defect, so that the test task can be completed more rapidly, and the test efficiency of the test task with the defect is improved.
Second embodiment
Referring to fig. 3, in the second embodiment, based on the first embodiment, before step S10, the method further includes:
step S50, when a test task is received, determining a predicted image set corresponding to each test step of the test task;
in this embodiment, the test task has corresponding test steps, and each step corresponds to a unique execution result, for example, when clicking the new user control, the test step jumps to the interface of the new user, and when executing the action of opening the browser, the test step jumps to the corresponding browser interface. Therefore, when the UI automation test platform receives the test task, a predicted image set corresponding to each test step of the test task can be determined according to the image information pre-stored in the image library of the UI automation test platform. It should be noted that, in general, the interface information is changed corresponding to different operation steps, and because the image data in the image library of the UI automation test platform is updated in real time when the UI automation test platform is put into operation, the image library generally has the predicted images corresponding to the respective test steps.
Specifically, when the UI automation test platform receives the test task, the test step associated with the test task needs to be determined, a test area corresponding to the test step is determined, and then a corresponding prediction image set is obtained in an image library based on the test area and the test step, wherein the prediction image set is associated with a step number of the test step. The image library stores test images of each test area.
Step S60, obtaining a target image when the test task is executed, and comparing the target image with a predicted image corresponding to the predicted image set to obtain image similarity;
in this embodiment, after acquiring a target image when performing a test task, the UI automation test platform needs to determine a step number associated with the target image in order to facilitate comparison with an image in a predicted image set, and then selects a target predicted image corresponding to the step number in the predicted image set based on the step number. After a target predicted image is selected, comparing the target predicted image with the target image to obtain a pixel comparison result, and obtaining the image similarity according to the pixel comparison result.
When the current testing step is to open the browser, the corresponding predicted image is a browser interface, and the corresponding target image is still the current interface when the UI automation testing platform actually executes the step, at this time, the pixel comparison is performed on the target image and the target predicted image, the obtained pixel comparison result is general, and the obtained image similarity is below 30%.
And step S70, when the image similarity is smaller than the preset similarity, determining the test content corresponding to the target image, executing the step of acquiring the defect information corresponding to the current test, and transmitting the defect information to a defect management platform.
In this embodiment, the images in the predicted image set may come in and go out from the target image obtained when the test is actually performed, for example, after inputting the corresponding user information and clicking to log in, the user head portrait information and the nickname information are the current user information in the output interface, and the predicted images in the predicted image set are usually different from the current user information, and at this time, the similarity of the images obtained by the pixel comparison is not 100%. Thus, a preset similarity (for example, the similarity is set to 70%) is generally set, and when the obtained image similarity is greater than 70%, it indicates that the step is normal, and when the image similarity is less than 70%, it indicates that the current test step is defective, and the UI automation test platform executes the step of step S10.
It should be noted that, in the second embodiment, only an alternative implementation manner of determining that the current test task is defective is described by way of example, and the present invention is not limited to the specific embodiment. Meanwhile, the above parameters are for illustration only and are not meant to be a specific limitation of the present invention.
In the technical scheme disclosed in the embodiment, by acquiring the predicted image of each test step in the test task, and comparing the target image corresponding to the test step with the target predicted image during the test, the pixel comparison result and the pixel similarity between the images are obtained, and further, the judgment of whether the test has defects is performed according to the pixel similarity in the test process, so that the test efficiency of the whole test task with defects is improved.
Third embodiment
In the third embodiment, the process flow of the defect processing method of the test task of the present invention may be as shown in fig. 4. When the UI automatic test platform tests the test task, if the test failure is detected, namely the defect is found, the defect is automatically submitted to the defect management platform, and a developer repairs the defect in the defect management platform. After repairing the defects, a developer packages and submits a new test version to a UI automatic test platform, and the UI automatic test platform collects the defects needing regression verification based on the test version and customizes the automatic test cases of the regression test according to the defect records. When the automatic test case is executed, if the same defect problem occurs, the defect state is changed into reopening, namely resubmitting the defect to a defect management platform, and the developer continuously carries out repairing treatment on the defect, and when the regression test case passes the test, the defect is closed, so that defect life cycle management during whole defect treatment is completed.
In the technical scheme disclosed in the embodiment, after the UI automation test platform discovers the defect and automatically submits the defect to the defect management platform, regression verification is performed on the defect when a new test version is received, and the defect state is changed into reopening or the defect is closed when verification fails, based on the UI automation test platform, the defect can be directly submitted to the defect management platform according to the life cycle of the defect, so that the repair efficiency is accelerated, and the test efficiency of the test task with the defect is improved.
Referring to fig. 5, fig. 5 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 5, the terminal may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a network interface 1003, and a memory 1004. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1004 may be a high-speed RAM Memory (Random Access Memory, RAM) or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 5 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 5, an operating system, a data storage module, a network communication module, and a defect processing program may be included in the memory 1004, which is a kind of computer storage medium.
In the terminal shown in fig. 5, the network interface 1003 is mainly used for connecting to a background server, and performing data communication with the background server; the processor 1001 may call a defect handling program stored in the memory 1004 and perform the following operations:
obtaining defect information corresponding to a current test, and sending the defect information to a defect management platform;
receiving regression testing basic data fed back by the defect management platform based on the defect information;
determining a regression test case according to the defect information, and testing the regression test basic data based on the regression test case;
and when the test fails, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
acquiring the defect information, and a test path, failure content and interface name corresponding to the defect information;
determining a defect identifier corresponding to the defect information according to the test path, the failure content and the interface name;
and when the defect identification does not exist in the defect management platform, sending the defect identification and the defect information to the defect management platform.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
determining defects needing regression verification according to the defect identifiers corresponding to the defect information;
and generating the regression test case according to the test case number corresponding to the defect information, and testing based on the regression test case corresponding to the regression test basic data.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
when the test fails, determining a regression identifier corresponding to the regression test case;
submitting the regression identification and regression defect information associated with the regression identification to a defect management platform when the regression identification is different from the defect identification, and executing the step of receiving regression test basic data fed back by the defect management platform based on the defect information based on the regression defect information in a jumping manner; or alternatively
And when the regression identification is the same as the defect identification, skipping to execute the step of acquiring the defect information corresponding to the current test and sending the defect information to a defect management platform.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
when a test task is received, determining a predicted image set corresponding to each test step of the test task;
acquiring a target image when the test task is executed, and comparing the target image with a target predicted image corresponding to the predicted image set to obtain image similarity;
and when the image similarity is smaller than a preset similarity, determining test content corresponding to the target image, executing the step of acquiring defect information corresponding to the current test, and sending the defect information to a defect management platform.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
when the test task is received, determining the test step associated with the test task;
determining test areas corresponding to the test steps, and acquiring the prediction image set based on the test areas and the test steps, wherein the prediction image set is associated with step numbers of the test steps.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
Acquiring a target image when the test task is executed, and determining a step number associated with the target image;
selecting the target predicted image in the predicted image set based on the step number, and comparing the target predicted image with the target image to obtain a pixel comparison result;
and obtaining the image similarity according to the pixel comparison result.
Further, the processor 1001 may call a defect handling program stored in the memory 1004, and further perform the following operations:
when the test fails, acquiring the failure times of the regression test cases corresponding to the defect information;
when the failure times are greater than preset times, marking the test cases corresponding to the defect information as to-be-reconstructed cases, and sending the to-be-reconstructed cases to the defect management platform; or alternatively
And when the test passes, closing the defect processing flow corresponding to the defect information.
Furthermore, it will be appreciated by those of ordinary skill in the art that implementing all or part of the processes in the methods of the above embodiments may be accomplished by computer programs to instruct related hardware. The computer program comprises program instructions, and the computer program may be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the control terminal to carry out the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a computer-readable storage medium storing a defect processing program which, when executed by a processor, implements the steps of the defect processing method of the test task as described in the above embodiments.
It should be noted that, because the storage medium provided in the embodiments of the present application is a storage medium used to implement the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the storage medium, and therefore, the description thereof is omitted herein. All storage media used in the methods of the embodiments of the present application are within the scope of protection intended in the present application.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. The defect processing method for the test task is characterized by comprising the following steps of:
obtaining defect information corresponding to a current test, and a test path, failure content and interface name corresponding to the defect information;
Determining a defect identifier corresponding to the defect information according to the test path, the failure content and the interface name; when the defect identification does not exist in the defect management platform, the defect identification and the defect information are sent to the defect management platform;
receiving regression testing basic data fed back by the defect management platform based on the defect information, recording the life cycle of defect information corresponding to the defect identifier in the defect management platform when the defect identifier exists in the defect management platform, and directly acquiring the regression testing basic data corresponding to the defect identifier when the defect information is in a solved state;
traversing a regression test number associated with the defect type in a database according to the defect type corresponding to the defect information, compiling an automatic script for regression test according to the defect type, selecting a test environment corresponding to the defect information, constructing a regression test case based on the defect type, the regression test number, the automatic script and the test environment, and testing corresponding to the regression test basic data based on the regression test case;
When the test fails, determining a regression identifier corresponding to the regression test case;
submitting the regression identification and regression defect information associated with the regression identification to a defect management platform when the regression identification is different from the defect identification, and executing the step of receiving regression test basic data fed back by the defect management platform based on the defect information based on the regression defect information in a jumping manner; and when the regression identification is the same as the defect identification, skipping to execute the step of acquiring the defect information corresponding to the current test, and the test path, the failure content and the interface name corresponding to the defect information.
2. The method for processing defects of a test task according to claim 1, wherein before the step of acquiring defect information corresponding to a current test and transmitting the defect information to a defect management platform, the method further comprises:
when a test task is received, determining a predicted image set corresponding to each test step of the test task;
acquiring a target image when the test task is executed, and comparing the target image with a target predicted image corresponding to the predicted image set to obtain image similarity;
And when the image similarity is smaller than a preset similarity, determining test content corresponding to the target image, and executing the step of acquiring defect information corresponding to the current test, and a test path, failure content and interface name corresponding to the defect information.
3. The defect processing method of the test task according to claim 2, wherein the step of determining the predicted image set corresponding to each test step of the test task when the test task is received comprises:
when the test task is received, determining the test step associated with the test task;
determining test areas corresponding to the test steps, and acquiring the prediction image set based on the test areas and the test steps, wherein the prediction image set is associated with step numbers of the test steps.
4. The defect processing method of the test task according to claim 3, wherein the step of obtaining a target image when the test task is executed, and comparing the target image with a target predicted image corresponding to the predicted image set, and obtaining the image similarity further comprises:
acquiring a target image when the test task is executed, and determining a step number associated with the target image;
Selecting the target predicted image in the predicted image set based on the step number, and comparing the target predicted image with the target image to obtain a pixel comparison result;
and obtaining the image similarity according to the pixel comparison result.
5. The method for processing defects of a test task according to claim 1, further comprising, after the step of testing the regression testing base data based on the regression testing case:
when the test fails, acquiring the failure times of the regression test cases corresponding to the defect information;
when the failure times are greater than preset times, marking the test cases corresponding to the defect information as to-be-reconstructed cases, and sending the to-be-reconstructed cases to the defect management platform; or alternatively
And when the test passes, closing the defect processing flow corresponding to the defect information.
6. A defect processing apparatus, characterized in that the defect processing apparatus comprises: memory, a processor and a defect handling program stored on the memory and executable on the processor, which defect handling program when executed by the processor implements the steps of the defect handling method according to any of claims 1 to 5.
7. A computer readable storage medium, wherein a defect handling program is stored on the computer readable storage medium, which defect handling program, when executed by a processor, implements the steps of the defect handling method according to any of claims 1 to 5.
CN202311183333.8A 2023-09-14 2023-09-14 Defect processing method, defect processing device and storage medium for test task Active CN116932413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311183333.8A CN116932413B (en) 2023-09-14 2023-09-14 Defect processing method, defect processing device and storage medium for test task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311183333.8A CN116932413B (en) 2023-09-14 2023-09-14 Defect processing method, defect processing device and storage medium for test task

Publications (2)

Publication Number Publication Date
CN116932413A CN116932413A (en) 2023-10-24
CN116932413B true CN116932413B (en) 2023-12-19

Family

ID=88386360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311183333.8A Active CN116932413B (en) 2023-09-14 2023-09-14 Defect processing method, defect processing device and storage medium for test task

Country Status (1)

Country Link
CN (1) CN116932413B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011079685A1 (en) * 2009-12-30 2011-07-07 北京世纪高通科技有限公司 Method and device for magaging regression test
CN103186456A (en) * 2011-12-29 2013-07-03 北京新媒传信科技有限公司 Method and device for testing system
CN108038052A (en) * 2017-11-27 2018-05-15 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
CN110471853A (en) * 2019-08-15 2019-11-19 平安普惠企业管理有限公司 APP test method, device, computer equipment and storage medium
CN111444101A (en) * 2020-03-27 2020-07-24 成都嗨学梅里教育科技有限公司 Method and device for automatically creating product test defects
CN113064824A (en) * 2021-03-31 2021-07-02 重庆紫光华山智安科技有限公司 Result analysis method and device, electronic device and storage medium
CN115629956A (en) * 2022-09-03 2023-01-20 中国电建集团华东勘测设计研究院有限公司 Software defect management method and system based on interface automatic test
CN115952081A (en) * 2022-12-05 2023-04-11 平安银行股份有限公司 Software testing method, device, storage medium and equipment
CN116303036A (en) * 2023-03-15 2023-06-23 浙江正泰仪器仪表有限责任公司 Product testing method, device, equipment and storage medium
CN116382987A (en) * 2023-02-27 2023-07-04 中科云谷科技有限公司 Performance test method, device, processor and machine-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017044069A1 (en) * 2015-09-08 2017-03-16 Hewlett Packard Enterprise Development Lp Automatic regression identification

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011079685A1 (en) * 2009-12-30 2011-07-07 北京世纪高通科技有限公司 Method and device for magaging regression test
CN103186456A (en) * 2011-12-29 2013-07-03 北京新媒传信科技有限公司 Method and device for testing system
CN108038052A (en) * 2017-11-27 2018-05-15 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
CN110471853A (en) * 2019-08-15 2019-11-19 平安普惠企业管理有限公司 APP test method, device, computer equipment and storage medium
CN111444101A (en) * 2020-03-27 2020-07-24 成都嗨学梅里教育科技有限公司 Method and device for automatically creating product test defects
CN113064824A (en) * 2021-03-31 2021-07-02 重庆紫光华山智安科技有限公司 Result analysis method and device, electronic device and storage medium
CN115629956A (en) * 2022-09-03 2023-01-20 中国电建集团华东勘测设计研究院有限公司 Software defect management method and system based on interface automatic test
CN115952081A (en) * 2022-12-05 2023-04-11 平安银行股份有限公司 Software testing method, device, storage medium and equipment
CN116382987A (en) * 2023-02-27 2023-07-04 中科云谷科技有限公司 Performance test method, device, processor and machine-readable storage medium
CN116303036A (en) * 2023-03-15 2023-06-23 浙江正泰仪器仪表有限责任公司 Product testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116932413A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN108334781B (en) Virus detection method, device, computer readable storage medium and computer equipment
CN105468529B (en) A kind of accurate traversal method of Android application UI controls and device
US11023358B2 (en) Review process for evaluating changes to target code for a software-based product
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
US7673179B2 (en) Online testing unification system with remote test automation technology
WO2018010552A1 (en) Test method and device
CN109726107A (en) Test method, device, equipment and storage medium
CN113515453B (en) Webpage testing system
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN107193730A (en) A kind of interface test method of automation
CN111462811A (en) Automatic testing method and device, storage medium and electronic equipment
CN113064824A (en) Result analysis method and device, electronic device and storage medium
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN110543429B (en) Test case debugging method, device and storage medium
CN116932413B (en) Defect processing method, defect processing device and storage medium for test task
CN111444109B (en) Mobile terminal UI automatic test method and system
CN113377669A (en) Automatic testing method and device, computer equipment and storage medium
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN112905451A (en) Automatic testing method and device for application program
CN112069073A (en) Test case management method, terminal and storage medium
CN111767218A (en) Automatic testing method, equipment and storage medium for continuous integration
CN113886262A (en) Software automation test method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant