CN111966847A - Report regression testing method, device and system - Google Patents

Report regression testing method, device and system Download PDF

Info

Publication number
CN111966847A
CN111966847A CN202010794281.8A CN202010794281A CN111966847A CN 111966847 A CN111966847 A CN 111966847A CN 202010794281 A CN202010794281 A CN 202010794281A CN 111966847 A CN111966847 A CN 111966847A
Authority
CN
China
Prior art keywords
picture
report
sub
comparison
historical
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.)
Pending
Application number
CN202010794281.8A
Other languages
Chinese (zh)
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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network Technology 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202010794281.8A priority Critical patent/CN111966847A/en
Publication of CN111966847A publication Critical patent/CN111966847A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a report regression testing method, a device and a system, which are used for acquiring a report picture to be tested and query information sent by front-end equipment; inquiring a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library; comparing the report picture to be detected with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result; and sending the test information generated according to the image comparison result to the front-end equipment. By adopting the technical scheme of the invention, the report picture to be tested and the historical report picture can be compared by utilizing the pre-configured picture comparison tool, whether the report picture to be tested and the historical report picture are distinguished or not and the distinguishing point can be determined, the browser drive does not need to be started, and the problem of inaccurate element grabbing does not occur, so that the report comparison speed and the test accuracy are improved, the manual writing of sql is not needed, the influence of the capability of a tester on the regression test is reduced, and the regression test efficiency is improved.

Description

Report regression testing method, device and system
Technical Field
The invention relates to the technical field of regression testing, in particular to a report regression testing method, device and system.
Background
Data visualization refers to transmitting data in a chart mode, so that a user can quickly and accurately understand contents to be expressed by information, and communication efficiency is improved. At present, the application of visual report forms is particularly extensive, and visual report forms can transmit more information to vivid, the understanding of being convenient for can let the user grasp the main points fast through simpler logic and visual experience.
In order to ensure the accuracy of the report data, regression testing needs to be performed on the report. Because the report is generally encapsulated, the data can not be contrasted and regressed through the interface. Therefore, in the prior art, regression testing is usually performed based on a front-end automation framework such as selenium or the like, or a tester queries a database by writing sql and performs comparative regression with a page display value. However, if regression testing is performed based on a front-end automation frame such as selenium, the situation that elements are not accurately captured or captured cannot be generated due to the selenium frame may occur, and browser driving needs to be started during comparison, so that the comparison speed is slow, and the accuracy is low. If the tester queries the database by writing sql and performs comparative regression with the page display value, the requirement on the capability of the tester is high, and if the programming capability of the tester sql is weak or the business is not solved, the efficiency of regression testing is low.
Disclosure of Invention
In view of the above, the present invention provides a report regression testing method, apparatus and system, so as to solve the problems of slow contrast speed, low accuracy and low regression testing efficiency in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a report regression testing method comprises the following steps:
acquiring a report picture to be detected sent by front-end equipment and query information corresponding to the report picture to be detected;
inquiring a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library;
comparing the report picture to be detected with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result;
generating test information corresponding to the picture comparison result according to the picture comparison result;
and sending the test information to the front-end equipment so as to be conveniently checked by a tester.
Further, in the report regression testing method, the comparing the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result includes:
performing equal area division on the report picture to be detected and the target historical report picture by using the picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas; the number of the report sub-areas to be tested is the same as that of the historical report sub-areas, and the report sub-areas to be tested correspond to the historical report sub-areas one by one;
comparing each sub-area of the report to be tested with the corresponding sub-area of the historical report to be tested to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each sub-area of the report to be tested;
judging whether all the subregion comparison results show that the image subregions are consistent or not;
if all the sub-region comparison results show that the sub-regions of the pictures are consistent, determining that the picture comparison results show that the report picture to be tested is consistent with the target historical report picture;
and if the sub-region comparison results do not indicate that all the sub-regions of the pictures are consistent, determining that the picture comparison results indicate that the report picture to be detected is inconsistent with the target historical report picture.
Further, in the report regression testing method, the generating of the testing information corresponding to the picture comparison result according to the picture comparison result includes:
if the picture comparison result shows that the report picture to be detected is inconsistent with the target historical report picture, determining picture distinguishing information of the report picture to be detected and the target historical report picture according to all the subarea comparison results and all the subarea comparison details;
taking the set of the picture distinguishing information and the picture comparison result as the test information;
and if the picture comparison result shows that the report picture to be tested is consistent with the target historical report picture, taking the picture comparison result as the test information.
Further, in the report regression testing method, before the obtaining of the report picture to be tested sent by the front-end device and the query information corresponding to the report picture to be tested, the method further includes:
receiving a historical report picture carrying a type identifier sent by a test server;
storing the historical report picture into the historical report picture library;
generating a query label matched with the type identifier according to the type identifier;
and sending the query tag to the front-end equipment so as to enable the front-end equipment to display the query tag.
Further, in the report regression testing method, the query information carries a target query tag input by the tester through the front-end device;
the querying of the target historical report picture matched with the query information from the pre-constructed historical report picture library comprises the following steps:
determining a target type identifier matched with the target query tag;
and inquiring a target historical report picture corresponding to the target type identifier from the historical report picture library.
Further, in the report regression testing method, before comparing the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool, the method further includes:
acquiring a picture comparison analysis program sent by front-end equipment;
and configuring the picture comparison tool by utilizing the picture comparison analysis program.
The invention also provides a report regression testing device, which comprises:
the acquisition module is used for acquiring a report picture to be detected sent by front-end equipment and query information corresponding to the report picture to be detected;
the query module is used for querying a target historical report picture matched with the query information from a pre-constructed historical report picture library;
the comparison module is used for comparing the report picture to be detected with the target historical report picture by using a preset picture comparison tool to obtain a picture comparison result;
the generating module is used for generating test information corresponding to the picture comparison result according to the picture comparison result;
and the sending module is used for sending the test information to the front-end equipment so as to be checked by a tester.
Further, in the report regression testing apparatus, the comparison module includes: the device comprises an area dividing unit, an area comparing unit, a judging unit and a determining unit;
the area dividing unit is used for performing equal area division on the report picture to be detected and the target historical report picture by using the picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas; the number of the report sub-areas to be tested is the same as that of the historical report sub-areas, and the report sub-areas to be tested correspond to the historical report sub-areas one by one;
the area comparison unit is used for comparing each report sub-area to be detected with the historical report sub-area corresponding to the report sub-area to be detected to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each report sub-area to be detected;
the judging unit is used for judging whether all the subarea comparison results show that the image subareas are consistent or not;
the determining unit is used for determining that the picture comparison result shows that the report picture to be detected is consistent with the target historical report picture if all the sub-region comparison results show that the picture sub-regions are consistent; and if the sub-region comparison results do not indicate that all the sub-regions of the pictures are consistent, determining that the picture comparison results indicate that the report picture to be detected is inconsistent with the target historical report picture.
Further, the report regression testing apparatus further includes: the device comprises a receiving module and a storage module;
the receiving module is used for receiving the historical report picture which is sent by the test server and carries the type identifier;
the storage module is used for storing the historical report picture into the historical report picture library;
the generation module is further used for generating a query tag matched with the type identifier according to the type identifier;
the sending module is further configured to send the query tag to the front-end device, so that the front-end device displays the query tag.
The invention also provides a report regression testing system, which comprises: the system comprises a processor and a memory connected with the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the report regression testing method;
the processor is used for calling and executing the computer program.
A report regression testing method, device and system are disclosed, wherein a report picture to be tested sent by a front-end device and query information corresponding to the report picture to be tested are obtained; inquiring a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library; comparing the report picture to be detected with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result; generating test information corresponding to the comparison result according to the picture comparison result; and sending the test information to the front-end equipment so as to be conveniently checked by a tester. By adopting the technical scheme of the invention, the report picture to be tested and the historical report picture can be compared by utilizing the pre-configured picture comparison tool, whether the report picture to be tested and the historical report picture are distinguished or not and the distinguishing point can be determined, the browser drive does not need to be started, and the problem of inaccurate element grabbing does not occur, so that the report comparison speed and the test accuracy are improved, the manual writing of sql is not needed, the influence of the capability of a tester on the regression test is reduced, and the regression test efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a regression testing method for reports according to an embodiment of the present invention;
FIG. 2 is a flowchart of a regression testing method for reports according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a regression testing apparatus for reports according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a regression testing system for reports according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Fig. 1 is a flowchart provided in an embodiment of the report regression testing method of the present invention, and as shown in fig. 1, the report regression testing method of the present embodiment specifically includes the following steps:
s101, acquiring a report picture to be detected sent by front-end equipment and query information corresponding to the report picture to be detected;
and (4) building a test environment on the picture comparison server, and ensuring that the picture comparison server is smoothly connected with the front-end equipment. The method comprises the steps that a tester can upload a report picture to be tested through front-end equipment, input a target query tag corresponding to the report picture to be tested, the front-end equipment generates query information corresponding to the report picture to be tested according to the target query tag, and sends the report picture to be tested and the query information. The picture comparison server acquires the report picture to be detected sent by the front-end equipment and the query information corresponding to the report picture to be detected. In addition, if the report to be tested uploaded by the tester through the front-end device is not in the picture format, the report to be tested needs to be converted into the report picture to be tested in the picture format by using tools such as excel. The report picture to be tested can comprise a column diagram, a line diagram, a sector diagram, a prototype diagram and the like.
S102, inquiring a target historical report picture matched with inquiry information from a pre-constructed historical report picture library;
a historical report picture library is pre-constructed in the picture comparison server and used for storing the historical report pictures uploaded by the testing personnel operating the testing server. And the picture comparison server inquires a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library.
S103, comparing the report picture to be detected with the target historical report picture by using a preset picture comparison tool to obtain a picture comparison result;
and a picture comparison tool is configured in the picture comparison server in advance, and the obtained report picture to be detected and the inquired target historical report picture are compared by using the picture comparison tool, so that a picture comparison result is obtained. The picture comparison result can be expressed as that the report picture to be detected is consistent with the target historical report picture, and can also be expressed as that the report picture to be detected is inconsistent with the target historical report picture.
S104, generating test information corresponding to the picture comparison result according to the picture comparison result;
and generating test information corresponding to the comparison result according to the obtained picture comparison result. If the picture comparison result shows that the report picture to be tested is consistent with the target historical report picture, taking the picture comparison result as test information; and if the picture comparison result shows that the report picture to be tested is inconsistent with the target historical report picture, comparing the report picture to be tested with the target historical report picture to determine the picture distinguishing information of the report picture to be tested and the target historical report picture, and taking the set of the picture distinguishing information and the picture comparison result as the test information.
And S105, sending the test information to the front-end equipment.
After the test information of the report picture to be tested is generated, the test information is sent to the front-end equipment, so that a tester can check the test information through the front-end equipment, and the tester can process the report corresponding to the report picture to be tested according to the test information.
The report regression testing method of the embodiment obtains a report picture to be tested sent by front-end equipment and query information corresponding to the report picture to be tested; inquiring a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library; comparing the report picture to be detected with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result; generating test information corresponding to the comparison result according to the picture comparison result; and sending the test information to the front-end equipment. By adopting the technical scheme of the embodiment, the report picture to be tested and the target historical report picture can be compared by utilizing the pre-configured picture comparison tool, whether the report picture to be tested and the target historical report picture are different and the difference point between the report picture and the target historical report picture can be determined, browser driving is not required to be started, the problem of inaccurate element grabbing is avoided, the report comparison speed and the test accuracy are improved, manual writing of sql is not required, the influence of the capability of a tester on regression testing is reduced, and the regression testing efficiency is improved.
Further, fig. 2 is a flowchart provided in another embodiment of the report regression testing method of the present invention, in the report regression testing method of the present embodiment, a pre-configured picture comparison tool is used to compare a report picture to be tested with a target historical report picture to obtain a picture comparison result, including the following steps S201 to S204 and S206.
Further, in the report regression testing method of this embodiment, the generating of the testing information corresponding to the comparison result according to the picture comparison result includes the following steps S205, S207, and S208.
S201, performing equal area division on the report picture to be detected and the target historical report picture by using a picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas;
the picture comparison server can perform equal area division on the report picture to be detected and the target historical report picture by using a preset picture comparison tool and adopting the same area division mode, so that at least two report sub-areas to be detected and at least two historical report sub-areas are obtained. The number of the to-be-detected report sub-areas divided by the to-be-detected report picture is the same as that of the historical report sub-areas divided by the target historical report picture, and the to-be-detected report sub-areas and the historical report sub-areas are in one-to-one correspondence. For example, the area division mode is to divide the picture into A, B, C, D four areas, and then the sub-area of the report to be tested includes: a report A sub-area to be tested, a report B sub-area to be tested, a report C sub-area to be tested and a report D sub-area to be tested; the history report sub-area includes: the report comprises a historical report A sub-area, a historical report B sub-area, a historical report C sub-area and a historical report D sub-area. The sub-area of the report to be tested corresponds to the sub-area of the historical report A, the sub-area of the report to be tested corresponds to the sub-area of the historical report B, the sub-area of the report to be tested corresponds to the sub-area of the historical report C, and the sub-area of the report to be tested corresponds to the sub-area of the historical report D.
S202, comparing each report sub-region to be detected with a historical report sub-region corresponding to the report sub-region to be detected to obtain a sub-region comparison result and a sub-region comparison detail corresponding to each report sub-region to be detected;
and comparing each sub-area of the report to be detected with the corresponding sub-area of the historical report by using a picture comparison tool to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each sub-area of the report to be detected. The sub-region comparison result may be expressed as that the picture sub-regions are consistent or that the picture sub-regions are inconsistent.
For example, in the above steps, the sub-area of the report to be tested a is compared with the sub-area of the historical report a to obtain the sub-area comparison result and the sub-area comparison detail corresponding to the sub-area a, the sub-area of the report to be tested B is compared with the sub-area of the historical report B to obtain the sub-area comparison result and the sub-area comparison detail corresponding to the sub-area B, the sub-area of the report to be tested C is compared with the sub-area of the historical report C to obtain the sub-area comparison result and the sub-area comparison detail corresponding to the sub-area C, and the sub-area of the report to be tested D is.
S203, judging whether all the subarea comparison results show that the image subareas are consistent or not, if so, executing a step S204; if not, go to step S206;
and after obtaining all the sub-region comparison results, judging whether all the sub-region comparison results show that the image sub-regions are consistent. If all the sub-region comparison results show that the image sub-regions are consistent, executing step S204; if all the sub-region comparison results do not all indicate that the picture sub-regions are consistent, that is, if one or more sub-region comparison results indicate that the picture sub-regions are inconsistent, step S206 is executed.
S204, determining that the picture comparison result shows that the report picture to be detected is consistent with the target historical report picture;
and if all the sub-region comparison results show that the sub-regions of the pictures are consistent, the to-be-detected report picture and the target historical report picture are consistent, and then the picture comparison results show that the to-be-detected report picture and the target historical report picture are consistent.
S205, taking the picture comparison result as test information;
and if the picture comparison result shows that the report picture to be tested is consistent with the target historical report picture, taking the picture comparison result as test information.
S206, determining that the picture comparison result shows that the report picture to be detected is inconsistent with the target historical report picture;
and if the comparison results of all the sub-areas do not indicate that all the sub-areas of the pictures are consistent, the difference points between the report picture to be detected and the target historical report picture are indicated, and then the picture comparison results are determined to indicate that the report picture to be detected is inconsistent with the target historical report picture.
S207, determining picture distinguishing information of the report picture to be detected and the target historical report picture according to the comparison results of all the sub-regions and the comparison details of all the sub-regions;
and if the picture comparison result shows that the report picture to be detected is inconsistent with the target historical report picture, obtaining the subarea comparison details corresponding to all the subarea comparison results which show that the subareas of the picture are inconsistent according to all the subarea comparison results and all the subarea comparison details, and taking the subarea comparison details as the picture distinguishing information of the report picture to be detected and the target historical report picture.
And S208, taking the set of the picture distinguishing information and the picture comparison result as test information.
And taking the set of the determined picture distinguishing information and the picture comparison result as test information. The picture distinguishing information includes the area where the distinguishing point is located, the specific position and data in the area, and the like. According to the report regression testing method, the to-be-tested report picture and the target historical report picture are compared in a region division mode, the accuracy of positioning of a comparison result can be improved, the comparison speed is increased, and therefore the regression testing efficiency is improved.
Further, in the report regression testing method of this embodiment, before acquiring the report picture to be tested sent by the front-end device and the query information corresponding to the report picture to be tested, the method further includes:
firstly, receiving a historical report picture carrying a type identifier sent by a test server;
a tester can operate the test server to upload a historical report picture, wherein the historical report picture carries a type identifier. The image comparison server is connected with the test server and can receive the historical report image which is sent by the test server and carries the type identifier. The historical report picture is a report picture which is tested without problems before on the basis of some parameters.
Secondly, storing the historical report picture into a historical report picture library;
the picture comparison server is internally constructed with a historical report picture library, and stores all received historical report pictures with type identifications into the historical report picture library.
Thirdly, generating a query label matched with the type identifier according to the type identifier;
and generating a query label matched with the type identifier according to the received type identifier. Wherein, the number of types of the type identifiers is the same as the number of the query tags.
And fourthly, sending the query tag to the front-end equipment.
And sending all the generated query tags to the front-end equipment so that the front-end equipment displays all the query tags, a tester can select a target query tag corresponding to the report picture to be tested through the front-end equipment, and the front-end equipment can generate query information according to the target query tag and send the query information to the picture comparison server.
Further, in the report regression testing method of the embodiment, the query information carries a target query tag input by a tester through the front-end device; inquiring a target historical report picture matched with inquiry information from a pre-constructed historical report picture library, wherein the inquiry comprises the following steps:
firstly, determining a target type identifier matched with a target query tag;
after the query information sent by the front-end equipment is obtained, the target type identification matched with the target query label is determined according to the target query label carried by the query information.
Secondly, a target historical report picture corresponding to the target type identification is inquired from the historical report picture library.
The method comprises the steps of storing historical report pictures carrying type identifications in a pre-constructed historical report picture library, and inquiring and acquiring a target historical report picture corresponding to the target type identification from the historical report picture library according to the determined target type identification so as to compare the report picture to be detected with the target historical report picture.
Further, in the report regression testing method of this embodiment, before comparing the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool, the method further includes:
firstly, acquiring a picture comparison analysis program sent by front-end equipment;
the program configurator can send a picture comparison analysis program to the picture comparison server through the front-end device, wherein the picture comparison analysis program is a program written manually and used for picture comparison analysis.
Secondly, a picture comparison tool is configured by utilizing the picture comparison analysis program.
After the picture comparison server receives the picture comparison analysis program, a program configuration worker can configure a picture comparison tool by using the picture comparison analysis program, so that the picture comparison server can compare the report picture to be detected with the target historical report picture by using the picture comparison tool.
In order to be more comprehensive, the present application also provides a report regression testing apparatus corresponding to the report regression testing method provided in the embodiment of the present invention.
Fig. 3 is a schematic structural diagram provided in an embodiment of the regression testing apparatus for reports of the present invention, and as shown in fig. 3, the regression testing apparatus for reports of the present embodiment includes: the system comprises an acquisition module 101, a query module 102, a comparison module 103, a generation module 104 and a sending module 105.
The acquiring module 101 is configured to acquire a report picture to be detected and query information corresponding to the report picture to be detected, which are sent by a front-end device;
the query module 102 is configured to query a target historical report picture matched with query information from a pre-constructed historical report picture library;
the comparison module 103 is used for comparing the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result;
the generating module 104 is configured to generate test information corresponding to the picture comparison result according to the picture comparison result;
and the sending module 105 is used for sending the test information to the front-end equipment so as to be convenient for the tester to check.
In the report regression testing apparatus of this embodiment, the obtaining module 101 obtains the report picture to be tested sent by the front-end device and the query information corresponding to the report picture to be tested; the query module 102 queries a target historical report picture matched with query information from a pre-constructed historical report picture library; the comparison module 103 compares the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result; the generating module 104 generates test information corresponding to the comparison result according to the picture comparison result; the sending module 105 sends the test information to the head-end apparatus. By adopting the technical scheme of the embodiment, the report picture to be tested and the target historical report picture can be compared by utilizing the pre-configured picture comparison tool, whether the report picture to be tested and the target historical report picture are different and the difference point between the report picture and the target historical report picture can be determined, browser driving is not required to be started, the problem of inaccurate element grabbing is avoided, the report comparison speed and the test accuracy are improved, manual writing of sql is not required, the influence of the capability of a tester on regression testing is reduced, and the regression testing efficiency is improved.
Further, in the report regression testing apparatus of this embodiment, the comparing module 103 includes: the device comprises an area dividing unit, an area comparing unit, a judging unit and a determining unit.
The area dividing unit is used for carrying out equal area division on the report picture to be detected and the target historical report picture by utilizing a picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas; the number of the report sub-areas to be detected is the same as that of the historical report sub-areas, and the report sub-areas to be detected correspond to the historical report sub-areas one by one;
the area comparison unit is used for comparing each report sub-area to be detected with the historical report sub-area corresponding to the report sub-area to be detected to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each report sub-area to be detected;
the judging unit is used for judging whether all the subarea comparison results show that the image subareas are consistent or not;
the determining unit is used for determining that the picture comparison result shows that the report picture to be detected is consistent with the target historical report picture if all the sub-region comparison results show that the picture sub-regions are consistent; and if the comparison results of all the sub-areas do not indicate that all the sub-areas of the pictures are consistent, determining that the picture comparison results indicate that the report picture to be detected is inconsistent with the target historical report picture.
Further, in the report regression testing apparatus of this embodiment, the generating module 104 is specifically configured to:
if the picture comparison result shows that the report picture to be detected is inconsistent with the target historical report picture, determining picture distinguishing information of the report picture to be detected and the target historical report picture according to the comparison results of all the sub-areas and the comparison details of all the sub-areas;
taking the set of the picture distinguishing information and the picture comparison result as test information;
and if the picture comparison result shows that the report picture to be tested is consistent with the target historical report picture, taking the picture comparison result as test information.
Further, the report regression testing apparatus of this embodiment further includes: the device comprises a receiving module and a storage module;
the receiving module is used for receiving a historical report picture which is sent by the test server and carries the type identifier;
the storage module is used for storing the historical report pictures into a historical report picture library;
the generating module 104 is further configured to generate a query tag matched with the type identifier according to the type identifier;
the sending module 105 is further configured to send the query tag to the front-end device, so that the front-end device displays the query tag.
Further, in the report regression testing apparatus of this embodiment, the query information carries a target query tag input by a tester through the front-end device;
the query module 102 is specifically configured to determine a target type identifier matching a target query tag; and inquiring a target historical report picture corresponding to the target type identifier from the historical report picture library.
Further, the report regression testing apparatus of this embodiment further includes: and configuring the module.
The obtaining module 101 is further configured to obtain a picture comparison analysis program sent by the front-end device;
and the configuration module is also used for configuring the picture comparison tool by utilizing the picture comparison analysis program.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a schematic structural diagram provided in an embodiment of the regression testing system for reports of the present invention, and as shown in fig. 4, the regression testing system for reports of the present embodiment includes: a processor 21 and a memory 22 connected to the processor 21.
The memory 22 is used for storing a computer program, and the computer program is at least used for executing the report regression testing method described in the above embodiment; the processor 21 is used to call and execute the computer program.
The report regression testing system can compare the report picture to be tested with the target historical report picture by utilizing the pre-configured picture comparison tool, can determine whether the report picture to be tested and the target historical report picture are different and the difference point between the report picture and the target historical report picture, does not need to start a browser drive, and does not have the problem of inaccurate element grabbing, so that the report comparison speed and the testing accuracy are improved, manual writing of sql is not needed, the influence of the capability of a tester on regression testing is reduced, and the efficiency of regression testing is improved.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A report regression testing method is characterized by comprising the following steps:
acquiring a report picture to be detected sent by front-end equipment and query information corresponding to the report picture to be detected;
inquiring a target historical report picture matched with the inquiry information from a pre-constructed historical report picture library;
comparing the report picture to be detected with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result;
generating test information corresponding to the picture comparison result according to the picture comparison result;
and sending the test information to the front-end equipment so as to be conveniently checked by a tester.
2. The report regression testing method according to claim 1, wherein the comparing the report picture to be tested with the target historical report picture by using a pre-configured picture comparison tool to obtain a picture comparison result comprises:
performing equal area division on the report picture to be detected and the target historical report picture by using the picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas; the number of the report sub-areas to be tested is the same as that of the historical report sub-areas, and the report sub-areas to be tested correspond to the historical report sub-areas one by one;
comparing each sub-area of the report to be tested with the corresponding sub-area of the historical report to be tested to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each sub-area of the report to be tested;
judging whether all the subregion comparison results show that the image subregions are consistent or not;
if all the sub-region comparison results show that the sub-regions of the pictures are consistent, determining that the picture comparison results show that the report picture to be tested is consistent with the target historical report picture;
and if the sub-region comparison results do not indicate that all the sub-regions of the pictures are consistent, determining that the picture comparison results indicate that the report picture to be detected is inconsistent with the target historical report picture.
3. The report regression testing method according to claim 2, wherein the generating of the testing information corresponding to the picture comparison result according to the picture comparison result comprises:
if the picture comparison result shows that the report picture to be detected is inconsistent with the target historical report picture, determining picture distinguishing information of the report picture to be detected and the target historical report picture according to all the subarea comparison results and all the subarea comparison details;
taking the set of the picture distinguishing information and the picture comparison result as the test information;
and if the picture comparison result shows that the report picture to be tested is consistent with the target historical report picture, taking the picture comparison result as the test information.
4. The report regression testing method according to claim 1, wherein before the obtaining of the report picture to be tested sent by the front-end device and the query information corresponding to the report picture to be tested, the method further comprises:
receiving a historical report picture carrying a type identifier sent by a test server;
storing the historical report picture into the historical report picture library;
generating a query label matched with the type identifier according to the type identifier;
and sending the query tag to the front-end equipment so as to enable the front-end equipment to display the query tag.
5. The report regression testing method according to claim 4, wherein the query information carries a target query tag input by the tester through the front-end device;
the querying of the target historical report picture matched with the query information from the pre-constructed historical report picture library comprises the following steps:
determining a target type identifier matched with the target query tag;
and inquiring a target historical report picture corresponding to the target type identifier from the historical report picture library.
6. The regression testing method for report forms according to claim 1, wherein before comparing the report form picture to be tested with the target historical report form picture by using a pre-configured picture comparison tool, the method further comprises:
acquiring a picture comparison analysis program sent by front-end equipment;
and configuring the picture comparison tool by utilizing the picture comparison analysis program.
7. A report regression testing device is characterized by comprising:
the acquisition module is used for acquiring a report picture to be detected sent by front-end equipment and query information corresponding to the report picture to be detected;
the query module is used for querying a target historical report picture matched with the query information from a pre-constructed historical report picture library;
the comparison module is used for comparing the report picture to be detected with the target historical report picture by using a preset picture comparison tool to obtain a picture comparison result;
the generating module is used for generating test information corresponding to the picture comparison result according to the picture comparison result;
and the sending module is used for sending the test information to the front-end equipment so as to be checked by a tester.
8. The regression testing apparatus for reports as claimed in claim 7, wherein said comparing module comprises: the device comprises an area dividing unit, an area comparing unit, a judging unit and a determining unit;
the area dividing unit is used for performing equal area division on the report picture to be detected and the target historical report picture by using the picture comparison tool to obtain at least two report sub-areas to be detected and at least two historical report sub-areas; the number of the report sub-areas to be tested is the same as that of the historical report sub-areas, and the report sub-areas to be tested correspond to the historical report sub-areas one by one;
the area comparison unit is used for comparing each report sub-area to be detected with the historical report sub-area corresponding to the report sub-area to be detected to obtain a sub-area comparison result and a sub-area comparison detail corresponding to each report sub-area to be detected;
the judging unit is used for judging whether all the subarea comparison results show that the image subareas are consistent or not;
the determining unit is used for determining that the picture comparison result shows that the report picture to be detected is consistent with the target historical report picture if all the sub-region comparison results show that the picture sub-regions are consistent; and if the sub-region comparison results do not indicate that all the sub-regions of the pictures are consistent, determining that the picture comparison results indicate that the report picture to be detected is inconsistent with the target historical report picture.
9. The report regression testing apparatus according to claim 7, further comprising: the device comprises a receiving module and a storage module;
the receiving module is used for receiving the historical report picture which is sent by the test server and carries the type identifier;
the storage module is used for storing the historical report picture into the historical report picture library;
the generation module is further used for generating a query tag matched with the type identifier according to the type identifier;
the sending module is further configured to send the query tag to the front-end device, so that the front-end device displays the query tag.
10. A report regression testing system, comprising: the system comprises a processor and a memory connected with the processor;
the memory is used for storing a computer program at least for executing the report regression test method according to any one of claims 1 to 6;
the processor is used for calling and executing the computer program.
CN202010794281.8A 2020-08-10 2020-08-10 Report regression testing method, device and system Pending CN111966847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010794281.8A CN111966847A (en) 2020-08-10 2020-08-10 Report regression testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010794281.8A CN111966847A (en) 2020-08-10 2020-08-10 Report regression testing method, device and system

Publications (1)

Publication Number Publication Date
CN111966847A true CN111966847A (en) 2020-11-20

Family

ID=73364989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010794281.8A Pending CN111966847A (en) 2020-08-10 2020-08-10 Report regression testing method, device and system

Country Status (1)

Country Link
CN (1) CN111966847A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346911A (en) * 2020-11-24 2021-02-09 星云海数字科技股份有限公司 Report data statistical function testing method and system
CN114168565A (en) * 2021-12-10 2022-03-11 北京宇信科技集团股份有限公司 Backtracking test method, device and system of business rule model and decision engine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221967A1 (en) * 2011-02-25 2012-08-30 Sabrina Kwan Dashboard object validation
CN105868348A (en) * 2016-03-28 2016-08-17 乐视控股(北京)有限公司 Content obtaining method and device
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN109165162A (en) * 2018-08-31 2019-01-08 北京车和家信息技术有限公司 A kind of test method and relevant device of onboard system
CN110287125A (en) * 2019-07-04 2019-09-27 中国工商银行股份有限公司 Software routine test method and device based on image recognition
CN110737599A (en) * 2019-10-18 2020-01-31 付彪 Front-end automatic regression testing system and method based on picture comparison technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221967A1 (en) * 2011-02-25 2012-08-30 Sabrina Kwan Dashboard object validation
CN105868348A (en) * 2016-03-28 2016-08-17 乐视控股(北京)有限公司 Content obtaining method and device
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN109165162A (en) * 2018-08-31 2019-01-08 北京车和家信息技术有限公司 A kind of test method and relevant device of onboard system
CN110287125A (en) * 2019-07-04 2019-09-27 中国工商银行股份有限公司 Software routine test method and device based on image recognition
CN110737599A (en) * 2019-10-18 2020-01-31 付彪 Front-end automatic regression testing system and method based on picture comparison technology

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346911A (en) * 2020-11-24 2021-02-09 星云海数字科技股份有限公司 Report data statistical function testing method and system
CN114168565A (en) * 2021-12-10 2022-03-11 北京宇信科技集团股份有限公司 Backtracking test method, device and system of business rule model and decision engine
CN114168565B (en) * 2021-12-10 2022-07-08 北京宇信科技集团股份有限公司 Backtracking test method, device and system of business rule model and decision engine

Similar Documents

Publication Publication Date Title
US11315084B2 (en) Method and system for aggregating diagnostic analyzer related information
CN109633351B (en) Intelligent IT operation and maintenance fault positioning method, device, equipment and readable storage medium
CN111966847A (en) Report regression testing method, device and system
CN109359032B (en) Test data collection method, device and system and electronic equipment
CN109669798B (en) Crash analysis method, crash analysis device, electronic equipment and storage medium
CN110708214B (en) Service data display method, device, equipment and computer readable storage medium
CN111506358B (en) Method and device for updating container configuration
CN114124694A (en) Configuration method and configuration device of Internet of things equipment, electronic equipment and medium
CN110888804B (en) Interface test method and interface test platform
CN105813102B (en) Automatic test system and method
CN112286818A (en) Fault processing method, device, equipment and storage medium of ADAS system
CN115103392B (en) ESIM terminal test method, instrument, portal server, device and system
CN113377610B (en) Performance monitoring method, device, computer equipment and storage medium
CN116149941A (en) Monitoring method and device of server component, server and storage medium
CN111966394B (en) ETL-based data analysis method, device, equipment and storage medium
CN115994709A (en) Data index calculation method, device, computer equipment and storage medium
CN115470100A (en) Signal scene testing method and device for automobile parts
CN114356769A (en) Software learning method, device, equipment and storage medium
CN105391602B (en) A kind of data acquisition test method and apparatus
CN109684525B (en) Document display method and device, storage medium and test equipment
CN109388385B (en) Method and apparatus for application development
CN112596982A (en) Multi-data-source project service monitoring method and device
CN111352780A (en) Method and device for determining state of path and readable storage medium
CN110569025B (en) Variable processing method and device, readable storage medium and electronic equipment
CN111597858B (en) Method and device for correlating production images and computer 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