CN109308251B - Test data verification method and device - Google Patents

Test data verification method and device Download PDF

Info

Publication number
CN109308251B
CN109308251B CN201710622510.6A CN201710622510A CN109308251B CN 109308251 B CN109308251 B CN 109308251B CN 201710622510 A CN201710622510 A CN 201710622510A CN 109308251 B CN109308251 B CN 109308251B
Authority
CN
China
Prior art keywords
preset
commodity
template
data
display
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
CN201710622510.6A
Other languages
Chinese (zh)
Other versions
CN109308251A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710622510.6A priority Critical patent/CN109308251B/en
Publication of CN109308251A publication Critical patent/CN109308251A/en
Application granted granted Critical
Publication of CN109308251B publication Critical patent/CN109308251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/3692Test management for test results analysis

Abstract

The invention discloses a method and a device for checking test data, relates to the technical field of internet, and mainly aims to solve the problems of high labor cost and low efficiency caused by manual and visual identification when a display result in a test client UI is correct in the prior art. The technical scheme of the invention comprises the following steps: receiving verification request information, wherein the verification request information comprises a template identification information ID of a template to be verified; sending and acquiring commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID; if the preset commodity database is stored in the preset baseline data, comparing the preset baseline data with the obtained commodity display data; and determining whether the verification is successful according to the comparison result. The method and the device can be applied to the process of testing the template data by the server.

Description

Test data verification method and device
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for verifying test data.
Background
With the rapid development of internet technology, the rise of mobile applications under the trend of mobile internet is a big trend, and the rapid update of mobile applications brought by the iteration of the increasingly rapid demand. In order to meet the requirement of quick update of the mobile Application, cloud template configuration is created, the mobile Application (client) update can be completed by corresponding server template configuration, dynamic template configuration can reduce the development cost of the client, and a typical mobile Application is a shopping Application (APP).
At present, the dynamic template configuration is edited in an editing module of a server, and a publishing template is published, but the editing module cannot check with a shopping APP in time after the editing is finished, and the publishing module cannot check the publishing result display. Therefore, in order to view the updated template, after the shopping APP is updated, the tester needs to start the shopping APP installed in the mobile device to view an updated User Interface (UI).
In the process of implementing the invention, the inventor finds that in the prior art, when the client UI is tested, whether the display result in the UI is correct needs to be identified by naked eyes, so that the labor cost is increased, the efficiency is low, particularly, the business range in the shopping APP is wider, the number of corresponding detailed pages is more, the manual checking mode is time-consuming and labor-consuming, and the cost is higher.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for verifying test data, and mainly aims to solve the problems of high labor cost and low efficiency caused by manual and visual identification when a display result in a test client UI is correct in the prior art.
According to a first aspect of the present invention, there is provided a method for verifying test data, comprising:
receiving verification request information, wherein the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data;
sending and acquiring commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID;
if the preset commodity database has preset baseline data, comparing the preset baseline data with the obtained commodity display data;
and determining whether the verification is successful according to the comparison result.
According to a second aspect of the present invention, there is provided a verification apparatus for test data, comprising:
the system comprises a receiving unit, a verification unit and a verification unit, wherein the receiving unit is used for receiving verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data;
the first sending unit is used for sending and acquiring commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID received by the receiving unit;
the comparison unit is used for comparing preset baseline data with the acquired commodity display data when the preset commodity database has the preset baseline data;
the display unit is used for highlighting the difference part when the comparison unit determines that the difference between the preset baseline data and the obtained commodity display data exceeds a preset difference upper limit;
and the first determining unit is used for determining whether the verification is successful according to the comparison result of the comparing unit.
According to a third aspect of the present invention, there is provided a server comprising:
the system comprises a transceiver, a verification module and a verification module, wherein the transceiver is configured to receive verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data; sending and acquiring commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID;
the processor is configured to compare preset baseline data with the acquired commodity display data when the preset commodity database has the preset baseline data;
determining whether the verification is successful according to the comparison result;
a memory configured to store executable instructions of the processor;
a bus configured to couple the transceiver, the processor, and the memory.
By means of the technical scheme, the method and the device for verifying the test data provided by the invention have the advantages that the server receives verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, one template to be verified corresponds to one type of commodity display data, and the commodity display data corresponding to the template to be verified are obtained by sending the template ID to a preset commodity database; if the preset commodity database is stored in the preset baseline data, comparing the preset baseline data with the obtained commodity display data; determining whether the verification is successful according to the comparison result; compared with the prior art, the embodiment of the invention can complete the verification of the template to be verified at the server side without manual participation, thereby greatly improving the verification efficiency.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a block diagram of a User Interface (UI) test provided in the prior art;
FIG. 2 is a flowchart illustrating a method for verifying test data according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an architecture of a server according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating that a template to be verified corresponds to a type of commodity display data according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating that the same template to be verified is applicable to different commodities according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating another method for verifying test data according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating editing for sending verification request information according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating an interface view of a component configuration provided by an embodiment of the present invention;
FIG. 9 is a diagram illustrating a verification report provided by an embodiment of the invention;
FIG. 10 is a block diagram illustrating an apparatus for verifying test data according to an embodiment of the present invention;
FIG. 11 is a block diagram illustrating another apparatus for verifying test data according to an embodiment of the present invention;
fig. 12 is a block diagram illustrating an entity architecture of a server according to an embodiment of the present invention.
Detailed Description
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.
As shown in fig. 1, fig. 1 illustrates a frame schematic diagram of a User Interface (UI) test provided in the prior art, when a UI template test needs to be performed, the correctness of a template to be tested needs to be verified in a pre-release environment, where the pre-release environment refers to an environment after the UI template is edited and before the UI template is formally released, and a programmer can test the UI template in the pre-release environment, and if the test is passed, the UI template is formally released; and if the test is not passed, continuously revising and adjusting the UI template until the UI template test is passed and releasing. The specific test process comprises the following steps: when the server pre-releases the UI template in a pre-release environment, a tester tests the UI template by using the client, sends a test request based on a search engine in the client and the server, and after the server responds to the test request, the tester manually judges whether the test is successful. The testing process is complex and needs manual intervention, resulting in low testing efficiency.
In order to solve the above problem, an embodiment of the present invention provides a method for verifying test data, where the method is applied to a server side, and as shown in fig. 2, the method includes:
101. the server receives the verification request information.
The method shown in the present invention is applied to a server side, where the server side can independently complete verification of test data without cooperation of a client, as shown in fig. 3, fig. 3 shows an architecture diagram of a server provided in an embodiment of the present invention, and the server includes, but is not limited to, the following: the template editing module is used for editing the template to be verified and sending verification request information to the MCIP module; the MCIP module is used for completing the checking work of the template to be checked; the system comprises a preset commodity database Ali ltemCenter module, a database management module and a database verification module, wherein the preset commodity database Ali ltemCenter module is essentially a data source and is used for management of common commodities and online data query, and a latest online data source is provided for UI automatic verification; and the UI automation module is used for storing the executable file for automatically executing the verification.
In the embodiment of the invention, templates to be verified need to be edited in the template editing module in advance, different templates to be verified correspond to one unique template mark information ID, and the templates to be verified are edited according to actual requirements. In the actual application process, the template ID can be automatically allocated by the template editing module or manually allocated. The template to be verified is a basic structure included in a type of commodity, for example, a commodity picture display, a seller address, a monthly sales volume and the like, and specifically, regarding commodity contents, the seller needs to add the template. In a scene of testing a UI display interface, after the template to be verified is edited, a programmer edits commodity information based on the template to be verified so as to facilitate subsequent testing.
Generally, one template to be verified corresponds to one type of commodity display data, and for example, as shown in fig. 4, the template ID1 corresponds to the display data of the shoplifted commodity class, and the template ID2 corresponds to the display data of the online shopping supermarket commodity class. For example, as shown in fig. 5, a woman's clothing and a household appliance are displayed by using a template ID1 (second-killing commodity class), both belong to the second-killing commodity class, and there may be a difference between the two display components, for example: express delivery show subassembly department, the show of women's dress commodity is "express delivery: 0.00 ", the household electrical appliances show as" express delivery: free freight, "and the like. Fig. 4 and fig. 5 are only examples provided for facilitating understanding of the present invention, and in an actual application process, the template to be verified and the product display interface are not limited.
After the template to be verified is edited by the template editing module, sending verification request information to a trigger component in the MCIP module, wherein the trigger component is used for receiving the verification request information sent by the template editing module, and the verification request information comprises the identification information ID of the template to be verified. It should be noted that the template ID described in the embodiment of the present invention may include a template ID for verifying all components in the entire template to be verified, or may be a template ID of a single component, for example, a single component, which is a display component in fig. 5, is verified.
102. And the server sends and acquires the commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID.
After receiving the verification request information sent by the template editing module, the trigger component analyzes the verification request information to obtain a template ID of the template to be verified, and transmits the template ID to the file updating updatefile component, wherein the updatefile component is used for interacting with a preset commodity database to obtain commodity display data corresponding to the latest template ID, each commodity display data corresponds to a unique commodity mark information ID, and itemlist, namely the mapping relation between the template ID and the commodity ID, is recorded in the updatefile component. The server sends and obtains the commodity display data corresponding to the template to be verified to a preset commodity library according to the template ID, and the aim of the server is to complete the verification of the template on the basis of verifying the commodity display data.
In itemlist recorded in the updatefile component, the latest data is recorded, so that the correctness and the latest of the data can be ensured, the correctness of the acquired commodity display data can be fundamentally ensured in the verification, if the correctness and the latest of the acquired commodity display data cannot be ensured, the data verification is not timely, and dirty data appears in the verification process due to the fact that the non-latest data is acquired, and the verification progress is influenced.
103. And if the preset commodity database has preset baseline data, the server compares the preset baseline data with the acquired commodity display data.
The method shown in fig. 1 is applicable in a scenario that preset baseline data exists in a preset commodity database, and the preset baseline data is reference data for verifying whether a template to be verified passes a test.
It should be noted that the preset baseline data is data set by a tester before the test is performed, may be baseline data set when the test is performed, or may be baseline data set in advance before the local test is performed, the preset baseline data is used as a reference for verifying commodity display data, the preset baseline data sets the size, length and width of all components in the template to be verified, the relative positions between the components, display contents, display shapes, and the like, and further includes the size, length and width, display contents, display shapes, and the like of individual components. For example, please continue to participate in fig. 5, although fig. 5 shows the template to be verified, the preset baseline data also represents the display shape, except that there may be a difference in size, length, width, display content, and the like between the preset baseline data and the template to be verified. Taking the commodity information description component and the express display component as an example for explanation, assuming that the commodity information description component is arranged next to the express display component in the preset baseline data, and the right side is entitled to the appreciation component, and the length and width of the commodity information description component is 10 x 2 and is displayed in a rectangular shape; set up "express delivery show subassembly" and face commodity information description subassembly on, and express delivery show subassembly's length is 10 x 1, and the content that must contain is: express delivery, monthly sales volume and seller address are displayed in a rectangular shape.
After the commodity display data are obtained, the comparison between the preset baseline data and the commodity display data is automatically executed through an executable file which is stored in the UI automation module and automatically executes verification, the compared commodity style and the specific content of the data are substantially the similarity between the preset baseline data and the commodity display data, and when the similarity between the preset baseline data and the commodity display data is compared, the size, the length and the width of each component, the relative position between the components, the display content, the display shape and other contents are compared at one time strictly according to the combination sequence between the components.
It should be noted that, when performing comparison between the preset baseline data and the merchandise display data, display pictures of the preset baseline data and the merchandise display data may be compared, and display data of the preset baseline data and the merchandise display data in an Application (APP) may also be compared. In the embodiment of the present invention, the APP may be an APP installed in a mobile device (such as a smart phone), or an APP installed in a portable device (such as a computer). In the following embodiments, the description will be given by taking the product display data as the display data in the smartphone APP, but it should be understood that the description manner is not intended to limit the specific type of the product display data.
As an optional mode of the embodiment of the present invention, when the comparison between the preset limit data and the commodity display data is performed, the commodity display data may also be display data in a common web page. In a specific implementation process, in order to improve the comparison speed, the embodiment of the present invention preferably compares the preset baseline data with the display picture of the commodity display data.
If the whole template to be verified is verified, comparing the templates one by one according to the component combination sequence of the template to be verified until all the components are compared; if one or more components in the template to be verified are verified, a certain component or a plurality of components are directly compared.
104. And the server determines whether the verification is successful according to the comparison result.
According to the method for verifying the test data, provided by the embodiment of the invention, a server receives verification request information, wherein the verification request information comprises template identification Information (ID) of a template to be verified, one template to be verified corresponds to one type of commodity display data, and the commodity display data corresponding to the template to be verified are sent and obtained to a preset commodity database according to the template ID; if the preset commodity database is stored in the preset baseline data, comparing the preset baseline data with the obtained commodity display data; determining whether the verification is successful according to the comparison result; compared with the prior art, the embodiment of the invention can complete the verification of the template to be verified at the server side without manual participation, thereby greatly improving the verification efficiency.
As a refinement and extension of the method shown in fig. 2, there are two cases of performing the comparison result of step 103, and different comparison results represent two results of the verification: a successful verification or a failed verification. The method comprises the following specific steps:
the first method comprises the following steps: and if the difference between the preset baseline data and the obtained commodity display data exceeds a preset difference upper limit, the server determines that the verification of the template to be verified fails, and highlights the difference part.
In an embodiment of the present invention, the preset difference upper limit is an empirical value, the larger the preset difference upper limit is, the larger the range representing that the difference between the commodity display data and the preset baseline data is allowed to exist is, the smaller the preset difference upper limit is, the smaller the range representing that the difference between the commodity display data and the preset baseline data is allowed to exist is, for example, when the preset difference upper limit is 0, it indicates that the data to be verified can only pass the verification when the commodity display data and the preset baseline data are completely the same. In the practical application process, a preset upper difference limit may be set to be 0.05, or 0.02, etc., when the preset upper difference limit is 0.05, it indicates that the difference between the commodity display data and the preset baseline data is not more than 0.05, that is, the similarity between the commodity display data and the preset baseline data is not less than 0.95, and when the preset upper difference limit is 0.02, it indicates that the difference between the commodity display data and the preset baseline data is not more than 0.02, that is, the similarity between the commodity display data and the preset baseline data is not less than 0.98.
And when the difference between the preset baseline data and the commodity display data exceeds the preset difference upper limit, highlighting the difference part, wherein the goal is to guide the re-editing of the template to be verified through highlighting so as to complete the verification work more quickly. As an implementation manner of the embodiment of the present invention, when the difference portion is highlighted, a manner of highlighting the difference portion may be adopted, and a manner of frame-selecting the difference portion may also be adopted, and specifically, the manner of highlighting is not limited in the embodiment of the present invention.
In practical applications, after the UI automation module executes the preset baseline data and the commodity display data, the UI automation module transmits the comparison result to a database (for example, an OSS server) for storage, so that the compare & report component under the MCIP module downloads the comparison result. In order to facilitate management of the comparison result, the UI automation module names the comparison result in a picture mode according to a specific naming mode of the comparison result picture, for example, the comparison result of the first verification performed on the women's clothing of the second commodity killing class is named by miaosha-girl-1, the comparison result of the second verification performed on the women's clothing of the second commodity killing class is named by miaosha-girl-2, and the like.
And the compare & report component downloads the comparison result in the database, generates an execution comparison report according to the comparison result, transmits the comparison report to the notification notify component so as to send the execution comparison report to the test terminal through the notify component, and can send the execution comparison report in a mode of mail, short message and the like when sending the execution comparison report.
And the second method comprises the following steps: and if the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit, the server determines that the template to be verified is verified successfully.
Whether the template to be verified is verified successfully or not, the UI automation module uploads the comparison result to the database so that the compare and report component downloads the comparison result, generates an execution comparison report, and sends the execution comparison report to a designated terminal through the notify component.
After the template to be verified is verified successfully, the template can be released, so that the APP can display commodities according to the updated template (the template to be verified). The template may configure a fixed layout for components in some display interfaces, such as component display size, which component displays fixed content, and so on, but with respect to the specific content of the merchandise display, the merchandise needs to be sold to edit, such as merchandise display style, content, whether to avoid mail, and so on.
The method shown in fig. 1 is applicable to an application scenario in which preset baseline data exists in a preset commodity library, and an application scenario in which whether preset baseline data exists in an uncertain preset commodity library is provided as follows, and an execution method is shown in fig. 6, and includes:
201. the server receives the verification request information (same as step 101).
202. And the server analyzes the verification request information and determines whether the verification request information carries a setting instruction.
If the setting instruction is carried, executing step 203; if the setting instruction is not carried, step 204 is executed.
The verification request information comprises a setting instruction and an execution comparison instruction (namely, the verification request information does not carry the setting instruction) besides the template ID of the template to be verified, wherein the setting instruction is used for indicating that the commodity display data corresponding to the template to be verified is set as the preset baseline data, and the execution comparison instruction is used for indicating that the commodity display data is directly compared with the preset baseline data.
The server analyzes the message corresponding to the checking request information, the content of the message carries a setting instruction/execution comparison instruction, and the server can execute the corresponding instruction according to the analysis result.
From the aspect of user operation, after a template to be verified is edited by a template editing module, a tested template ID is input in a message sending platform in a template editing platform, and verification request information carrying the template ID is sent to a trigger component, as shown in FIG. 7, FIG. 7 shows an editing schematic diagram for sending the verification request information provided by the embodiment of the invention, after the template ID of the template to be verified is input, whether a baseline is set is checked, and if commodity display data corresponding to the template to be verified is set as preset baseline data, checking is performed in a selection frame after whether the baseline is set is performed; if commodity display data corresponding to the template to be verified is not set as preset baseline data, no operation is performed on the selection frame after the 'whether the baseline is set' is performed, and when the template ID and the confirmation of whether the baseline is set are completed, the test button is clicked, so that verification request information can be sent to the MCIP module, the verification request information carries a setting instruction, fig. 7 is only an exemplary example, and a display interface input by the background of the template editing platform is not limited by the embodiment of the invention.
203. And the server responds to the setting instruction and sets the commodity display data corresponding to the template to be verified as preset baseline data.
And the server searches the corresponding commodity display data based on the template ID according to the setting instruction, and sets the commodity display data as preset baseline data. As an implementation manner of the embodiment of the present invention, when the commodity display data is a picture, the mark information of the preset baseline data may be embedded in the picture; as another implementation manner of the embodiment of the present invention, when the commodity display data is web page data, mark information of preset baseline data may be embedded in a web page URL; or forming a picture according to the webpage data, and embedding mark information of preset baseline data in the picture. The embodiment of the invention does not limit the implementation mode of setting the preset baseline data.
Optionally, a storage area specially used for storing the preset baseline data may be set in the preset commodity database, and when a setting instruction is received, commodity display data corresponding to the template to be verified is transferred to the storage area of the preset baseline data, so as to complete setting of the baseline data.
204. And the server acquires the commodity identification information ID and sends request information for acquiring preset baseline data to the preset commodity database according to the template ID and the commodity ID.
If the response information of the preset commodity database is not received, executing step 205; if the response information of the preset commodity database is not received, step 203 is executed.
After receiving the comparison execution instruction, the server acquires a corresponding commodity ID according to the template ID, and acquires corresponding preset baseline data based on the commodity ID, wherein the specific process is as follows:
firstly, a server acquires a preset configuration file, wherein the preset configuration file records the mapping relation between the template ID and the commodity ID; further, detailed explanations about the representative meaning of the template ID, the representative meaning of the article ID, and the like are included. Illustratively, assume that template ID "second Kill-1-2" is female pants for second Kill type merchandise, template table "department-2-1" is kitchen wok for department merchandise, template ID "children's garments-1-3" is a girl toy for children's merchandise, template ID "children's garments-2-1" is a boy jacket for children's merchandise, and so on. As shown in table 1, table 1 shows a mapping relationship between a template ID and a product ID recorded in a preset configuration file in the embodiment of the present invention, it should be noted that the naming mode of table 1 is only an exemplary description, and the embodiment of the present invention does not limit naming of the template ID and the product ID in practical application.
TABLE 1
Figure BDA0001362012690000111
Secondly, the server searches the commodity ID corresponding to the template ID based on the preset configuration file, and after the server acquires the template ID, the server searches the commodity ID corresponding to the template ID through the mapping relation between the template ID and the commodity ID recorded in the table 1. And finally, the server sends request information for acquiring preset baseline data to the preset commodity database, wherein the request information carries the template ID and the commodity ID.
205. And the server compares preset baseline data with the acquired commodity display data.
If the difference between the preset baseline data and the obtained commodity display data exceeds a preset difference upper limit, executing step 206; if the difference between the preset baseline data and the obtained merchandise display data does not exceed the preset difference upper limit, step 211 is executed.
In the embodiment of the present invention, regardless of the commodity display data corresponding to the template or the preset baseline data, there is a data display interface, in an interface view, a component is a minimum unit of layout rendering, and one interface view is composed of a plurality of components, as shown in fig. 8, fig. 8 shows a schematic diagram of an interface view composed of components provided in the embodiment of the present invention, the interface shown in fig. 8 includes 7 components, the content displayed in each component is different, for example, the content displayed in the component 1 is a commodity picture, and the content displayed in the component 6 is coupon information; differences may also exist in the way each component is presented, such as: the component 3 comprises 2 sub-components, one sub-component is used for displaying description information of commodities, and the other sub-component is used for displaying sharing icon information; the component 2 comprises a progress bar component besides commodity price and sales information. In the practical application process, a complete display commodity not only includes 7 components, but also includes components in a commodity detail page, and the like.
In order to ensure the correctness and reliability of the verification, when the comparison and verification are executed, the mode of comparing each component in the display interface is adopted so as to improve the verification accuracy. The specific comparison process comprises the following steps: the server decomposes the preset baseline data to obtain a plurality of first display assemblies, decomposes the commodity display data to obtain a plurality of second display assemblies, and sequentially compares the first display assemblies with the second display assemblies according to the combination sequence of the assemblies; here, it should be noted that the template is updated based on the requirements of the customer for browsing and purchasing, or the requirements of the seller for displaying and selling goods, and the template of different versions may have small differences, which relate to the change of the content of the component, or the change of the size of the component display shape, and so on. In order to enhance the comparison accuracy, in the embodiment of the present invention, in a specific implementation, the comparison is performed from the first (first) component of the current interface view, and after the comparison is completed, the second and third components are sequentially compared until all the components are compared. If the sequential comparison method is not adopted, there may be errors in the comparison, and the search for errors may reduce the comparison efficiency.
If it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit, determining that a difference exists between the preset baseline data and the obtained commodity display data; it should be noted that the difference here is the sum of the differences between all the first display assemblies and all the second display assemblies, and does not refer to the difference between a single first display assembly and a single second display assembly.
If it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies does not exceed the preset difference upper limit, it is determined that there is no difference between the preset baseline data and the acquired merchandise display data.
206. The server determines a first total and a second total.
The first total number is the number of the second display components, and the second total number is the number of components having a difference between the plurality of first display components and the plurality of second display components.
The number of the second display assemblies (the display assemblies forming the commodity display data) is determined, and the number of the assemblies with differences between the plurality of first display assemblies and the plurality of second display assemblies is determined, so that the assemblies tested in the template are gathered, a user can check conveniently, and the readability of the check result is achieved.
207. And the server generates a comparison result summary according to the first total number and the second total number.
The summary of the comparison result includes the total number of the verified components and the total difference in the verification process.
208. The server generates a comparison result detail according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity and the difference data; and labeling the difference data by highlighting, wherein the similarity is the similarity between the first display component and the second display component.
The comparison result detail contains the detail information of each first display component and each second display component during comparison, so that common users can conveniently know different points and influence points before and after the template is published.
209. And the server generates a test report according to the comparison result summary and the comparison result detail.
As shown in fig. 9, fig. 9 is a schematic diagram of a verification report provided by an embodiment of the present invention, and fig. 9 is an illustration of an example in which a template to be verified includes 12 components, where 12 of the 12 components are different from preset baseline data, such as a "summary of comparison results" part in the diagram. In the "detailed comparison result" part, the comparison result of the commodity display data and the preset baseline data is given, and in the comparison result, the difference content between the commodity display data and the preset baseline data is marked by using highlight (a shaded part drawn in fig. 9), so that subsequent modification is facilitated.
210. And the server outputs and displays the verification report.
211. And the server determines that the template to be verified is verified successfully.
Through the detailed description of step 201 and step 211, it can be seen that the embodiment of the present invention is applicable to any data test scenario, and the test mode has certain universality and correctness, i.e., the change of the service does not affect the accuracy of the test data, and can be used for the test of the commodity data, the test of the website data, and other application scenarios. Secondly, in the testing process, the robustness and reusability of the test are ensured by performing comparison between the components, namely the accuracy of the test data is not influenced by the change of the template in the same application scene. Thirdly, test results are summarized in a check report form, the results are easy to read, and common users can conveniently know different points before and after the template is published; fourthly, before the release template is executed during testing, the template to be verified can be previewed dynamically, and the operation is simple.
Optionally, before comparing the preset baseline data with the obtained commodity display data, the method further includes: the server acquires a preset verification environment, wherein the verification request message comprises the preset verification environment; and acquiring preset baseline data corresponding to the preset verification environment, wherein different verification environments correspond to different baseline data. Wherein the preset verification environment includes, but is not limited to, the following, for example: a pre-release environment, a test environment, a verification environment, a pre-release processing environment, a post-release timing regression environment, and the like.
Further, as an implementation of the method shown in the foregoing embodiment, another embodiment of the present invention further provides a device for verifying test data. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method.
An embodiment of the present invention provides a device for verifying test data, as shown in fig. 10, including:
the receiving unit 41 is configured to receive verification request information, where the verification request information includes template identification information ID of a template to be verified, and one template to be verified corresponds to one type of commodity display data;
a first sending unit 42, configured to send and acquire commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID received by the receiving unit 41;
a comparison unit 43, configured to compare preset baseline data with the obtained commodity display data when the preset commodity database has the preset baseline data;
a first determining unit 44, configured to determine whether the verification is successful according to the comparison result of the comparing unit 43.
Further, as shown in fig. 11, the apparatus further includes:
a display unit 45, configured to highlight the difference portion when the comparison unit 43 determines that the difference between the preset baseline data and the obtained merchandise display data exceeds a preset upper difference limit.
Further, as shown in fig. 11, the apparatus further includes:
a second determining unit 46, configured to determine that the template to be verified is verified successfully when the comparing unit 43 determines that the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit.
Further, as shown in fig. 11, if there is no preset baseline data in the preset commodity database, the apparatus further includes:
an analyzing unit 47, configured to analyze the verification request information received by the receiving unit 41;
a third determining unit 48, configured to determine, during the analysis of the verification request information by the analyzing unit 47, whether the verification request information carries a setting instruction, where the setting instruction is used to instruct to set the commodity display data corresponding to the template to be verified as preset baseline data;
a first setting unit 49, configured to, when the third determining unit 48 determines that the verification request information carries the setting instruction, set, in response to the setting instruction, commodity display data corresponding to the template to be verified as preset baseline data;
a processing unit 410, configured to, when the third determining unit 48 determines that the verification request information does not carry the setting instruction, obtain a commodity identification information ID, and send request information for obtaining preset baseline data to the preset commodity database according to the template ID and the commodity ID;
the second setting unit 411 is configured to set, when the response information of the preset commodity database is not received, commodity display data corresponding to the template to be verified as preset baseline data.
Further, as shown in fig. 11, the processing unit 410 includes:
an obtaining module 4101, configured to obtain a preset configuration file, where a mapping relationship between the template ID and the commodity ID is recorded in the preset configuration file;
a searching module 4102, configured to search, based on the preset configuration file acquired by the acquiring module 4101, a commodity ID corresponding to the template ID;
a sending module 4103, configured to send request information for obtaining preset baseline data to the preset commodity database, where the request information carries the template ID and the commodity ID found by the searching module.
Further, as shown in fig. 11, the comparing unit 43 includes:
the processing module 431 is configured to decompose the preset baseline data to obtain a plurality of first display assemblies, and decompose the commodity display data to obtain a plurality of second display assemblies;
a comparison module 432, configured to compare the first display component and the second display component sequentially according to a combination order of the components;
a first determining module 433, configured to determine that there is a difference between the preset baseline data and the obtained merchandise display data when the comparing module 432 determines that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit;
a second determining module 434, configured to determine that there is no difference between the preset baseline data and the obtained merchandise display data when the comparing module 432 determines that the difference between the plurality of first display components and the plurality of second display components does not exceed the preset upper difference limit.
Further, as shown in fig. 11, the apparatus further includes:
a fourth determining unit 412, configured to determine a first total number and a second total number before the displaying unit 45 highlights the difference portion, where the first total number is the number of the second display components, and the second total number is the number of components having differences between the first display components and the second display components;
a first generating unit 413, configured to generate a comparison result summary according to the first total number and the second total number determined by the third determining unit 412;
a second generating unit 414, configured to generate a comparison result detail according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity, and the difference data; the difference data are marked by highlighting, and the similarity is the similarity between the first display assembly and the second display assembly;
a third generating unit 415, configured to generate a test report according to the summary of the comparison result generated by the first generating unit 414 and the detail of the comparison result generated by the second generating unit;
the display unit 45 is further configured to output and display the verification report generated by the third generation unit 415.
Further, as shown in fig. 11, the apparatus further includes:
a pushing unit 416, configured to store the verification report generated by the third generating unit 415, and send the verification report to a target pushing address.
Further, as shown in fig. 11, the method further includes:
a naming unit 417, configured to save the verification report generated by the third generating unit 415 as a picture format, and name the picture according to a predetermined naming format.
Further, as shown in fig. 11, the apparatus further includes:
a first obtaining unit 418, configured to obtain a preset verification environment before comparing preset baseline data with the obtained commodity display data, where the verification request message includes the preset verification environment;
a second obtaining unit 419, configured to obtain preset baseline data corresponding to the preset verification environment obtained by the first obtaining unit 418, where different verification environments correspond to different baseline data.
According to the method and the device for verifying the test data, provided by the embodiment of the invention, a server receives verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, one template to be verified corresponds to one type of commodity display data, and the commodity display data corresponding to the template to be verified are obtained by sending the template ID to a preset commodity database; if the preset commodity database is stored in the preset baseline data, comparing the preset baseline data with the obtained commodity display data; if the difference between the preset baseline data and the obtained commodity display data exceeds a preset difference upper limit, highlighting the difference part; if the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit, determining that the template to be verified is verified successfully; compared with the prior art, the embodiment of the invention can complete the verification of the template to be verified at the server side without manual participation, thereby greatly improving the verification efficiency.
Further, as an implementation of the method shown in the foregoing embodiment, another embodiment of the present invention further provides a server. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method.
An embodiment of the present invention further provides a server, as shown in fig. 12, including:
the transceiver 51 is configured to receive verification request information, the verification request information includes template identification information ID of templates to be verified, and one template to be verified corresponds to one type of commodity display data; sending and acquiring commodity display data corresponding to the template to be verified to a preset commodity database according to the template ID;
the processor 52 is configured to compare preset baseline data with the acquired commodity display data when the preset commodity database has the preset baseline data;
determining whether the verification is successful according to the comparison result;
a memory 53 configured to store executable instructions of the processor 52;
a bus 54 configured to couple the transceiver 51, the processor 52, and the memory 53.
Further, as shown in fig. 12, the processor 52 is further configured to:
and when the difference between the preset baseline data and the acquired commodity display data exceeds a preset difference upper limit, highlighting the difference part.
Further, as shown in fig. 12, the processor 52 is further configured to:
when the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit, determining that the template to be verified is verified successfully;
further, as shown in fig. 12, the processor 52 is further configured to:
if no preset baseline data exists in the preset commodity database, analyzing the verification request information, and determining whether the verification request information carries a setting instruction, wherein the setting instruction is used for indicating that commodity display data corresponding to the template to be verified are set as preset baseline data;
if the setting instruction is carried, responding to the setting instruction, and setting the commodity display data corresponding to the template to be verified as preset baseline data;
if the setting instruction is not carried, acquiring a commodity identification Information (ID), and sending request information for acquiring preset baseline data to the preset commodity database according to the template ID and the commodity ID;
and if the response information of the preset commodity database is not received, setting the commodity display data corresponding to the template to be verified as preset baseline data.
Further, as shown in fig. 12, the processor 52 is further configured to:
acquiring a preset configuration file, wherein the preset configuration file records the mapping relation between the template ID and the commodity ID;
searching a commodity ID corresponding to the template ID based on the preset configuration file;
and sending request information for acquiring preset baseline data to the preset commodity database, wherein the request information carries the template ID and the commodity ID.
Further, as shown in fig. 12, the processor 52 is further configured to:
decomposing the preset baseline data to obtain a plurality of first display assemblies, and decomposing the commodity display data to obtain a plurality of second display assemblies;
sequentially comparing the first display component with the second display component according to the combination sequence of the components;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit, determining that a difference exists between the preset baseline data and the obtained commodity display data;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies does not exceed the preset difference upper limit, it is determined that there is no difference between the preset baseline data and the acquired merchandise display data.
Further, as shown in fig. 12, the processor 52 is further configured to:
determining a first total number and a second total number before highlighting the difference portion, the first total number being the number of the second display elements, the second total number being the number of elements having a difference between the plurality of first display elements and the plurality of second display elements;
generating a comparison result summary according to the first total number and the second total number;
generating a comparison result detail according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity and the difference data; the difference data are marked by highlighting, and the similarity is the similarity between the first display assembly and the second display assembly;
generating a test report according to the comparison result summary and the comparison result detail;
the highlighting the difference portion includes:
and outputting and displaying the verification report.
Further, as shown in fig. 12, the processor 52 is further configured to:
storing the verification report;
a transceiver 51 further configured to send the verification report to a target push address.
Further, as shown in fig. 12, the processor 52 is further configured to:
and storing the verification report as a picture format, and naming the picture according to a preset naming format.
Further, as shown in fig. 12, the processor 52 is further configured to:
before comparing preset baseline data with the acquired commodity display data, acquiring a preset verification environment, wherein the verification request message comprises the preset verification environment;
and acquiring preset baseline data corresponding to the preset verification environment, wherein different verification environments correspond to different baseline data.
In the server provided by the embodiment of the invention, the transceiver is used for receiving the verification request information, the verification request information comprises the template identification information ID of the template to be verified, one template to be verified corresponds to one type of commodity display data, and the processor is used for sending and acquiring the commodity display data corresponding to the template to be verified to the preset commodity database according to the template ID; if the preset commodity database is stored in the preset baseline data, comparing the preset baseline data with the obtained commodity display data; determining whether the verification is successful according to the comparison result; compared with the prior art, the embodiment of the invention can complete the verification of the template to be verified at the server side without manual participation, thereby greatly improving the verification efficiency.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method and apparatus for verification of test data according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. 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.

Claims (24)

1. A method for verifying test data, comprising:
receiving verification request information, wherein the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data;
acquiring commodity display data corresponding to the template to be verified from a preset commodity database according to the template ID;
if the preset commodity database has preset baseline data, comparing the preset baseline data with the obtained commodity display data;
determining whether the verification is successful according to the comparison result;
if the preset baseline data does not exist in the preset commodity database, the method further comprises the following steps:
analyzing the verification request information, and determining whether the verification request information carries a setting instruction, wherein the setting instruction is used for indicating that commodity display data corresponding to the template to be verified is set as preset baseline data;
if the setting instruction is carried, responding to the setting instruction, and setting the commodity display data corresponding to the template to be verified as preset baseline data;
if the setting instruction is not carried, acquiring a commodity identification Information (ID), and sending request information for acquiring preset baseline data to the preset commodity database according to the template ID and the commodity ID;
and if the response information of the preset commodity database is not received, setting the commodity display data corresponding to the template to be verified as preset baseline data.
2. The method of claim 1,
and if the difference between the preset baseline data and the obtained commodity display data exceeds a preset difference upper limit, highlighting the difference part.
3. The method of claim 1,
and if the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit, determining that the template to be verified is verified successfully.
4. The method of claim 1, wherein obtaining a product identification Information (ID), and sending a request for obtaining preset baseline data to the preset product database according to the template ID and the product ID comprises:
acquiring a preset configuration file, wherein the preset configuration file records the mapping relation between the template ID and the commodity ID;
searching a commodity ID corresponding to the template ID based on the preset configuration file;
and sending request information for acquiring preset baseline data to the preset commodity database, wherein the request information carries the template ID and the commodity ID.
5. The method of claim 4, wherein comparing pre-determined baseline data with the obtained merchandise display data comprises:
decomposing the preset baseline data to obtain a plurality of first display assemblies, and decomposing the commodity display data to obtain a plurality of second display assemblies;
sequentially comparing the first display component with the second display component according to the combination sequence of the components;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit, determining that a difference exists between the preset baseline data and the obtained commodity display data;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies does not exceed the preset difference upper limit, it is determined that there is no difference between the preset baseline data and the acquired merchandise display data.
6. The method of claim 5, wherein prior to highlighting the differential portion, the method further comprises:
determining a first total number and a second total number, wherein the first total number is the number of the second display components, and the second total number is the number of components with differences between the plurality of first display components and the plurality of second display components;
generating a comparison result summary according to the first total number and the second total number;
generating a comparison result detail according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity and the difference data; the difference data are marked by highlighting, and the similarity is the similarity between the first display assembly and the second display assembly;
generating a verification report according to the comparison result summary and the comparison result detail;
the highlighting the difference portion includes:
and outputting and displaying the verification report.
7. The method of claim 6, further comprising:
and storing the check report, and sending the check report to a target push address.
8. The method of claim 6, further comprising:
and storing the verification report as a picture format, and naming the picture according to a preset naming format.
9. The method of claim 8, wherein prior to comparing the pre-determined baseline data with the obtained merchandise display data, the method further comprises:
acquiring a preset verification environment, wherein the verification request information comprises the preset verification environment;
and acquiring preset baseline data corresponding to the preset verification environment, wherein different verification environments correspond to different baseline data.
10. A verification apparatus for test data, comprising:
the system comprises a receiving unit, a verification unit and a verification unit, wherein the receiving unit is used for receiving verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data;
the first sending unit is used for acquiring commodity display data corresponding to the template to be verified from a preset commodity database according to the template ID received by the receiving unit;
the comparison unit is used for comparing preset baseline data with the acquired commodity display data when the preset commodity database has the preset baseline data;
the first determining unit is used for determining whether the verification is successful according to the comparison result of the comparing unit;
if no preset baseline data exists in the preset commodity database, the device further comprises:
the analysis unit is used for analyzing the verification request information received by the receiving unit;
a second determining unit, configured to determine whether the verification request information carries a setting instruction in a process of analyzing the verification request information by the analyzing unit, where the setting instruction is used to instruct that the commodity display data corresponding to the template to be verified is set as preset baseline data;
the first setting unit is used for responding to the setting instruction and setting the commodity display data corresponding to the template to be verified as preset baseline data when the second determining unit determines that the verification request information carries the setting instruction;
the processing unit is used for acquiring a commodity identification Information (ID) when the second determining unit determines that the verification request information does not carry the setting instruction, and sending request information for acquiring preset baseline data to the preset commodity database according to the template ID and the commodity ID;
and the second setting unit is used for setting the commodity display data corresponding to the template to be verified as preset baseline data when the response information of the preset commodity database is not received.
11. The apparatus of claim 10, further comprising:
a display unit, configured to highlight a difference portion when the first determination unit determines that the difference between the preset baseline data and the acquired merchandise display data exceeds a preset difference upper limit.
12. The apparatus of claim 10, further comprising:
and the second determining unit is used for determining that the template to be verified is verified successfully when the first determining unit determines that the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit.
13. The apparatus of claim 10, wherein the processing unit comprises:
the acquisition module is used for acquiring a preset configuration file, and the preset configuration file records the mapping relation between the template ID and the commodity ID;
the searching module is used for searching the commodity ID corresponding to the template ID based on the preset configuration file acquired by the acquiring module;
and the sending module is used for sending request information for acquiring preset baseline data to the preset commodity database, wherein the request information carries the template ID and the commodity ID searched by the searching module.
14. The apparatus of claim 13, wherein the alignment unit comprises:
the processing module is used for decomposing the preset baseline data to obtain a plurality of first display assemblies, and decomposing the commodity display data to obtain a plurality of second display assemblies;
the comparison module is used for respectively comparing the first display component with the second display component in sequence according to the combination sequence of the components;
the first determining module is used for determining that the difference between the preset baseline data and the obtained commodity display data exists when the comparing module determines that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit;
a second determining module, configured to determine that there is no difference between the preset baseline data and the obtained merchandise display data when the comparing module determines that the difference between the plurality of first display assemblies and the plurality of second display assemblies does not exceed the preset difference upper limit.
15. The apparatus of claim 14, further comprising:
a third determining unit, configured to determine a first total number and a second total number before the displaying unit highlights the difference portion, where the first total number is the number of the second display assemblies, and the second total number is the number of the assemblies having the difference between the plurality of first display assemblies and the plurality of second display assemblies;
a first generating unit, configured to generate a comparison result summary according to the first total number and the second total number determined by the third determining unit;
the second generation unit is used for generating comparison result details according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity and the difference data; the difference data are marked by highlighting, and the similarity is the similarity between the first display assembly and the second display assembly;
a third generating unit, configured to generate a verification report according to the comparison result summary generated by the first generating unit and the comparison result detail generated by the second generating unit;
the display unit is further configured to output and display the verification report generated by the third generation unit.
16. A server, comprising:
the system comprises a transceiver, a verification module and a verification module, wherein the transceiver is configured to receive verification request information, the verification request information comprises template identification Information (ID) of a template to be verified, and one template to be verified corresponds to one type of commodity display data; acquiring commodity display data corresponding to the template to be verified from a preset commodity database according to the template ID;
the processor is configured to compare preset baseline data with the acquired commodity display data when the preset commodity database has the preset baseline data;
determining whether the verification is successful according to the comparison result;
a memory configured to store executable instructions of the processor;
a bus configured to couple the transceiver, the processor, and the memory;
the processor is further configured to:
if no preset baseline data exists in the preset commodity database, analyzing the verification request information, and determining whether the verification request information carries a setting instruction, wherein the setting instruction is used for indicating that commodity display data corresponding to the template to be verified are set as preset baseline data;
if the setting instruction is carried, responding to the setting instruction, and setting the commodity display data corresponding to the template to be verified as preset baseline data;
if the setting instruction is not carried, acquiring a commodity identification Information (ID), and sending request information for acquiring preset baseline data to the preset commodity database according to the template ID and the commodity ID;
and if the response information of the preset commodity database is not received, setting the commodity display data corresponding to the template to be verified as preset baseline data.
17. The server of claim 16, wherein the processor is further configured to:
and when the difference between the preset baseline data and the acquired commodity display data exceeds a preset difference upper limit, highlighting the difference part.
18. The server of claim 16, wherein the processor is further configured to:
and when the difference between the preset baseline data and the obtained commodity display data does not exceed the preset difference upper limit, determining that the template to be verified is verified successfully.
19. The server of claim 16, wherein the processor is further configured to:
acquiring a preset configuration file, wherein the preset configuration file records the mapping relation between the template ID and the commodity ID;
searching a commodity ID corresponding to the template ID based on the preset configuration file;
and sending request information for acquiring preset baseline data to the preset commodity database, wherein the request information carries the template ID and the commodity ID.
20. The server of claim 19, wherein the processor is further configured to:
decomposing the preset baseline data to obtain a plurality of first display assemblies, and decomposing the commodity display data to obtain a plurality of second display assemblies;
sequentially comparing the first display component with the second display component according to the combination sequence of the components;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies exceeds a preset difference upper limit, determining that a difference exists between the preset baseline data and the obtained commodity display data;
if it is determined that the difference between the plurality of first display assemblies and the plurality of second display assemblies does not exceed the preset difference upper limit, it is determined that there is no difference between the preset baseline data and the acquired merchandise display data.
21. The server of claim 20, wherein the processor is further configured to:
determining a first total number and a second total number before highlighting the difference portion, the first total number being the number of the second display elements, the second total number being the number of elements having a difference between the plurality of first display elements and the plurality of second display elements;
generating a comparison result summary according to the first total number and the second total number;
generating a comparison result detail according to the template ID, the commodity ID, the preset baseline data, the commodity display data, the similarity and the difference data; the difference data are marked by highlighting, and the similarity is the similarity between the first display assembly and the second display assembly;
generating a verification report according to the comparison result summary and the comparison result detail;
the highlighting the difference portion includes:
and outputting and displaying the verification report.
22. The server of claim 21, wherein the processor is further configured to:
storing the verification report;
a transceiver further configured to send the verification report to a target push address.
23. The server of claim 21, wherein the processor is further configured to:
and storing the verification report as a picture format, and naming the picture according to a preset naming format.
24. The server according to claim 23, wherein the processor is further configured to:
acquiring a preset verification environment before comparing preset baseline data with the acquired commodity display data, wherein the verification request information comprises the preset verification environment;
and acquiring preset baseline data corresponding to the preset verification environment, wherein different verification environments correspond to different baseline data.
CN201710622510.6A 2017-07-27 2017-07-27 Test data verification method and device Active CN109308251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710622510.6A CN109308251B (en) 2017-07-27 2017-07-27 Test data verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710622510.6A CN109308251B (en) 2017-07-27 2017-07-27 Test data verification method and device

Publications (2)

Publication Number Publication Date
CN109308251A CN109308251A (en) 2019-02-05
CN109308251B true CN109308251B (en) 2022-03-25

Family

ID=65202335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710622510.6A Active CN109308251B (en) 2017-07-27 2017-07-27 Test data verification method and device

Country Status (1)

Country Link
CN (1) CN109308251B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188159B (en) * 2019-05-27 2023-05-12 深圳前海微众银行股份有限公司 Credit data access method, device, equipment and computer readable storage medium
CN110764998B (en) * 2019-09-06 2024-04-02 平安健康保险股份有限公司 Data comparison method, device, equipment and storage medium based on Django framework
CN111813686B (en) * 2020-07-20 2022-05-27 腾讯科技(深圳)有限公司 Game testing method and device, testing terminal and storage medium
CN113742021B (en) * 2021-09-06 2023-01-17 北京字节跳动网络技术有限公司 Data verification method and device, electronic equipment and storage medium
CN113987016B (en) * 2021-10-25 2023-08-15 上海太美数字科技有限公司 Clinical delivery data comparison method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012104488A1 (en) * 2011-02-02 2012-08-09 Teknologian Tutkimuskeskus Vtt Arrangement and method for model-based testing
CN103593429A (en) * 2013-11-07 2014-02-19 北京奇虎科技有限公司 Commodity template failure detection method and device
US9218267B1 (en) * 2013-08-14 2015-12-22 Amazon Technologies, Inc. Page rendering feedback
GB201613873D0 (en) * 2015-08-14 2016-09-28 Wal Mart Stores Inc Systems, devices and methods for monitoring modular compliance in a shopping space
CN106874173A (en) * 2015-12-10 2017-06-20 阿里巴巴集团控股有限公司 The method of testing and device of Page Template

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10387585B2 (en) * 2014-10-30 2019-08-20 The Mathworks, Inc. System and method for performing model verification
CN106708723B (en) * 2015-11-13 2019-11-08 阿里巴巴集团控股有限公司 A kind of test, method of calibration and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012104488A1 (en) * 2011-02-02 2012-08-09 Teknologian Tutkimuskeskus Vtt Arrangement and method for model-based testing
US9218267B1 (en) * 2013-08-14 2015-12-22 Amazon Technologies, Inc. Page rendering feedback
CN103593429A (en) * 2013-11-07 2014-02-19 北京奇虎科技有限公司 Commodity template failure detection method and device
GB201613873D0 (en) * 2015-08-14 2016-09-28 Wal Mart Stores Inc Systems, devices and methods for monitoring modular compliance in a shopping space
CN106874173A (en) * 2015-12-10 2017-06-20 阿里巴巴集团控股有限公司 The method of testing and device of Page Template

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于应用模板仓库的电子商务系统开发平台的设计与实现;祝锡永;《计算机应用》;20040630;第24卷(第6期);第162-164页 *
基于快速构建模板的购物信息抽取方法;李萍 等;《计算机应用》;20140310;第34卷(第3期);第733-737页 *

Also Published As

Publication number Publication date
CN109308251A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109308251B (en) Test data verification method and device
US9607010B1 (en) Techniques for shape-based search of content
US9589295B2 (en) Purchasing systems and methods
CN106648556B (en) Method and device for front-end and back-end integrated development test
CN109284712B (en) Configuration method and device of commodity information
CN106651407B (en) Data acquisition method and device
US20190384616A1 (en) Method for displaying and changing mobile commerce elements within native application instantly without code build
CN109815119B (en) APP link channel testing method and device
US11195227B2 (en) Visual search, discovery and attribution method, system, and computer program product
CN113018870B (en) Data processing method, device and computer readable storage medium
CN111428131A (en) Information pushing method, device and system
CN111192089A (en) Electronic ticket generation method and device and computer system
CN110362702B (en) Picture management method and equipment
CN112905441A (en) Test case generation method, test method, device and equipment
CN110633220A (en) Debugging information display method and device, storage medium and electronic equipment
US10417687B1 (en) Generating modified query to identify similar items in a data store
KR101764361B1 (en) Method of providing shopping mall service based sns and apparatus for the same
CN114219587B (en) Order data processing method and device, storage medium and computer equipment
CN114219589B (en) Virtual entity object generation and page display method and device and electronic equipment
CN107767207B (en) Method and equipment for processing object data set
CN115048302A (en) Front-end compatibility testing method and device, storage medium and electronic equipment
CN105074747A (en) Selectively linking auctions to end at the same time
CN110147477B (en) Data resource modeling extraction method, device and equipment of Web system
CN109766480B (en) Data query method and device
CN107491999B (en) Statistical method, device and system for incoming order quantity of active pages

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