CN109885490A - A kind of picture control methods and device - Google Patents

A kind of picture control methods and device Download PDF

Info

Publication number
CN109885490A
CN109885490A CN201910105033.5A CN201910105033A CN109885490A CN 109885490 A CN109885490 A CN 109885490A CN 201910105033 A CN201910105033 A CN 201910105033A CN 109885490 A CN109885490 A CN 109885490A
Authority
CN
China
Prior art keywords
information
contact surface
interface
screenshot
tag identifier
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.)
Granted
Application number
CN201910105033.5A
Other languages
Chinese (zh)
Other versions
CN109885490B (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.)
Beijing Testin Information Technology Co Ltd
Original Assignee
Guangzhou Cloud Information 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 Guangzhou Cloud Information Technology Co Ltd filed Critical Guangzhou Cloud Information Technology Co Ltd
Priority to CN201910105033.5A priority Critical patent/CN109885490B/en
Publication of CN109885490A publication Critical patent/CN109885490A/en
Application granted granted Critical
Publication of CN109885490B publication Critical patent/CN109885490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of image comparison methods, comprising: obtains the first interface screenshot at the interface presented when the target detection instruction in operation test script;The first interface feature information of the first interface screenshot is extracted, the first interface feature information includes the first interfacial structure information;According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, judge whether the first interface screenshot and second contact surface screenshot are identical, and second contact surface characteristic information includes second contact surface structural information.The embodiment of the present invention can accurately and securely judge whether two pictures are identical, promote the efficiency of picture comparison.

Description

A kind of picture control methods and device
Technical field
The present invention relates to automatic test field more particularly to a kind of picture control methods and devices.
Background technique
In application delivery before use, the performance of application would generally be checked by application test.When carrying out using test, It can use testing tool, according to test case, tested application operated under the defined conditions, to find to apply Mistake is measured application quality, and is assessed whether application is able to satisfy design requirement.
Before application automatic test, it is necessary first to which tester treats the correct behaviour of test application with a terminal device Make process and carry out test one time manually, and carries out screenshotss preservation in the key node of process.When tester is according to correct operation Process can generate automatic test script after completing test, the automatic test script of generation then can be used later at more not Test application, which is treated, on same terminal device carries out automatic test respectively.
In addition, needing during being carried out on more different terminal devices using automatic test in above-mentioned each pass Key node carries out same screenshotss preservation, and the picture that by picture that screenshotss obtain and manual operation when intercepts carries out automation pair Than, with confirmed by the whether identical comparing result of two pictures it is current using automatic testing process execute whether just Really.
Therefore, it is necessary to a kind of pictures to compare scheme, can accurately and securely judge whether two pictures are identical, thus Help to promote the efficiency that picture compares.
Summary of the invention
The embodiment of the present invention provides a kind of picture comparison scheme, it is intended to whether can accurately and reliably judge two pictures It is identical, promote the efficiency of picture comparison.
The embodiment of the present invention adopts the following technical solutions:
In a first aspect, the embodiment of the present invention provides a kind of picture control methods, comprising:
Obtain the first interface screenshot at the interface presented when the target detection instruction in operation test script;
The first interface feature information of first interface screenshot is extracted, the first interface feature information includes the first boundary Face structural information;
According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, described first is judged Whether interface screenshot and the second contact surface screenshot are identical, and the second contact surface characteristic information includes second contact surface structural information.
Optionally, in the picture control methods that the application first aspect provides, the test script corresponds to be tested answer With;Wherein, the second contact surface screenshot is based on receiving during the manual test of the application to be tested for described The screenshot at interface, which instructs, to be generated, and the target detection instruction is generated based on shot operation corresponding with screenshot instruction.
Optionally, described to be believed according to first interface feature in the picture control methods that the application first aspect provides Breath and the second contact surface characteristic information of second contact surface screenshot judges whether are first interface screenshot and the second contact surface screenshot It is identical, comprising:
When the first interfacial structure information and the second contact surface structural information match, first interface is determined Screenshot is identical as the second contact surface screenshot;
When the first interfacial structure information and the second contact surface structural information mismatch, first interface is determined Screenshot is different from the second contact surface screenshot.
Optionally, in the picture control methods that the application first aspect provides, further includes:
It whether include target carousel figure pair according to the first interfacial structure information and the second contact surface structural information The structure feature answered, judges whether the first interfacial structure information and the second contact surface structural information match;
If not, it is determined that the first interfacial structure information and the second contact surface structural information mismatch;
If so, the first Dynamic Graph number and second structure feature that include according to the first structure characteristic information The first difference between the second Dynamic Graph number that information includes, judges the first interfacial structure information and the second contact surface knot Whether structure information matches.
Optionally, described to be believed according to the first structure feature in the picture control methods that the application first aspect provides The first difference between the second Dynamic Graph number that the first Dynamic Graph number and second structure feature information that breath includes include, Judge whether the first interfacial structure information and the second contact surface structural information match, comprising:
When first difference is greater than the first preset value, the first interfacial structure information and the second contact surface are determined Structural information mismatches;
When first difference is less than or equal to first preset value, include according to the first structure characteristic information The first tag identifier and second structure feature information the second tag identifier for including, judge the first interfacial structure letter Whether breath and the second contact surface structural information match, and first tag identifier and second tag identifier indicate respectively The tag entry chosen in target navigation column.
Optionally, described to be believed according to the first structure feature in the picture control methods that the application first aspect provides The second tag identifier that the first tag identifier and second structure feature information that breath includes include, judges first interface Whether structural information and the second contact surface structural information match, comprising:
In first tag identifier and when the second tag identifier difference, determine the first interfacial structure information and The second contact surface structural information mismatches;
When first tag identifier is identical as second tag identifier, according to the first structure characteristic information packet The 4th tag identifier that the third tag identifier and second structure feature information contained includes, judges first interfacial structure Whether information and the second contact surface structural information match, and the third tag identifier and the 4th tag identifier respectively refer to Show the tag entry chosen in target Tab Shipping Options Page.
Optionally, described to be believed according to the first structure feature in the picture control methods that the application first aspect provides The 4th tag identifier that the third tag identifier and second structure feature information that breath includes include, judges first interface Whether structural information and the second contact surface structural information match, comprising:
In the third tag identifier and when the 4th tag identifier difference, determine the first interfacial structure information and The second contact surface structural information mismatches;
When the third tag identifier is identical as the 4th tag identifier, if the first structure characteristic information includes The first number of buttons and second structure feature information include the second number of buttons between the second difference to be greater than second pre- If value, it is determined that the first interfacial structure information and the second contact surface structural information mismatch, if second difference is small In or equal to second preset value, it is determined that the first interfacial structure information and the second contact surface structural information phase Match.
Optionally, in the picture control methods that the application first aspect provides, the first interface feature information further includes First interface character information, the second contact surface characteristic information further include second contact surface character information;
Wherein, described when the first interfacial structure information and the second contact surface structural information match, determine institute It is identical as the second contact surface screenshot to state the first interface screenshot, comprising:
Match in the first interfacial structure information and the second contact surface structural information, and first interface character When information and the second contact surface character information match, first interface screenshot and the second contact surface screenshot phase are determined Together.
Optionally, in the picture control methods that the application first aspect provides, extraction first interface screenshot First interface feature information, comprising:
First interface screenshot is input in picture feature extraction model and carries out feature extraction, to export described first Interface feature information.
Second aspect, the embodiment of the present invention provide a kind of picture comparison device, comprising:
Module is obtained, for obtaining first interface at the interface presented when the target detection instruction in operation test script Screenshot;
Extraction module, for extracting the first interface feature information of first interface screenshot, first interface feature Information includes the first interfacial structure information;
Judgment module, for being believed according to the second contact surface feature of the first interface feature information and second contact surface screenshot Breath, judge whether first interface screenshot and the second contact surface screenshot are identical, and the second contact surface characteristic information includes the Second interface structural information.
Optionally, in the picture comparison device that the application second aspect provides, the test script corresponds to be tested answer With;Wherein, the second contact surface screenshot is based on receiving during the manual test of the application to be tested for described The screenshot at interface, which instructs, to be generated, and the target detection instruction is generated based on shot operation corresponding with screenshot instruction.
Optionally, in the picture comparison device that the application second aspect provides, the judgment module is specifically used for:
When the first interfacial structure information and the second contact surface structural information match, first interface is determined Screenshot is identical as the second contact surface screenshot;
When the first interfacial structure information and the second contact surface structural information mismatch, first interface is determined Screenshot is different from the second contact surface screenshot.
Optionally, in the picture comparison device that the application second aspect provides, the judgment module is specifically also used to:
It whether include target carousel figure pair according to the first interfacial structure information and the second contact surface structural information The structure feature answered, judges whether the first interfacial structure information and the second contact surface structural information match;
If not, it is determined that the first interfacial structure information and the second contact surface structural information mismatch;
If so, the first Dynamic Graph number and second structure feature that include according to the first structure characteristic information The first difference between the second Dynamic Graph number that information includes, judges the first interfacial structure information and the second contact surface knot Whether structure information matches.
Optionally, in the picture comparison device that the application second aspect provides, the judgment module is specifically also used to:
When first difference is greater than the first preset value, the first interfacial structure information and the second contact surface are determined Structural information mismatches;
When first difference is less than or equal to first preset value, include according to the first structure characteristic information The first tag identifier and second structure feature information the second tag identifier for including, judge the first interfacial structure letter Whether breath and the second contact surface structural information match, and first tag identifier and second tag identifier indicate respectively The tag entry chosen in target navigation column.
Optionally, in the picture comparison device that the application second aspect provides, the judgment module is specifically also used to:
In first tag identifier and when the second tag identifier difference, determine the first interfacial structure information and The second contact surface structural information mismatches;
When first tag identifier is identical as second tag identifier, according to the first structure characteristic information packet The 4th tag identifier that the third tag identifier and second structure feature information contained includes, judges first interfacial structure Whether information and the second contact surface structural information match, and the third tag identifier and the 4th tag identifier respectively refer to Show the tag entry chosen in target Tab Shipping Options Page.
Optionally, in the picture comparison device that the application second aspect provides, the judgment module is specifically also used to:
In the third tag identifier and when the 4th tag identifier difference, determine the first interfacial structure information and The second contact surface structural information mismatches;
When the third tag identifier is identical as the 4th tag identifier, if the first structure characteristic information includes The first number of buttons and second structure feature information include the second number of buttons between the second difference to be greater than second pre- If value, it is determined that the first interfacial structure information and the second contact surface structural information mismatch, if second difference is small In or equal to second preset value, it is determined that the first interfacial structure information and the second contact surface structural information phase Match.
Optionally, in the picture comparison device that the application second aspect provides, the first interface feature information further includes First interface character information, the second contact surface characteristic information further include second contact surface character information;
Wherein, the judgment module, is specifically also used to:
Match in the first interfacial structure information and the second contact surface structural information, and first interface character When information and the second contact surface character information match, first interface screenshot and the second contact surface screenshot phase are determined Together.
Optionally, in the picture comparison device that the application second aspect provides, the extraction module is specifically used for:
First interface screenshot is input in picture feature extraction model and carries out feature extraction, to export described first Interface feature information.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed It manages device and executes following operation:
Obtain the first interface screenshot at the interface presented when the target detection instruction in operation test script;
The first interface feature information of first interface screenshot is extracted, the first interface feature information includes the first boundary Face structural information;
According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, described first is judged Whether interface screenshot and the second contact surface screenshot are identical, and the second contact surface characteristic information includes second contact surface structural information.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium Matter stores one or more programs, one or more of programs when the electronic equipment for being included multiple application programs executes, So that the electronic equipment executes following operation:
Obtain the first interface screenshot at the interface presented when the target detection instruction in operation test script;
The first interface feature information of first interface screenshot is extracted, the first interface feature information includes the first boundary Face structural information;
According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, described first is judged Whether interface screenshot and the second contact surface screenshot are identical, and the second contact surface characteristic information includes second contact surface structural information.
At least one above-mentioned technical solution used in the embodiment of the present invention can reach it is following the utility model has the advantages that
The embodiment of the present invention can instruct during running test script according to the nominative testing in test script I.e. target detection instructs, and the interface presented when operational objective is tested and instructed carries out screenshot, and can react survey for what is be truncated to Training should have before the first interface screenshot of operation progress compared with pre-stored second contact surface screenshot, with specific reference to first The first interface feature information including the first interfacial structure information of interface screenshot is with second contact surface screenshot including second contact surface Whether the second contact surface characteristic information of structural information is identical to determine two interface screenshots.In this way, passing through two interface screenshots point Not corresponding interface feature information judges whether two interface screenshots are identical, especially fully considers that two interface screenshots are right respectively The structure feature information answered sufficiently is compared two respective structure compositions of interface screenshot, with can be accurately and securely Whether ground judges two pictures identical, to promote the efficiency of picture comparison.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes a part of the invention, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow diagram of picture control methods provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another picture control methods provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of picture comparison device provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Automatic test course is applied for background technology part statement, before application automatic test, it is necessary first to Tester carries out test one time with the correct operation process that a terminal device treats test application manually, and in the pass of process Key node carries out screenshotss preservation.Automatic test script can be generated after tester completes test according to correct operation process, The automatic test script that generation then can be used later is treated test application on more different terminal devices and is carried out respectively Automatic test.
In addition, needing during being carried out on more different terminal devices using automatic test in above-mentioned each pass Key node carries out same screenshotss preservation, and the picture that by picture that screenshotss obtain and manual operation when intercepts carries out automation pair Than the purpose of comparison is confirmation terminal device when executing using automatic test, if according to the corresponding survey of test script Examination process is correctly operated, that is, in the node for going to setting, by cutting with what is obtained during manual test Figure compares, current using the whether correct of automatic test execution to confirm.
It is compared completely and similarity comparison currently, existing picture correlation technique is divided into pixel.Wherein, pixel compares completely Mode can only realize although judging that whether identical picture versus speed be fast, accuracy is higher under equal resolution Image content situation of change comparison;And the mode of similarity comparison, it is compared, is had certain by extracting picture feature Versatility, but in the pixel difference of two pictures is larger, image content can dynamically change situation, similarity comparison The effect is unsatisfactory.
As it can be seen that above-mentioned picture correlation technique can not solve at all, photo resolution differs larger, image content can dynamic change In the case of change, the problem of picture comparing result inaccuracy.Therefore, it is necessary to pictures through the embodiment of the present invention to compare scheme, with It realizes picture comparison accurately and securely, the accuracy of the whether identical judging result of two pictures is improved, to improve picture The efficiency of comparison.
The technical solution provided below in conjunction with attached drawing, each embodiment that the present invention will be described in detail.
Fig. 1 is a kind of flow diagram of picture control methods provided in an embodiment of the present invention.
Shown in Figure 1, a kind of picture control methods provided in an embodiment of the present invention is executed, this method by terminal device It may particularly include:
Step S101: the first interface for obtaining the interface presented when the target detection instruction in operation test script is cut Figure.
Step S103: extracting the first interface feature information of the first interface screenshot, and the first interface feature information includes first Interfacial structure information.
Step S105: according to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, judge Whether one interface screenshot and second contact surface screenshot are identical, and second contact surface characteristic information includes second contact surface structural information.
The embodiment of the present invention can be according to specified in test script during terminal device runs test script Test instruction is target detection instruction, and the interface presented when operational objective is tested and instructed carries out screenshot, and the energy that will be truncated to Enough reaction test scripts currently run the first interface screenshot of progress and pre-stored second contact surface screenshot compares, specifically It can be according to the first interface feature information and second contact surface screenshot including the first interfacial structure information of the first interface screenshot Second contact surface characteristic information including second contact surface structural information, to determine whether two interface screenshots are identical.In this way, passing through two The corresponding interface feature information of interface screenshot is opened to judge whether two interface screenshots are identical, especially fully consider Liang Zhangjie Screenshot corresponding structure feature information in face is sufficiently compared two respective structure compositions of interface screenshot, can be with Whether identical two pictures are accurately and securely judged, to promote the efficiency of picture comparison.
Optionally, in embodiments of the present invention, it is contemplated that when comparing two interface screenshots, can be cut according to interface The interfacial structure information that the interface feature information of figure includes compares, and being similar to the mankind can be automatically picture when comparing picture It is whether identical by the shared content in two pictures of comparison after being divided into several modules, to judge whether two kinds of pictures are identical.Such as This, without considering the resolution problem and content dynamic change problem of two interface screenshots, that is to say, that the first interface screenshot and The content that second contact surface screenshot can have different resolution ratio and the first interface screenshot and second contact surface screenshot can dynamic It changes, will not influence the accuracy of the result of picture comparison scheme in the embodiment of the present invention.As it can be seen that between picture Differences in resolution is larger, image content dynamically changed application scenarios, the picture of the embodiment of the present invention can compare scheme As a result accuracy rate is obviously improved.
Optionally, in the picture control methods of the embodiment of the present invention, test script corresponds to application to be tested;Wherein, Second interface screenshot is generated based on the screenshot instruction for interface received during the manual test of application to be tested, target Test instruction is generated based on shot operation corresponding with screenshot instruction.
It is appreciated that the picture control methods of the embodiment of the present invention, can be applied to using automatic test field, with During test application progress manual test is treated according to correct testing process in family, it can be referred to according to the screenshot that user inputs The acquisition for carrying out second contact surface screenshot is enabled, and automatically generates the test for the application to be tested after the completion of manual test process Script, then the target detection instruction for including in the test script of application to be tested are corresponded to based on screenshot instruction during manual test Shot operation generate.In this way, during carrying out according to test script using automatic test, can sequentially generate and the The one-to-one first interface screenshot of second interface screenshot, thus whether identical according to the first interface screenshot and second contact surface screenshot Whether comparing result, the automatic testing process that test application is treated in confirmation execute correct, that is to say, that may be implemented to correspond to The monitoring whether correctly carried out with automatic testing process, to help to promote the efficiency for applying automatic test.
Optionally, for the screenshot at the interface of application to be tested, image content dynamic change can refer to application to be tested It can real-time changed various small pictures on interface.
Optionally, in the picture control methods of the embodiment of the present invention, above-mentioned steps S105 can be executed specifically are as follows:
According to the first interfacial structure information and second contact surface structural information, the first interface screenshot and second contact surface screenshot are judged It is whether identical.
It is appreciated that whether can specifically be matched by the first interfacial structure information of confirmation with second contact surface structural information, Judge whether the first interface screenshot and second contact surface screenshot are identical.In this way, considering each interface screenshot when two interface screenshots of comparison Structural information, and since whether the resolution ratio of picture identical and application to be tested corresponds to target detection instruction Whether interface includes real-time changed small picture, will not change the overall structure composition of interface screenshot, so that of the invention The picture comparison elder sister of embodiment is efficiently and accurate.
Further, the picture control methods of the embodiment of the present invention may include:
When the first interfacial structure information and second contact surface structural information match, the first interface screenshot and the second boundary are determined Face screenshot is identical;
When the first interfacial structure information and second contact surface structural information mismatch, the first interface screenshot and the second boundary are determined Face screenshot is different.
It is appreciated that illustrating the boundary that manual test process obtains when the interfacial structure information matches of two interface screenshots The interface screenshot obtained in face screenshot and automatic test course is directed to the same test process step pair of application to be tested The interface answered, it may be considered that two interface screenshots are identical;And when the interfacial structure information of two interface screenshots mismatches, it says The interface screenshot obtained in the interface screenshot and automatic test course that bright manual test process obtains is directed to be tested answer The corresponding interface of different testing process steps, it may be considered that two interface screenshots are different.
Optionally, in the picture control methods of the embodiment of the present invention, the first interfacial structure of above-mentioned first interface screenshot is believed Breath may include the corresponding structure feature of target carousel figure, i.e. the first interface with the second contact surface structural information of second contact surface screenshot The structure feature of the corresponding same carousel figure of testing process node for setting of screenshot and second contact surface screenshot.Wherein, to Target carousel figure in test application is generally present in the top at terminal device interface, converts a picture every few seconds, such as The broadcastings applications such as Taobao's application, Tencent's video all have carousel figure in the homepage of application.
So, above-mentioned according to the first interfacial structure information and second contact surface structural information, judge the first interface screenshot and Whether second interface screenshot is identical, can specifically execute are as follows:
It whether include the corresponding structure of target carousel figure according to the first interfacial structure information and second contact surface structural information Feature, judges whether the first interfacial structure information and second contact surface structural information match;
If not, it is determined that the first interfacial structure information and second contact surface structural information mismatch;
If so, including with the second structure feature information according to the first Dynamic Graph number that first structure characteristic information includes The second Dynamic Graph number between the first difference, judge the first interfacial structure information and second contact surface structural information whether phase Match.
It is appreciated that in the feelings for corresponding to the interface that target detection instruction is presented and should having recorded broadcast figure of application to be tested Under condition, if only one includes target carousel in the interfacial structure information of one-to-one first interface screenshot and second contact surface screenshot Scheme corresponding structure feature, then illustrate that two interfacial structure information mismatch, i.e., two interface screenshots are not identical, that is to say, that The automatic testing process inaccuracy executed according to test script.And if including in the interfacial structure information of two interface screenshots The corresponding structure feature of target carousel figure can be further in order to ensure the accuracy of picture comparing result, according to the first interface Dynamic Graph number in structural information and second contact surface structural information carries out picture comparison.
It is further alternative, in the picture control methods of the embodiment of the present invention, include according to first structure characteristic information The first difference between the second Dynamic Graph number that first Dynamic Graph number and the second structure feature information include, judges the first interface Whether structural information and second contact surface structural information match, comprising:
When the first difference is greater than the first preset value, do not determine the first interfacial structure information and second contact surface structural information not Match;
When the first difference is less than or equal to the first preset value, the first label mark for including according to first structure characteristic information Know the second tag identifier for including with the second structure feature information, judges the first interfacial structure information and second contact surface structural information Whether match, the first tag identifier and the second tag identifier indicate respectively the tag entry chosen in target navigation column.
It is appreciated that in the feelings for corresponding to the interface that target detection instruction is presented and should having Dynamic Graph of application to be tested Under condition, if the corresponding Dynamic Graph number of the interfacial structure information of one-to-one first interface screenshot and second contact surface screenshot Centre difference is larger, i.e. the first difference between two Dynamic Graph numbers is greater than the first preset value, such as difference half, then illustrates two A interfacial structure information mismatches, i.e., two interface screenshots are not identical, that is to say, that surveys according to the automation that test script executes Try process inaccuracy.And if the corresponding Dynamic Graph number of interfacial structure information of two interface screenshots is not much different, in order to Ensure the accuracy of picture comparing result, can be further, according in the first interfacial structure information and second contact surface structural information Corresponding to target navigation column specified tag identifier carry out picture comparison.
It is further alternative, in the picture control methods of the embodiment of the present invention, include according to first structure characteristic information The second tag identifier that first tag identifier and the second structure feature information include judges the first interfacial structure information and the second boundary Whether face structural information matches, comprising:
In the first tag identifier and the second tag identifier difference, the first interfacial structure information and second contact surface structure are determined Information mismatches;
When the first tag identifier is identical as the second tag identifier, the third label that includes according to first structure characteristic information The 4th tag identifier that mark and the second structure feature information include judges the first interfacial structure information and second contact surface structure letter Whether breath matches, and third tag identifier and the 4th tag identifier indicate respectively the tag entry chosen in target Tab Shipping Options Page.
It is appreciated that in the feelings for corresponding to the interface that target detection instruction is presented and should having navigation bar of application to be tested Under condition, if the interfacial structure information of one-to-one first interface screenshot and second contact surface screenshot is corresponding in target Indicate that the tag identifier of selected tag entry is different in navigation bar, such as the bottom navigation bar of Taobao's application, a mark Label mark instruction chooses most right tag entry, the instruction of another tag identifier to choose most left label, then illustrates two interface knots Structure information mismatch, i.e., two interface screenshots are not identical, that is to say, that according to test script execute automatic testing process not Accurately.And if the interfacial structure information of two interface screenshots is corresponding for indicating selected mark in target navigation column The tag identifier for signing item is identical, can be further in order to ensure the accuracy of picture comparing result, is believed according to the first interfacial structure The specified tag identifier corresponding to target Tab Shipping Options Page in breath and second contact surface structural information carries out picture comparison.
It is further alternative, in the picture control methods of the embodiment of the present invention, include according to first structure characteristic information The 4th tag identifier that third tag identifier and the second structure feature information include judges the first interfacial structure information and the second boundary Whether face structural information matches, comprising:
In third tag identifier and the 4th tag identifier difference, the first interfacial structure information and second contact surface structure are determined Information mismatches;
When third tag identifier is identical as the 4th tag identifier, if the first button that first structure characteristic information includes The second difference between the second number of buttons that several and the second structure feature information includes is greater than the second preset value, it is determined that the first boundary Face structural information and second contact surface structural information mismatch, if the second difference is less than or equal to the second preset value, it is determined that first Interfacial structure information and second contact surface structural information match.
It is appreciated that the interface for corresponding to target detection instruction presentation in application to be tested should have Tab Shipping Options Page In the case where, it is used for if the interfacial structure information of one-to-one first interface screenshot and second contact surface screenshot is corresponding It indicates that the tag identifier of selected tag entry is different in target Tab Shipping Options Page, then illustrates that two interfacial structure information mismatch, I.e. two interface screenshots are not identical, that is to say, that the automatic testing process inaccuracy executed according to test script.And if two The corresponding label mark in the selected tag entry of target Tab Shipping Options Page instruction of the interfacial structure information of interface screenshot It is sensible same, can be further in order to ensure the accuracy of picture comparing result, according to the first interfacial structure information and second contact surface Number of buttons in structural information carries out picture comparison.
It is to be further understood that the interface for corresponding to target detection instruction presentation in application to be tested should have button In the case where, if the corresponding button of the interfacial structure information of one-to-one first interface screenshot and second contact surface screenshot The intermediate difference of number is larger, i.e. the second difference between two number of buttons is greater than the second preset value, such as difference half, then illustrates two A interfacial structure information mismatches, i.e., two interface screenshots are not identical, that is to say, that surveys according to the automation that test script executes Try process inaccuracy.And if the corresponding number of buttons of interfacial structure information of two interface screenshots is not much different, and illustrates Two interfacial structure information matches, i.e. two interface screenshots are identical, that is to say, that the automatic test executed according to test script Process is accurate.
It should be noted that the interfacial structure information in the embodiment of the present invention includes but is not limited to above content, Ke Yigen It is determined according to the interface concrete condition of application to be tested, so that the picture comparison scheme of the embodiment of the present invention is suitable for difference In the automatic test course of application to be tested.In addition, above-mentioned preset value, can be configured according to actual test demand.
Further alternative, in the picture control methods of the embodiment of the present invention, the first interface feature information further includes first Interface character information, second contact surface characteristic information further include second contact surface character information;
Wherein, when the first interfacial structure information and second contact surface structural information match, determine the first interface screenshot with Second contact surface screenshot is identical, comprising:
Match in the first interfacial structure information and second contact surface structural information, and the first interface character information and the second boundary When face character information matches, determine that the first interface screenshot is identical as second contact surface screenshot.
It is appreciated that in the picture control methods of the embodiment of the present invention, in addition to being carried out according to the structure feature of interface screenshot Comparison, the character feature that can be combined with interface screenshot compares, specifically in the interfacial structure information of two interface screenshots and In the matched situation of interface character information, determine that two interface screenshots are identical, to be further ensured that the standard of picture comparing result True property.
Optionally, the interface character information of interface screenshot may include text information, digital information etc..
Optionally, the interface character information in two interface screenshots is identical or difference degree within the allowable range the case where Under, it can determine that the interface character information of two interface screenshots matches;Specific judgment criteria, can be according to actual test Demand adaptability determines.
Optionally, in the picture control methods of the embodiment of the present invention, above-mentioned steps S103 can specifically include the following contents:
First interface screenshot is input in picture feature extraction model and carries out feature extraction, to export the first interface feature Information.
It is appreciated that the picture control methods of the embodiment of the present invention, can use AI (Artificial Intelligence) artificial intelligence technology realizes the extraction to the characteristic information of picture, i.e., extracts mould by training picture feature Type carries out feature extraction.
It should be noted that first obtaining training when carrying out the training of picture feature extraction model, it can obtain different Resolution ratio, image content can dynamic change a large amount of picture samples, and picture sample can be demarcated, that is, to picture Sample carries out the calibration of characteristic information, to indicate the characteristic information of each picture sample.Then, these training samples are based on, it can To determine the training set verifying collection of model training.Optionally, the sample size of training set and verifying collection can be deployed flexibly, example Such as, 65% training sample is as training set, for training picture feature to extract model, and the training sample conduct of residue 35% Whether the output of verifying collection, verifying picture Feature Selection Model meets the requirements.
Optionally, the first interface that model is used to extract the first interface screenshot is extracted in the picture feature of the embodiment of the present invention In the case where structural information, it may include realizing picture knot for carrying out deep learning target detection that picture feature, which extracts model, YOLO (You Only Look Once) model of structure feature extraction;Model is extracted in the picture feature of the embodiment of the present invention to be used for In the case where the first interface character information for extracting the first interface screenshot, it may include for carrying out figure that picture feature, which extracts model, CTPN (the Detecting Text in Natural Image with Connectionist Text that piece character feature extracts Proposal Network, the text detection based on connection text candidates frame network) model, realize natural scene text detection, The text information position in natural scene to be detected.Wherein, YOLO model, CTPN model are all based on CNN The deep learning model of (Convolutional Neural Networks, convolutional neural networks).
In addition, it is optional, in other embodiments of the invention, OCR (Optical Character can also be used Recognition) optical character recognition technology carries out the extraction of character feature to picture.
It should be noted that for the second contact surface characteristic information of second contact surface screenshot, terminal device can receive in advance Second contact surface screenshot, and before being compared with the first interface screenshot, model is extracted using above-mentioned picture feature and carries out the second boundary The extraction of region feature information can also be received directly and extract the second contact surface feature letter that model extraction is completed through above-mentioned picture feature Breath.
Below with reference to Fig. 2, by taking application to be tested is Taobao's application as an example, to the picture of the embodiment of the present invention compare scheme into Row illustrates, specifically, whether Liang Zhang Taobao can be compared identical using the screenshot of home interface, comprising the following steps:
Step S201: determine that Liang Zhang Taobao applies the screenshot of home interface, the first interface screenshot and second contact surface screenshot.
Wherein, the first interface screenshot and second contact surface screenshot can be cut by two different terminal devices of resolution ratio Screen obtains.
Step S202: the structure feature information of the first interface screenshot and second contact surface screenshot, including carousel figure, navigation are extracted The corresponding structure feature such as column (or status bar), common control (such as search column, button etc.), Dynamic Graph.
Optionally, structure feature information is extracted using AI picture search technology, YOLO model mainly can be used.
Step S203: the image information features, including text, number etc. of the first interface screenshot and second contact surface screenshot are extracted Content.
Optionally, using AI text extraction techniques, CTPN model mainly can be used.
Step S204: whether the structure feature information for judging the first interface screenshot and second contact surface screenshot includes carousel figure Corresponding structure feature judges whether there is carousel figure in the first interface screenshot and second contact surface screenshot, if so, executing step Otherwise S205 determines that two interface screenshots are not identical.
Step S205: judging whether the Dynamic Graph number for including in two structure feature informations difference is greater than 50%, if so, Step S206 is executed, otherwise determines that two interface screenshots are not identical.
Step S206: whether the tag entry for judging that two structure feature information instructions are chosen in bottom navigation bar is identical, if It is to execute step S207, otherwise determines that two interface screenshots are not identical.
Step S207: judging whether the number shown in the shopping cart icon of two image information features instruction is consistent, if It is to execute step S208, otherwise determines that two interface screenshots are not identical or determine that two interface screenshots have minor change.
Step S208: whether the tag entry for judging that two structure feature information instructions are chosen at Tab pages is identical, if so, holding Otherwise row step S209 determines that two interface screenshots are not identical.
Step S209: judging whether the number of buttons for including in two structure feature informations difference is greater than 50%, if so, holding Otherwise row step S210 determines that two interface screenshots are not identical.
Step S210: determine that the first interface screenshot is identical with second contact surface screenshot.
From the foregoing, it will be observed that when needing to obtain current automatic test Taobao APP homepage the first interface screenshot, and obtain survey The second contact surface screenshot of homepage when examination personnel's manual test Taobao APP, and then judge whether two screenshots are identical interface.By There are carousel figure and dynamic change content in Taobao's APP homepage, so very big for having in the screenshotss of Taobao APP homepage twice Difference, if very maximum probability can be determined as different interfaces, and pass through above-mentioned a series of structure using traditional way of contrast Characteristic information, image information features judgement can determine that two interface screenshots are identical, in the case where having variation inside, if structure Do not change, is still same interface.As it can be seen that picture comparing result is more accurate, reliable.
Fig. 3 is a kind of structural schematic diagram of picture comparison device provided in an embodiment of the present invention.
Shown in Figure 3, which may particularly include: module 301, extraction module 303 and judgment module 305 are obtained, In:
Module 301 is obtained, for obtaining the first of the interface presented when the target detection instruction in operation test script Interface screenshot;
Extraction module 303, for extracting the first interface feature information of the first interface screenshot, the first interface feature packet Include the first interfacial structure information;
Judgment module 305, for the second contact surface characteristic information according to the first interface feature information and second contact surface screenshot, Judge whether the first interface screenshot and second contact surface screenshot are identical, and second contact surface characteristic information includes second contact surface structural information.
Preferably, picture provided in an embodiment of the present invention compares device, and test script corresponds to application to be tested;
Wherein, second contact surface screenshot is based on the cutting for interface received during the manual test of application to be tested Figure instruction generates, and target detection instruction is generated based on shot operation corresponding with screenshot instruction.
Preferably, picture provided in an embodiment of the present invention compares device, and above-mentioned judgment module 305 is specifically used for:
When the first interfacial structure information and second contact surface structural information match, the first interface screenshot and the second boundary are determined Face screenshot is identical;
When the first interfacial structure information and second contact surface structural information mismatch, the first interface screenshot and the second boundary are determined Face screenshot is different.
Preferably, picture provided in an embodiment of the present invention compares device, and above-mentioned judgment module 305 is specifically also used to:
It whether include the corresponding structure of target carousel figure according to the first interfacial structure information and second contact surface structural information Feature, judges whether the first interfacial structure information and second contact surface structural information match;
If not, it is determined that the first interfacial structure information and second contact surface structural information mismatch;
If so, including with the second structure feature information according to the first Dynamic Graph number that first structure characteristic information includes The second Dynamic Graph number between the first difference, judge the first interfacial structure information and second contact surface structural information whether phase Match.
Preferably, picture provided in an embodiment of the present invention compares device, and above-mentioned judgment module 305 is specifically also used to:
When the first difference is greater than the first preset value, do not determine the first interfacial structure information and second contact surface structural information not Match;
When the first difference is less than or equal to the first preset value, the first label mark for including according to first structure characteristic information Know the second tag identifier for including with the second structure feature information, judges the first interfacial structure information and second contact surface structural information Whether match, the first tag identifier and the second tag identifier indicate respectively the tag entry chosen in target navigation column.
Preferably, picture provided in an embodiment of the present invention compares device, and above-mentioned judgment module 305 is specifically also used to:
In the first tag identifier and the second tag identifier difference, the first interfacial structure information and second contact surface structure are determined Information mismatches;
When the first tag identifier is identical as the second tag identifier, the third label that includes according to first structure characteristic information The 4th tag identifier that mark and the second structure feature information include judges the first interfacial structure information and second contact surface structure letter Whether breath matches, and third tag identifier and the 4th tag identifier indicate respectively the tag entry chosen in target Tab Shipping Options Page.
Preferably, picture provided in an embodiment of the present invention compares device, and above-mentioned judgment module 305 is specifically also used to:
In third tag identifier and the 4th tag identifier difference, the first interfacial structure information and second contact surface structure are determined Information mismatches;
When third tag identifier is identical as the 4th tag identifier, if the first button that first structure characteristic information includes The second difference between the second number of buttons that several and the second structure feature information includes is greater than the second preset value, it is determined that the first boundary Face structural information and second contact surface structural information mismatch, if the second difference is less than or equal to the second preset value, it is determined that first Interfacial structure information and second contact surface structural information match.
Optionally, picture provided in an embodiment of the present invention compares device, and the first interface feature information further includes the first interface Character information, second contact surface characteristic information further include second contact surface character information;
Wherein, above-mentioned judgment module 305, is specifically also used to:
Match in the first interfacial structure information and second contact surface structural information, and the first interface character information and the second boundary When face character information matches, determine that the first interface screenshot is identical as second contact surface screenshot.
Optionally, picture provided in an embodiment of the present invention compares device, and said extracted module 303 is specifically used for:
First interface screenshot is input in picture feature extraction model and carries out feature extraction, to export the first interface feature Information.
As it can be seen that the embodiment of the present invention can be according to the nominative testing in test script during running test script Instruction is target detection instruction, and the interface presented when operational objective is tested and instructed carries out screenshot, and can be anti-by what is be truncated to Answer that test script currently runs the first interface screenshot of progress and pre-stored second contact surface screenshot compares, with specific reference to The first interface feature information including the first interfacial structure information of first interface screenshot is with second contact surface screenshot including second Whether the second contact surface characteristic information of interfacial structure information is identical to determine two interface screenshots.In this way, being cut by two interfaces Corresponding interface feature information is schemed to judge whether two interface screenshots are identical, especially fully considers two interface screenshots point Not corresponding structure feature information is sufficiently compared two respective structure compositions of interface screenshot, with can it is accurate and Whether identical two pictures are reliably judged, to promote the efficiency of picture comparison.
In addition, for above-mentioned apparatus embodiment, since it is substantially similar to method implementation, so description Fairly simple, related place illustrates referring to the part of method implementation.Moreover, it should be noted that of the invention In all parts of device, logical partitioning is carried out to component therein according to the function that it to be realized, still, the present invention is not It is limited to this, can according to need and all parts are repartitioned or are combined.
The hardware structural diagram of Fig. 4 a kind of electronic equipment of each embodiment to realize the present invention.
Referring to fig. 4, which includes but is not limited to: radio frequency unit 401, network module 402, audio output list First 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, the components such as processor 410 and power supply 411.It will be understood by those skilled in the art that electronic equipment 400 shown in Fig. 4 Structure does not constitute the restriction to electronic equipment, and electronic equipment may include than illustrating more or fewer components, or combination Certain components or different component layouts.In embodiments of the present invention, electronic equipment 400 includes but is not limited to mobile phone, plate Computer, laptop, palm PC, car-mounted terminal, wearable device and pedometer etc..
Wherein, processor 410, for executing following procedure:
Obtain the first interface screenshot at the interface presented when the target detection instruction in operation test script;
The first interface feature information of the first interface screenshot is extracted, the first interface feature information is believed including the first interfacial structure Breath;
According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, the first interface screenshot is judged Whether identical as second contact surface screenshot, second contact surface characteristic information includes second contact surface structural information.
The embodiment of the present invention can instruct during running test script according to the nominative testing in test script I.e. target detection instructs, and the interface presented when operational objective is tested and instructed carries out screenshot, and can react survey for what is be truncated to Training should have before the first interface screenshot of operation progress compared with pre-stored second contact surface screenshot, with specific reference to first The first interface feature information including the first interfacial structure information of interface screenshot is with second contact surface screenshot including second contact surface Whether the second contact surface characteristic information of structural information is identical to determine two interface screenshots.In this way, passing through two interface screenshots point Not corresponding interface feature information judges whether two interface screenshots are identical, especially fully considers that two interface screenshots are right respectively The structure feature information answered sufficiently is compared two respective structure compositions of interface screenshot, with can be accurately and securely Whether ground judges two pictures identical, to promote the efficiency of picture comparison.
It should be understood that the embodiment of the present invention in, radio frequency unit 401 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 410 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 401 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 401 can also by wireless communication system and network and other set Standby communication.
Electronic equipment 400 provides wireless broadband internet by network module 402 for user and accesses, and such as helps user It sends and receive e-mail, browse webpage and access streaming video etc..
Audio output unit 403 can be received by radio frequency unit 401 or network module 402 or in memory 409 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 403 can also provide and electricity The relevant audio output of specific function that sub- equipment 400 executes is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 403 includes loudspeaker, buzzer and receiver etc..
Input unit 404 is for receiving audio or video signal.Input unit 404 may include graphics processor (Graphics Processing Unit, GPU) 4041 and microphone 4042, graphics processor 4041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 406.Through graphics processor 4041, treated that picture frame can be deposited Storage is sent in memory 409 (or other storage mediums) or via radio frequency unit 401 or network module 402.Mike Wind 4042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output that mobile communication base station can be sent to via radio frequency unit 401 is converted in the case where telephone calling model.
Electronic equipment 400 further includes at least one sensor 405, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 4061, and proximity sensor can close when electronic equipment 400 is moved in one's ear Display panel 4061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify electronic equipment posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 405 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared sensor etc. are spent, details are not described herein.
Display unit 406 is for showing information input by user or being supplied to the information of user.Display unit 406 can wrap Display panel 4061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 4061.
User input unit 407 can be used for receiving the number or character information of input, and generate the use with electronic equipment Family setting and the related key signals input of function control.Specifically, user input unit 407 include touch panel 4071 and Other input equipments 4072.Touch panel 4071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 4071 or in touch panel 4071 Neighbouring operation).Touch panel 4071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 410, receiving area It manages the order that device 410 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Seed type realizes touch panel 4071.In addition to touch panel 4071, user input unit 407 can also include other input equipments 4072.Specifically, other input equipments 4072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 4071 can be covered on display panel 4061, when touch panel 4071 is detected at it On or near touch operation after, send processor 410 to determine the type of touch event, be followed by subsequent processing device 410 according to touching The type for touching event provides corresponding visual output on display panel 4061.Although in Fig. 4, touch panel 4071 and display Panel 4061 is the function that outputs and inputs of realizing electronic equipment as two independent components, but in some embodiments In, can be integrated by touch panel 4071 and display panel 4061 and realize the function that outputs and inputs of electronic equipment, it is specific this Place is without limitation.
Interface unit 408 is the interface that external device (ED) is connect with electronic equipment 400.For example, external device (ED) may include having Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 408 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and By one or more elements that the input received is transferred in electronic equipment 400 or can be used in 400 He of electronic equipment Data are transmitted between external device (ED).
Memory 409 can be used for storing software program and various data.Memory 409 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 409 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 410 is the control centre of electronic equipment, utilizes each of various interfaces and the entire electronic equipment of connection A part by running or execute the software program and/or module that are stored in memory 409, and calls and is stored in storage Data in device 409 execute the various functions and processing data of electronic equipment, to carry out integral monitoring to electronic equipment.Place Managing device 410 may include one or more processing units;Preferably, processor 410 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, User Page and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 410.
Electronic equipment 400 can also include the power supply 411 (such as battery) powered to all parts, it is preferred that power supply 411 Can be logically contiguous by power-supply management system and processor 410, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, electronic equipment 400 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of electronic equipment, including processor 410, and memory 409 is stored in On memory 409 and the computer program that can run on the processor 410, the computer program are executed by processor 410 Each process of the above-mentioned picture control methods embodiment of Shi Shixian, and identical technical effect can be reached, to avoid repeating, here It repeats no more.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned picture control methods embodiment, and energy when being executed by processor Reach identical technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as only Read memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (10)

1. a kind of picture control methods characterized by comprising
Obtain the first interface screenshot at the interface presented when the target detection instruction in operation test script;
The first interface feature information of first interface screenshot is extracted, the first interface feature information is tied including the first interface Structure information;
According to the second contact surface characteristic information of the first interface feature information and second contact surface screenshot, first interface is judged Whether screenshot and the second contact surface screenshot are identical, and the second contact surface characteristic information includes second contact surface structural information.
2. the method according to claim 1, wherein the test script corresponds to application to be tested;
Wherein, the second contact surface screenshot is based on receiving during the manual test of the application to be tested for described The screenshot at interface, which instructs, to be generated, and the target detection instruction is generated based on shot operation corresponding with screenshot instruction.
3. according to the method described in claim 2, it is characterized in that, described according to the first interface feature information and the second boundary The second contact surface characteristic information of face screenshot judges whether first interface screenshot and the second contact surface screenshot are identical, comprising:
When the first interfacial structure information and the second contact surface structural information match, first interface screenshot is determined It is identical as the second contact surface screenshot;
When the first interfacial structure information and the second contact surface structural information mismatch, first interface screenshot is determined It is different from the second contact surface screenshot.
4. according to the method described in claim 3, it is characterized by further comprising:
It whether include that target carousel figure is corresponding according to the first interfacial structure information and the second contact surface structural information Structure feature, judges whether the first interfacial structure information and the second contact surface structural information match;
If not, it is determined that the first interfacial structure information and the second contact surface structural information mismatch;
If so, the first Dynamic Graph number for including according to the first structure characteristic information and second structure feature information The first difference between the second Dynamic Graph number for including judges the first interfacial structure information and second contact surface structure letter Whether breath matches.
5. according to the method described in claim 4, it is characterized in that, include according to the first structure characteristic information The first difference between the second Dynamic Graph number that one Dynamic Graph number and second structure feature information include judges described Whether one interfacial structure information and the second contact surface structural information match, comprising:
When first difference is greater than the first preset value, the first interfacial structure information and the second contact surface structure are determined Information mismatches;
When first difference is less than or equal to first preset value, include according to the first structure characteristic information the The second tag identifier that one tag identifier and second structure feature information include, judge the first interfacial structure information and Whether the second contact surface structural information matches, and first tag identifier and second tag identifier are indicated respectively in mesh The tag entry chosen in mark navigation bar.
6. according to the method described in claim 5, it is characterized in that, include according to the first structure characteristic information The second tag identifier that one tag identifier and second structure feature information include, judge the first interfacial structure information and Whether the second contact surface structural information matches, comprising:
In first tag identifier and when the second tag identifier difference, the first interfacial structure information and described is determined Second contact surface structural information mismatches;
When first tag identifier is identical as second tag identifier, include according to the first structure characteristic information The 4th tag identifier that third tag identifier and second structure feature information include, judges the first interfacial structure information Whether match with the second contact surface structural information, the third tag identifier and the 4th tag identifier indicate respectively The tag entry chosen in target Tab Shipping Options Page.
7. according to the method described in claim 6, it is characterized in that, include according to the first structure characteristic information The 4th tag identifier that three tag identifiers and second structure feature information include, judge the first interfacial structure information and Whether the second contact surface structural information matches, comprising:
In the third tag identifier and when the 4th tag identifier difference, the first interfacial structure information and described is determined Second contact surface structural information mismatches;
When the third tag identifier is identical as the 4th tag identifier, if the first structure characteristic information include The second difference between the second number of buttons that one number of buttons and second structure feature information include is greater than the second preset value, Then determine that the first interfacial structure information and the second contact surface structural information mismatch, if second difference is less than or waits In second preset value, it is determined that the first interfacial structure information and the second contact surface structural information match.
8. the method according to any one of claim 3~7, which is characterized in that the first interface feature information is also wrapped The first interface character information is included, the second contact surface characteristic information further includes second contact surface character information;
Wherein, described when the first interfacial structure information and the second contact surface structural information match, determine described One interface screenshot is identical as the second contact surface screenshot, comprising:
Match in the first interfacial structure information and the second contact surface structural information, and first interface character information When matching with the second contact surface character information, determine that first interface screenshot is identical as the second contact surface screenshot.
9. method according to any one of claims 1 to 7, which is characterized in that the extraction first interface screenshot The first interface feature information, comprising:
First interface screenshot is input in picture feature extraction model and carries out feature extraction, to export first interface Characteristic information.
10. a kind of picture compares device characterized by comprising
Module is obtained, the first interface for obtaining the interface presented when the target detection instruction in operation test script is cut Figure;
Extraction module, for extracting the first interface feature information of first interface screenshot, the first interface feature information Including the first interfacial structure information;
Judgment module is sentenced for the second contact surface characteristic information according to the first interface feature information and second contact surface screenshot Break first interface screenshot and the second contact surface screenshot it is whether identical, the second contact surface characteristic information includes second contact surface Structural information.
CN201910105033.5A 2019-02-01 2019-02-01 Picture comparison method and device Active CN109885490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910105033.5A CN109885490B (en) 2019-02-01 2019-02-01 Picture comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910105033.5A CN109885490B (en) 2019-02-01 2019-02-01 Picture comparison method and device

Publications (2)

Publication Number Publication Date
CN109885490A true CN109885490A (en) 2019-06-14
CN109885490B CN109885490B (en) 2022-02-15

Family

ID=66927890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910105033.5A Active CN109885490B (en) 2019-02-01 2019-02-01 Picture comparison method and device

Country Status (1)

Country Link
CN (1) CN109885490B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888812A (en) * 2019-11-26 2020-03-17 国核自仪系统工程有限公司 System and method for testing response time of terminal page
CN111209938A (en) * 2019-12-27 2020-05-29 广东轩辕网络科技股份有限公司 Automatic progress monitoring method, electronic equipment and storage medium
CN114782725A (en) * 2022-06-21 2022-07-22 北京尽微致广信息技术有限公司 Method, device and storage medium for comparing user interface image difference

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150347284A1 (en) * 2014-05-27 2015-12-03 International Business Machines Corporation Screenshot validation testing
CN106021095A (en) * 2016-05-06 2016-10-12 北京邮电大学 A push mechanism-based Android application automated testing method
CN108287891A (en) * 2018-01-18 2018-07-17 维沃移动通信有限公司 A kind of application information method for pushing and server
CN108874392A (en) * 2018-05-10 2018-11-23 中国联合网络通信集团有限公司 User's guideline interface generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150347284A1 (en) * 2014-05-27 2015-12-03 International Business Machines Corporation Screenshot validation testing
CN106021095A (en) * 2016-05-06 2016-10-12 北京邮电大学 A push mechanism-based Android application automated testing method
CN108287891A (en) * 2018-01-18 2018-07-17 维沃移动通信有限公司 A kind of application information method for pushing and server
CN108874392A (en) * 2018-05-10 2018-11-23 中国联合网络通信集团有限公司 User's guideline interface generation method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888812A (en) * 2019-11-26 2020-03-17 国核自仪系统工程有限公司 System and method for testing response time of terminal page
CN110888812B (en) * 2019-11-26 2023-11-07 国核自仪系统工程有限公司 Test system and test method for response time of terminal page
CN111209938A (en) * 2019-12-27 2020-05-29 广东轩辕网络科技股份有限公司 Automatic progress monitoring method, electronic equipment and storage medium
CN114782725A (en) * 2022-06-21 2022-07-22 北京尽微致广信息技术有限公司 Method, device and storage medium for comparing user interface image difference
CN114782725B (en) * 2022-06-21 2022-10-04 北京尽微致广信息技术有限公司 Method, device and storage medium for comparing user interface image difference

Also Published As

Publication number Publication date
CN109885490B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN109343759A (en) A kind of control method and terminal of the display of breath screen
CN109815110A (en) A kind of network port management method, device, terminal device and storage medium
CN109947650A (en) Script step process methods, devices and systems
CN109871246A (en) A kind of message display method and terminal device
CN110298304A (en) A kind of skin detecting method and terminal
CN109885490A (en) A kind of picture control methods and device
CN108037885A (en) A kind of operation indicating method and mobile terminal
CN108345474A (en) Startup method, starter and the mobile terminal of application program
CN107908770A (en) A kind of photo searching method and mobile terminal
CN108898040A (en) A kind of recognition methods and mobile terminal
CN109753425A (en) Pop-up processing method and processing device
CN110366027A (en) A kind of video management method and terminal device
CN108541015A (en) A kind of signal strength reminding method and mobile terminal
CN108320148A (en) A kind of resource transfers method and relevant device
CN107948729A (en) Rich Media's processing method, device, storage medium and electronic equipment
CN109495638A (en) A kind of information display method and terminal
CN109726121A (en) A kind of identifying code acquisition methods and terminal device
CN108897482A (en) A kind of information display method and terminal device
CN110069407B (en) Function test method and device for application program
CN108391253A (en) A kind of recommendation method of application program, mobile terminal
CN110287655A (en) A kind of verifying code imput method, device and mobile terminal
CN109726303A (en) A kind of image recommendation method and terminal
CN110162707A (en) A kind of information recommendation method, terminal and computer readable storage medium
CN109947988A (en) A kind of information processing method, device, terminal device and server
CN109088811A (en) A kind of method for sending information and mobile terminal

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210721

Address after: 100016 no.4301, No.52 Jiuxianqiao hospital, Chaoyang District, Beijing

Applicant after: BEIJING TESTIN INFORMATION TECHNOLOGY Co.,Ltd.

Address before: Room 2016, building 2, No.8, Fenghuang Third Road, Zhongxin Guangzhou Knowledge City, Guangzhou 510260, Guangdong Province

Applicant before: GUANGZHOU TESTIN INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant