CN110321257A - Abnormity screen compatibility test method, device, computer equipment and storage medium - Google Patents

Abnormity screen compatibility test method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110321257A
CN110321257A CN201910427385.2A CN201910427385A CN110321257A CN 110321257 A CN110321257 A CN 110321257A CN 201910427385 A CN201910427385 A CN 201910427385A CN 110321257 A CN110321257 A CN 110321257A
Authority
CN
China
Prior art keywords
screen
test
mobile phone
pattern
measured
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910427385.2A
Other languages
Chinese (zh)
Inventor
张起
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910427385.2A priority Critical patent/CN110321257A/en
Publication of CN110321257A publication Critical patent/CN110321257A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

This application involves APP functional test technical fields, more particularly to a kind of abnormity screen compatibility test method, device, computer equipment and storage medium, include: the performance parameter for obtaining software to be tested, test elements in need of test are determined according to performance parameter;The screen parameter for obtaining mobile phone to be measured determines the modular display pattern of test elements;The initial presentation image that test software is shown on mobile phone screen is obtained, the initial presentation pattern of test elements in initial diagram picture is extracted, initial presentation pattern is compared with modular display pattern;Timing node of the test elements when carrying out use state switching is obtained, obtained standard real-time exhibition pattern generates test report after being compared the real-time exhibition pattern shown on standard real-time exhibition pattern and mobile phone screen.The application realizes the automatic test to special-shaped screen mobile phone APP compatibility by effective analysis to APP pictorial element.

Description

Abnormity screen compatibility test method, device, computer equipment and storage medium
Technical field
This application involves APP functional test technical field more particularly to it is a kind of abnormity screen compatibility test method, device, Computer equipment and storage medium.
Background technique
There is Liu Haiping, water droplet screen, punching screen etc. in recent years in the people of continuous promotion with to(for) mobile phone screen demand Abnormity screen, so that screen size is as big as possible, the needs of watching movie to meet people for mobile phone and play game.Abnormity shields general Thought is exactly the not complete rectangle of mobile phone screen, and certain region is dug out in rectangular screen for disposing preposition camera shooting Head.However this design proposes better requirement for the compatibility of APP.
Tester generally requires hand simulation test scene on different devices, testing process when test Length, testing efficiency are low, need to introduce automation tools to realize the compatibility test of this special-shaped screen.However carrying out abnormity When screen test due to the non-screen parts of different abnormity screens mobile phone front to evaluate by exhibit ratio different, it is therefore desirable to constantly adjustment Just it is able to satisfy the demand of compatibility.
Summary of the invention
Based on this, it is necessary to it is inconsistent for special-shaped screen dimensions at present, cause to carry out to need when APP compatibility test artificial The problem of simulation test scene leads to inefficiency, provide it is a kind of abnormity screen compatibility test method, device, computer equipment and Storage medium.
A kind of abnormity screen compatibility test method, includes the following steps:
The performance parameter for obtaining software to be tested determines test elements in need of test according to the performance parameter;
The screen parameter for obtaining mobile phone to be measured determines the modular display figure of the test elements according to the screen parameter Sample;
The initial presentation image that the software to be tested is shown on the screen of the mobile phone to be measured is obtained, is extracted described first The initial presentation pattern for beginning to show test elements described in image, by the initial presentation pattern and the modular display pattern into Row compares, if unanimously, carrying out use state switching to the test elements, otherwise reacquiring the screen of the mobile phone to be measured Parameter;
Timing node of the test elements when carrying out use state switching is obtained, according to the timing node from system The standard real-time exhibition pattern obtained after test elements switching is extracted in log, by the standard real-time exhibition pattern with The real-time exhibition pattern shown on the mobile phone screen generates test report after being compared.
In a wherein possible embodiment, the performance parameter for obtaining software to be tested is joined according to the performance Number determines test elements in need of test, comprising:
The characteristic parameter in the performance parameter of the software to be tested is obtained, is determined according to the characteristic parameter described to be measured Try the test environment initial environment parameter of software;
It is asserted according to operation node of the initial testing environmental parameter to the software to be tested, is asserted described It is sent to background server, receives the background server to the evaluation result of the correctness asserted;
According to the background server to the evaluation result of the correctness asserted to the test environment initial environment Final environmental parameter is obtained after parameters revision;
According to the final environmental parameter, the test elements that need to be tested are obtained.
In a wherein possible embodiment, the screen parameter for obtaining mobile phone to be measured, according to the screen parameter Determine the modular display pattern of the test elements, comprising:
Electric signal is sent in the screen of the mobile phone to be measured, obtains sense of the screen of the mobile phone to be measured to the electric signal Ying Dian;
Using the vertex in the screen lower left corner of the mobile phone to be measured as coordinate origin, rectangular coordinate system is established, is obtained apart from institute The coordinate (x, y) for stating coordinate linear distance farthest point, according to range formula L=(x2+y2)1/2, obtain the size of screen diagonal;
According to the size of the screen diagonal of the mobile phone to be measured, corresponding normal pictures are extracted from database, are obtained Normal pictures bandwagon effect figure on the screen of the mobile phone to be measured is taken, by the bandwagon effect figure and the normal pictures It is compared, obtains discrepancy, the screen lack part of the mobile phone to be measured is determined according to the discrepancy;
According to the screen size and screen lack part of the mobile phone to be measured, pre- display diagram sample is carried out meeting mobile phone to be measured Screen size and screen lack part editor after obtain the modular display pattern.
It is described to obtain the software to be tested in the Mobile phone screen of the mobile phone to be measured in a wherein possible embodiment The initial presentation image shown on curtain extracts the initial presentation pattern of test elements described in the initial presentation image, by institute It states initial presentation pattern to be compared with the modular display pattern, if unanimously, carrying out use state to the test elements Switching, otherwise reacquires the screen parameter of the mobile phone to be measured, comprising:
The interception task for intercepting the initial presentation image is determined according to the performance parameter of the software to be tested, when described After interception task is triggered, the image on the mobile phone screen is intercepted as the initial presentation image;
Test elements identification is carried out to the initial presentation image using preset image recognition model, is obtained described initial Show the initial presentation pattern of test elements described in image;
The initial presentation pattern is carried out pixel value with the standard pattern to compare, if margin of image element dissimilarity number after comparing Amount be greater than preset error threshold, then need the screen parameter for reacquiring the mobile phone to be measured, otherwise to the test elements into The switching of row use state.
In a wherein possible embodiment, it is described obtain the test elements when carrying out use state switching when Intermediate node, according to the timing node from extracting the standard real-time exhibition obtained after test elements switching in system log Pattern is generated after being compared the real-time exhibition pattern shown on the standard real-time exhibition pattern and the mobile phone screen and is surveyed Examination report, comprising:
Preset test elements switching task is obtained, includes switching task execution in the test elements switching task Timing node execute test elements switching task when the timing node of the switching task execution arrives, switch institute State the test elements on mobile phone screen;
The corresponding system event of the timing node is extracted from the system log, is obtained corresponding to the system event Changed test elements;
Standard real-time exhibition pattern is obtained after collecting all changed test elements, by the standard real-time exhibition figure The real-time exhibition pattern shown on sample and the mobile phone screen is compared, and the test elements having differences is obtained, according to described The test elements having differences generate test report.
In a wherein possible embodiment, the size of the screen diagonal according to the mobile phone to be measured, from number According to corresponding normal pictures are extracted in library, normal pictures bandwagon effect figure on the screen of the mobile phone to be measured is obtained, The bandwagon effect figure is compared with the normal pictures, discrepancy is obtained, is determined according to the discrepancy described to be measured The screen lack part of mobile phone, comprising:
Obtain screen shot instruction, the bandwagon effect figure that screen printing is shown;
Displaying pixel in the bandwagon effect figure is done into binary conversion treatment, according to each displaying pixel described The binaryzation matrix of bandwagon effect figure is established in position in bandwagon effect figure, wherein the matrix element of the binaryzation matrix is Binaryzation shows pixel;
According to the size of the screen diagonal of the mobile phone to be measured, corresponding normal pictures are extracted from database, it will Picture pixels point in the normal pictures does binary conversion treatment, according to each picture pixels point in the normal pictures Normal pictures binaryzation matrix is established in position, wherein matrix element is binaryzation picture pixel;
The bandwagon effect figure binaryzation matrix is compared with the normal pictures binaryzation matrix, is obtained inconsistent Element where the element position of bandwagon effect figure binaryzation matrix the mobile phone to be measured is obtained according to the element position Screen lack part.
In a wherein possible embodiment, the preset image recognition model of application is to the initial presentation image Test elements identification is carried out, the initial presentation pattern of test elements described in the initial presentation image is obtained, comprising:
The initial presentation image is replicated to obtain with reference to image is shown, by the initial presentation image segmentation at several initial Image subblock, each described initial pictures sub-block are divided into several and institute with reference to displaying image as test sample, by described The identical reference picture sub-block of initial presentation image is stated, each described reference picture sub-block is as verifying sample;
The test sample is successively entered after ginseng is voted into preset image recognition model and obtains test sample Recognition result;
The verifying sample is successively entered after ginseng is voted into preset image recognition model and is verified sample Recognition result;
The recognition result of the recognition result of the test sample and the verifying sample is compared, if recognition result is complete Portion is consistent, then obtains the initial presentation pattern of test elements in the initial diagram picture, otherwise voted again.
A kind of abnormity screen device for testing compatibility, including following module:
Element chooses module, is set as obtaining the performance parameter of software to be tested, determines needs according to the performance parameter The test elements tested;
Size measuring module is set as obtaining the screen parameter of mobile phone to be measured, determines the survey according to the screen parameter Try the modular display pattern of element;
Show test module, be set as obtaining the software to be tested shown on the screen of the mobile phone to be measured it is initial It shows image, the initial presentation pattern of test elements described in the initial presentation image is extracted, by the initial presentation pattern It is compared with the modular display pattern, if unanimously, carrying out use state switching to the test elements, otherwise obtaining again Take the screen parameter of the mobile phone to be measured;
Test report module is set as obtaining timing node of the test elements when carrying out use state switching, root According to the timing node from the standard real-time exhibition pattern obtained after the test elements switching is extracted in system log, by institute It states after the real-time exhibition pattern shown on standard real-time exhibition pattern and the mobile phone screen is compared and generates test report.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the processor executes above-mentioned abnormity screen compatibility test method The step of.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute above-mentioned abnormity screen compatibility test method.
Compared with current mechanism, the application has the following advantages:
(1) by effective analysis to APP pictorial element, the survey of the automation to special-shaped screen mobile phone APP compatibility is realized Examination;
(2) validity test is carried out to handset size by electric signal method, to accurately know standard pattern in tested hand Displaying style on machine;
(3) by effectively being analyzed test environment parameter, to accurately obtain the type information of test elements;
(4) by compare with standard pattern again after the realtime graphic of cell phone application picture is carried out elemental recognition, thus It simplifies and compares entry, convenient for obtaining the screen parameter of mobile phone;
(5) real-time exhibition image is compared with System Operation Log content, is surveyed so as to avoid using single image Method for testing carries out compatibility test and is formed by error.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the application Limitation.
Fig. 1 is a kind of overall flow figure of the abnormity screen compatibility test method of the application in one embodiment;
Fig. 2 is that the element selection process in a kind of abnormity screen compatibility test method of the application in one embodiment is shown It is intended to;
Fig. 3 is that the size measuring process in a kind of abnormity screen compatibility test method of the application in one embodiment is shown It is intended to;
Fig. 4 is that the displaying test process in a kind of abnormity screen compatibility test method of the application in one embodiment shows It is intended to;
Fig. 5 is that the test report in a kind of abnormity screen compatibility test method of the application in one embodiment generated Journey schematic diagram;
Fig. 6 is a kind of structure chart of the abnormity screen device for testing compatibility of the application in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
Fig. 1 is a kind of overall flow figure of the abnormity screen compatibility test method of the application in one embodiment, such as Fig. 1 It is shown, a kind of abnormity screen compatibility test method, comprising the following steps:
S1, the performance parameter for obtaining software to be tested determine test member in need of test according to the performance parameter Element;
Specifically, the performance parameter of software to be tested mainly includes the system environments of software operation, each picture in software Residence time, image switching the parameters such as response time.
S2, the screen parameter for obtaining mobile phone to be measured, the modular display of the test elements is determined according to the screen parameter Pattern;
Specifically, the screen parameter of mobile phone to be measured is mainly the size and location of the size of screen, screen lack part, screen Curtain size shows that image size is defined when can be to software test, such as the software image shown on 5 cun of screens, if fruit is not Carry out promoted picture quality then on 7 cun of screens show when will appear certain elements on image it is unintelligible can not be differentiated ask Topic.And the size of lack part then determines which element can not be shown on mobile phone screen to be measured on screen, while It can be according to lack part, again to being relocated subject to certain elements.
S3, the initial presentation image that the software to be tested is shown on the screen of the mobile phone to be measured is obtained, extracts institute The initial presentation pattern for stating test elements described in initial presentation image, by the initial presentation pattern and the modular display figure Sample is compared, if unanimously, carrying out use state switching to the test elements, otherwise reacquiring the mobile phone to be measured Screen parameter;
Specifically, obtaining the mode of initial presentation image can be obtained by screenshot, i.e., after starting to be tested, according to The starting time of software to be tested, the timing node of setting interception initial presentation image, when the timing node arrives, interception Image on mobile phone screen.Truncated picture is compared rear available test with the leading element of storage in the database The initial presentation pattern of element.By taking this test elements of mobile phone signal as an example, in " telecommunications letter before carrying out use state switching Number ", and after carrying out use state switching, then mobile phone signal is switched to " movable signal " or is " flight model " i.e. no signal.
S4, obtain the timing node of the test elements when carrying out use state switching, according to the timing node from The standard real-time exhibition pattern obtained after the test elements switching is extracted in system log, by the standard real-time exhibition figure The real-time exhibition pattern shown on sample and the mobile phone screen generates test report after being compared.
Specifically, to software when showing progress compatibility test on abnormity screen, after will record the switching of software different conditions Whether software is in normal operating conditions, if there is a phenomenon where collapses, Caton.For example, certain software is when running flash animation It is possible that Caton phenomenon, then then record this Caton in system log, if passing through the knowledge to mobile phone real-time exhibition image Caton image is not identified, then illustrates that image recognition processes be there are problems that, when image recognition and system log record phase After consistent, correct test report could be generated.
The present embodiment, by effective analysis to APP pictorial element, realize to special-shaped screen mobile phone APP compatibility from Dynamicization test.
Fig. 2 is that the element selection process in a kind of abnormity screen compatibility test method of the application in one embodiment is shown It is intended to, as shown, the performance parameter of the S1, acquisition software to be tested, are surveyed according to performance parameter determination The test elements of examination, comprising:
S11, obtain characteristic parameter in the performance parameter of the software to be tested, determined according to the characteristic parameter described in The test environment initial environment parameter of software to be tested;
Specifically, different software under testing has different performance parameters, although such as wechat and Alipay have barcode scanning The function of payment, but the mode of the scanning recognition of the two is different, therefore there is differences for the performance parameter of this two APP, it is right The test environment parameter answered is also different.
S12, it is asserted according to operation node of the initial testing environmental parameter to the software to be tested, it will be described It asserts and is sent to background server, receive the background server to the evaluation result of the correctness asserted;
Wherein, assert it is programming term, be expressed as some Boolean expressions, programmer believe in a program some is specific The point transition formula evaluation be it is true, can enable and disable at any time assertion verification, thus can in test enabling assert and In deployment, disabling is asserted.Equally, after program puts into operation, end user can reactivate when encountering problems and assert.Such as It is asserted, i.e., is divided the operating status of software according to asserting in the operation postrun state of node.The backstage clothes Business device is asserted described in each there are two types of the judging results of correctness, first is that " √ " is second is that "×", background server judgement Historical data of foundation when being all previous operation of this software.
It is S13, initial to the test environment according to evaluation result of the background server to the correctness asserted Final environmental parameter is obtained after environmental parameter amendment;
Specifically, will assert that the place for mistake occur is modified, then resets and assert.To meet software under testing survey Examination demand.
S14, according to the final environmental parameter, obtain the test elements that need to be tested.
Wherein, the performance different to software is needed to test under different test environment, for example, according to test environment Date switch instances are analyzed when needing to run software, then need to choose the relevant test elements of Time of Day.
The present embodiment, by effectively being analyzed test environment parameter, to accurately obtain the type letter of test elements Breath.
Fig. 3 is that the size measuring process in a kind of abnormity screen compatibility test method of the application in one embodiment is shown It is intended to, as shown, the screen parameter of the S2, acquisition mobile phone to be measured, determine the test elements according to the screen parameter Modular display pattern, comprising:
S21, electric signal is sent in the screen of the mobile phone to be measured, obtain the screen of the mobile phone to be measured to the electric signal Induction point;
Specifically, the electric signal of two kinds of different-wavebands can be used by sending electric signal, then both electric signals are obtained Induction point be overlapped to obtain final electric signal induction point.
S22, using the vertex in the screen lower left corner of the mobile phone to be measured as coordinate origin, establish rectangular coordinate system, obtain away from Coordinate (x, y) from coordinate linear distance farthest point, according to range formula L=(x2+y2)1/2, obtain screen diagonal Size;
Wherein, the size of screen diagonal generally as the size of mobile device mark, i.e., if screen is fillet square Shape then will be defaulted as right angle, then measure diagonal line again at fillet.
S23, the size according to the screen diagonal of the mobile phone to be measured, extract corresponding standard drawing from database Piece obtains normal pictures bandwagon effect figure on the screen of the mobile phone to be measured, by the bandwagon effect figure and the mark Quasi- picture is compared, and obtains discrepancy, the screen lack part of the mobile phone to be measured is determined according to the discrepancy;
Wherein, it is stored with the normal pictures of needles of various sizes in the database, these normal pictures can be according to previous non- It is obtained after progress data acquisition when abnormity screen uses.For example, 5 cun of pictures, 5.5 cun of pictures etc..For these normal pictures The acquisition of bandwagon effect figure can be by the way of screenshotss software screen on the screen of the mobile phone to be measured.
S24, screen size and screen lack part according to the mobile phone to be measured, meet to pre- display diagram sample to be measured The modular display pattern is obtained after the screen size of mobile phone and the editor of screen lack part.
Specifically, can zoom in or out to pre- display diagram sample after determining mobile phone screen size to be measured processing with Meet the needs of mobile phone screen, according to screen lack part to after zooming in or out pre- display diagram sample carry out part cut with Meet special-shaped screen demand.
The present embodiment carries out validity test to handset size by electric signal method, to accurately know that standard pattern exists Displaying style on tested mobile phone.
Fig. 4 is that the displaying test process in a kind of abnormity screen compatibility test method of the application in one embodiment shows It is intended to, as shown, the initial exhibition that the S3, the acquisition software to be tested are shown on the mobile phone screen of the mobile phone to be measured Diagram picture extracts the initial presentation pattern of test elements described in the initial presentation image, by the initial presentation pattern with The modular display pattern is compared, if unanimously, carrying out use state switching to the test elements, otherwise reacquiring The screen parameter of the mobile phone to be measured, comprising:
S31, the interception task for intercepting the initial presentation image is determined according to the performance parameter of the software to be tested, when After the interception task is triggered, the image on the mobile phone screen is intercepted as the initial presentation image;
Specifically, the operation time parameters after extracting software starting in the performance parameter of the test software, according to fortune The timing node of row time parameter setting interception initial presentation image, the figure when timing node arrives on interception mobile phone screen Picture.Mobile phone can also be monitored whether normal operation using heartbeat packet when the timing node arrives, if mobile phone does not have Normal operation then starts BUG fix tool and repairs to mobile phone, if mobile phone normal operation just intercepts initial presentation image.
S32, test elements identification is carried out to the initial presentation image using preset image recognition model, obtained described The initial presentation pattern of test elements described in initial presentation image;
Specifically, algorithm used in preset image recognition model can be Adaboost algorithm, BRIEF algorithm, BRISK algorithm etc..Each pixel in initial presentation image can be traversed when carrying out image recognition to identify, it can also be with subregion Domain identification.
S33, the initial presentation pattern and standard pattern progress pixel value are compared, if value differences after comparing Point quantity is greater than preset error threshold, then needs the screen parameter for reacquiring the mobile phone to be measured, otherwise to the test member Element carries out use state switching.
Wherein, when carrying out pixel value comparison, two pixel matrixes be can establish, one is initial presentation pattern square Battle array, one for standard pattern show matrix, the element of this 2 pixel matrixes is the pixel value of binaryzation, then by this two A pixel matrix carries out being divided into several submatrixs, seeks the characteristic value of each submatrix, extracts submatrix characteristic value not Consistent submatrix reacquires corresponding mobile phone screen to be measured according to position of the submatrix in the displaying pattern matrix Parameter.
The present embodiment, by by the realtime graphic of cell phone application picture carry out after elemental recognition again with standard pattern ratio It is right, compare entry to simplify, convenient for obtaining the screen parameter of mobile phone.
Fig. 5 is that the test report in a kind of abnormity screen compatibility test method of the application in one embodiment generated Journey schematic diagram, as shown, the timing node of the S4, the acquisition test elements when carrying out use state switching, according to The timing node, will be described from the standard real-time exhibition pattern obtained after the test elements switching is extracted in system log The real-time exhibition pattern shown on standard real-time exhibition pattern and the mobile phone screen generates test report after being compared, packet It includes:
S41, preset test elements switching task is obtained, includes switching task in the test elements switching task The timing node of execution executes the test elements switching task, cuts when the timing node of the switching task execution arrives Change the test elements on the mobile phone screen;
Wherein, test elements switching task is obtained according to after the result of all previous manual testing statistics, for example, setting is cut The test elements changed are operator, network communication format etc.;Switch operators are needed in former operator's signal completely described first It can just switch over after being shown on beginning displaying image, rather than just be switched in no signal.
S42, the corresponding system event of the timing node is extracted from the system log, obtain the system event institute Corresponding changed test elements;
Specifically, system event is stored in system log according to timing node.It is corresponding in the timing node System event be change operator, then it is corresponding variation element be mobile phone screen on operator's filtered output figure and operator Text, need to only whether there is filtered output and operator's text is with the presence or absence of inquiring can complete to test.
S43, standard real-time exhibition pattern is obtained after collecting all changed test elements, the standard is opened up in real time The real-time exhibition pattern shown on diagram sample and the mobile phone screen is compared, and obtains the test elements having differences, according to The test elements having differences generate test report.
Specifically, there is Catons in switch operators for mobile phone, then missing fortune can occur in several intermediate nodes Seek this test elements of quotient's title;If page entanglement occurs in mobile phone, can occur such as occurring 2 in some timing node The mobile phone screen image of a operator.Test report is exactly that the test elements for difference occur are carried out to statistics to summarize, in order to skill Art personnel carry out compatibility amendment exploitation for difference.
Real-time exhibition image is compared by the present embodiment with System Operation Log content, so as to avoid using single Image measurement method carries out compatibility test and is formed by error.
In one embodiment, the S23, the size according to the screen diagonal of the mobile phone to be measured, from database Corresponding normal pictures are extracted, normal pictures bandwagon effect figure on the screen of the mobile phone to be measured is obtained, it will be described Bandwagon effect figure is compared with the normal pictures, is obtained discrepancy, is determined the mobile phone to be measured according to the discrepancy Screen lack part, comprising:
S231, screen shot instruction, the bandwagon effect figure that screen printing is shown are obtained;
Specifically, being determined at the time of screen switching when screen shot instruction can be run according to APP, i.e., transported in APP Screen switching is produced when row, then issues screen shot instruction accordingly.
S232, the displaying pixel in the bandwagon effect figure is done into binary conversion treatment, according to each displaying pixel The binaryzation matrix of bandwagon effect figure is established in position in the bandwagon effect figure, wherein the matrix of the binaryzation matrix Element is that binaryzation shows pixel;
Wherein, it can be handled using OpenCV function when binary conversion treatment, specific processing mode is cvThreshold (dst, dst, 230,255, CV_THRESH_BINARY_INV) sets the threshold value of a binaryzation, according to this threshold value pair Pixel on RGB image carries out binary conversion treatment.
S233, the size according to the screen diagonal of the mobile phone to be measured, extract corresponding standard drawing from database Picture pixels point in the normal pictures is done binary conversion treatment by piece, according to each picture pixels point in the standard drawing Normal pictures binaryzation matrix is established in position in piece, wherein matrix element is binaryzation picture pixel;
S234, the bandwagon effect figure binaryzation matrix is compared with the normal pictures binaryzation matrix, is obtained The element position of bandwagon effect figure binaryzation matrix obtains described to be measured according to the element position where inconsistent element The screen lack part of mobile phone.
The present embodiment will show and compare after image and standard picture carry out binary conversion treatment, to accurately obtain abnormity screen The position of screen lack part and size dimension on mobile phone.
In one embodiment the S32, using preset image recognition model the initial presentation image is surveyed Elemental recognition is tried, the initial presentation pattern of test elements described in the initial presentation image is obtained, comprising:
S321, the duplication initial presentation image are obtained with reference to image is shown, by the initial presentation image segmentation at number A initial pictures sub-block, each described initial pictures sub-block are divided into number with reference to displaying image as test sample, by described A reference picture sub-block identical with the initial presentation image, each described reference picture sub-block is as verifying sample;
Wherein it is possible to by initial presentation image segmentation at etc. 9 pieces of sizes, first group is 5 pieces, and second group is 4 pieces, each To guarantee there is at least one test elements in block.
S322, the test sample is successively entered after ginseng is voted into preset image recognition model to obtain test specimens This recognition result;
Wherein, image recognition model uses the either SVM support vector machines mould of the neural network model with voting mechanism Type carries out classification ballot.Classification ballot is common method in machine learning, successively according to the category classifier in disaggregated model It votes the image in test group, it is corresponding to belong to the classifier for the image if some classifier voting results is " 1 " Classification, if having more than 1 classifier voting results be " 1 " if need to vote again.
S323, the verifying sample is successively entered after ginseng is voted into preset image recognition model to be verified sample This recognition result;
S324, the recognition result of the recognition result of the test sample and the verifying sample is compared, if identification As a result all consistent, then the initial presentation pattern of test elements in the initial diagram picture is obtained, is otherwise voted again.
The present embodiment effectively identifies image using image recognition model, thus accurately to initial presentation pattern Classify.
In one embodiment it is proposed that a kind of abnormity screen device for testing compatibility, as shown in fig. 6, including following module:
Element chooses module 51, is set as obtaining the performance parameter of software to be tested, determines need according to the performance parameter The test elements tested;
Size measuring module 52 is set as obtaining the screen parameter of mobile phone to be measured, according to screen parameter determination The modular display pattern of test elements;
Show test module 53, be set as obtaining the software to be tested shows on the screen of the mobile phone to be measured just Begin to show image, the initial presentation pattern of test elements described in the initial presentation image is extracted, by the initial presentation figure Sample is compared with the modular display pattern, if unanimously, carrying out use state switching to the test elements, otherwise again Obtain the screen parameter of the mobile phone to be measured;
Test report module 54 is set as obtaining timing node of the test elements when carrying out use state switching, It, will according to the timing node from the standard real-time exhibition pattern obtained after the test elements switching is extracted in system log The real-time exhibition pattern shown on the standard real-time exhibition pattern and the mobile phone screen generates test report after being compared.
In one embodiment it is proposed that a kind of computer equipment, the computer equipment includes memory and processor, Computer-readable instruction is stored in memory, when computer-readable instruction is executed by processor, so that processor execution is above-mentioned The step of abnormity in each embodiment shields compatibility test method.
In one embodiment it is proposed that a kind of storage medium for being stored with computer-readable instruction, this is computer-readable When instruction is executed by one or more processors, so that one or more processors execute the abnormity in the various embodiments described above The step of shielding compatibility test method.Wherein, the storage medium can be non-volatile memory medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of the technical characteristic in example to be all described, as long as however, lance is not present in the combination of these technical characteristics Shield all should be considered as described in this specification.
The some exemplary embodiments of the application above described embodiment only expresses, wherein describe it is more specific and detailed, But it cannot be understood as the limitations to the application the scope of the patents.It should be pointed out that for the ordinary skill of this field For personnel, without departing from the concept of this application, various modifications and improvements can be made, these belong to the application Protection scope.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of abnormity screen compatibility test method characterized by comprising
The performance parameter for obtaining software to be tested determines test elements in need of test according to the performance parameter;
The screen parameter for obtaining mobile phone to be measured determines the modular display pattern of the test elements according to the screen parameter;
The initial presentation image that the software to be tested is shown on the screen of the mobile phone to be measured is obtained, the initial exhibition is extracted The initial presentation pattern of test elements described in diagram picture compares the initial presentation pattern and the modular display pattern Compared with if unanimously, carrying out use state switching to the test elements, the screen for otherwise reacquiring the mobile phone to be measured is joined Number;
Timing node of the test elements when carrying out use state switching is obtained, according to the timing node from system log In extract the standard real-time exhibition pattern obtained after test elements switching, by the standard real-time exhibition pattern with it is described The real-time exhibition pattern shown on mobile phone screen generates test report after being compared.
2. the method for abnormity screen compatibility test according to claim 1, which is characterized in that described to obtain software to be tested Performance parameter, test elements in need of test are determined according to the performance parameter, comprising:
The characteristic parameter in the performance parameter of the software to be tested is obtained, is determined according to the characteristic parameter described to be tested soft The test environment initial environment parameter of part;
It is asserted according to operation node of the initial testing environmental parameter to the software to be tested, asserts transmission for described To background server, the background server is received to the evaluation result of the correctness asserted;
According to the background server to the evaluation result of the correctness asserted to the test environment initial environment parameter Final environmental parameter is obtained after amendment;
According to the final environmental parameter, the test elements that need to be tested are obtained.
3. the method for abnormity screen compatibility test according to claim 1, which is characterized in that the acquisition mobile phone to be measured Screen parameter determines the modular display pattern of the test elements according to the screen parameter, comprising:
Electric signal is sent in the screen of the mobile phone to be measured, obtains induction of the screen of the mobile phone to be measured to the electric signal Point;
Using the vertex in the screen lower left corner of the mobile phone to be measured as coordinate origin, rectangular coordinate system is established, is obtained apart from the seat The coordinate (x, y) for marking linear distance farthest point, according to range formula L=(x2+y2)1/2, obtain the size of screen diagonal;
According to the size of the screen diagonal of the mobile phone to be measured, corresponding normal pictures are extracted from database, obtain institute Normal pictures bandwagon effect figure on the screen of the mobile phone to be measured is stated, the bandwagon effect figure and the normal pictures are carried out Compare, obtains discrepancy, the screen lack part of the mobile phone to be measured is determined according to the discrepancy;
According to the screen size and screen lack part of the mobile phone to be measured, the screen for meeting mobile phone to be measured is carried out to pre- display diagram sample The modular display pattern is obtained after the editor of curtain size and screen lack part.
4. the method for abnormity screen compatibility test according to claim 1, which is characterized in that the acquisition is described to be tested The initial presentation image that software is shown on the mobile phone screen of the mobile phone to be measured extracts survey described in the initial presentation image The initial presentation pattern for trying element, the initial presentation pattern is compared with the modular display pattern, if unanimously, it is right The test elements carry out use state switching, otherwise reacquire the screen parameter of the mobile phone to be measured, comprising:
The interception task for intercepting the initial presentation image is determined according to the performance parameter of the software to be tested, when the interception After task is triggered, the image on the mobile phone screen is intercepted as the initial presentation image;
Test elements identification is carried out to the initial presentation image using preset image recognition model, obtains the initial presentation The initial presentation pattern of test elements described in image;
The initial presentation pattern is carried out pixel value with the standard pattern to compare, if margin of image element dissimilarity quantity is big after comparing In preset error threshold, then the screen parameter for reacquiring the mobile phone to be measured is needed, otherwise the test elements are made Switched with state.
5. the method for abnormity screen compatibility test according to claim 1, which is characterized in that described to obtain the test member Timing node of the element when carrying out use state switching extracts the test member according to the timing node from system log The standard real-time exhibition pattern obtained after element switching, the reality that will be shown on the standard real-time exhibition pattern and the mobile phone screen When show pattern be compared after generate test report, comprising:
Obtain preset test elements switching task, include in the test elements switching task switch task execution when Intermediate node executes the test elements switching task, switches the hand when the timing node of the switching task execution arrives Test elements on machine screen;
The corresponding system event of the timing node is extracted from the system log, obtains hair corresponding to the system event The test elements for changing;
Obtain standard real-time exhibition pattern after collecting all changed test elements, by the standard real-time exhibition pattern with The real-time exhibition pattern shown on the mobile phone screen is compared, and obtains the test elements having differences, according to the presence The test elements of difference generate test report.
6. according to the method for the abnormity screen compatibility test that claim 3 is stated, which is characterized in that described according to the mobile phone to be measured Screen diagonal size, corresponding normal pictures are extracted from database, obtain the normal pictures described to be measured The bandwagon effect figure is compared by bandwagon effect figure on the screen of mobile phone with the normal pictures, obtains discrepancy, according to The discrepancy determines the screen lack part of the mobile phone to be measured, comprising:
Obtain screen shot instruction, the bandwagon effect figure that screen printing is shown;
Displaying pixel in the bandwagon effect figure is done into binary conversion treatment, according to each displaying pixel in the displaying The binaryzation matrix of bandwagon effect figure is established in position in effect picture, wherein the matrix element of the binaryzation matrix is two-value Change and shows pixel;
According to the size of the screen diagonal of the mobile phone to be measured, corresponding normal pictures are extracted from database, it will be described Picture pixels point in normal pictures does binary conversion treatment, according to position of each picture pixels point in the normal pictures It sets, establishes normal pictures binaryzation matrix, wherein matrix element is binaryzation picture pixel;
The bandwagon effect figure binaryzation matrix is compared with the normal pictures binaryzation matrix, obtains inconsistent member The element position of bandwagon effect figure binaryzation matrix obtains the screen of the mobile phone to be measured according to the element position where plain Lack part.
7. the method for abnormity screen compatibility test according to claim 4, which is characterized in that the preset image of application Identification model carries out test elements identification to the initial presentation image, obtains test elements described in the initial presentation image Initial presentation pattern, comprising:
The initial presentation image is replicated to obtain with reference to image is shown, by the initial presentation image segmentation at several initial pictures The reference displaying image is divided into several and described first by sub-block, each described initial pictures sub-block as test sample Begin to show the identical reference picture sub-block of image, each described reference picture sub-block is as verifying sample;
The test sample is successively entered after ginseng is voted into preset image recognition model and obtains the identification of test sample As a result;
The verifying sample is successively entered to be verified after ginseng is voted into preset image recognition model the identification of sample As a result;
The recognition result of the recognition result of the test sample and the verifying sample is compared, if recognition result whole one It causes, then obtains the initial presentation pattern of test elements in the initial diagram picture, otherwise voted again.
8. a kind of abnormity screen device for testing compatibility, which is characterized in that comprise the following modules:
Element chooses module, is set as obtaining the performance parameter of software to be tested, needs to carry out according to performance parameter determination The test elements of test;
Size measuring module is set as obtaining the screen parameter of mobile phone to be measured, determines the test member according to the screen parameter The modular display pattern of element;
It shows test module, is set as obtaining the initial presentation that the software to be tested is shown on the screen of the mobile phone to be measured Image extracts the initial presentation pattern of test elements described in the initial presentation image, by the initial presentation pattern and institute It states modular display pattern to be compared, if unanimously, carrying out use state switching to the test elements, otherwise reacquiring institute State the screen parameter of mobile phone to be measured;
Test report module is set as obtaining timing node of the test elements when carrying out use state switching, according to institute Timing node is stated from the standard real-time exhibition pattern obtained after the test elements switching is extracted in system log, by the mark It quasi real time shows and generates test report after the real-time exhibition pattern shown on pattern and the mobile phone screen is compared.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is special Sign is, when the computer-readable instruction is executed by the processor, so that the processor executes such as claim 1 to 7 Any one of the screen compatibility test method of abnormity described in claim the step of.
10. a kind of storage medium for being stored with computer-readable instruction, which is characterized in that the computer-readable instruction is by one Or multiple processors are when executing, so that one or more processors are executed as described in any one of claims 1 to 7 claim The step of abnormity screen compatibility test method.
CN201910427385.2A 2019-05-22 2019-05-22 Abnormity screen compatibility test method, device, computer equipment and storage medium Pending CN110321257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910427385.2A CN110321257A (en) 2019-05-22 2019-05-22 Abnormity screen compatibility test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910427385.2A CN110321257A (en) 2019-05-22 2019-05-22 Abnormity screen compatibility test method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110321257A true CN110321257A (en) 2019-10-11

Family

ID=68113251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910427385.2A Pending CN110321257A (en) 2019-05-22 2019-05-22 Abnormity screen compatibility test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110321257A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185478A (en) * 2021-11-05 2022-03-15 北京搜狗科技发展有限公司 Application program display method and device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120127067A (en) * 2011-05-13 2012-11-21 부산대학교 산학협력단 Apparatus and method for determining screen equivalency to test compatibility
US20130004087A1 (en) * 2011-06-30 2013-01-03 American Express Travel Related Services Company, Inc. Method and system for webpage regression testing
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN108091288A (en) * 2017-12-08 2018-05-29 深圳Tcl新技术有限公司 Test method, terminal and the computer readable storage medium of display screen uniformity
CN108304318A (en) * 2018-01-02 2018-07-20 深圳壹账通智能科技有限公司 The test method and terminal device of equipment compatibility
CN108920380A (en) * 2018-07-20 2018-11-30 百度在线网络技术(北京)有限公司 Test method, device, server, equipment and the storage medium of the software compatibility
CN109408365A (en) * 2018-08-30 2019-03-01 深圳壹账通智能科技有限公司 Secondary page test method, device, storage medium and computer equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120127067A (en) * 2011-05-13 2012-11-21 부산대학교 산학협력단 Apparatus and method for determining screen equivalency to test compatibility
US20130004087A1 (en) * 2011-06-30 2013-01-03 American Express Travel Related Services Company, Inc. Method and system for webpage regression testing
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN108091288A (en) * 2017-12-08 2018-05-29 深圳Tcl新技术有限公司 Test method, terminal and the computer readable storage medium of display screen uniformity
CN108304318A (en) * 2018-01-02 2018-07-20 深圳壹账通智能科技有限公司 The test method and terminal device of equipment compatibility
CN108920380A (en) * 2018-07-20 2018-11-30 百度在线网络技术(北京)有限公司 Test method, device, server, equipment and the storage medium of the software compatibility
CN109408365A (en) * 2018-08-30 2019-03-01 深圳壹账通智能科技有限公司 Secondary page test method, device, storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李昕宇;侯春萍;王宝亮;宁国津;于奎星;: "基于图像匹配的移动应用自动化测试方法研究", 计算机工程与应用, no. 13 *
郭松;李凤新;付炜;: "手机业务测试平台上屏幕图像识别软件的设计与实现", 电子技术, no. 07 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185478A (en) * 2021-11-05 2022-03-15 北京搜狗科技发展有限公司 Application program display method and device and storage medium

Similar Documents

Publication Publication Date Title
US11321583B2 (en) Image annotating method and electronic device
CN109697416B (en) Video data processing method and related device
CN111225234B (en) Video auditing method, video auditing device, equipment and storage medium
CN109815960A (en) Reproduction image-recognizing method, device, equipment and medium based on deep learning
CN106874826A (en) Face key point-tracking method and device
CN105893253A (en) Application software testing method, device and equipment
CN110348511A (en) A kind of picture reproduction detection method, system and electronic equipment
CN111310613B (en) Image detection method and device and computer readable storage medium
CN111309222B (en) Sliding block notch positioning and dragging track generation method for sliding block verification code
CN110427819A (en) The method and relevant device of PPT frame in a kind of identification image
CN108710893A (en) A kind of digital image cameras source model sorting technique of feature based fusion
CN107040535A (en) Mobile solution channel logs in monitoring method, device, system and storage medium
CN109740040A (en) Method for recognizing verification code, device, storage medium and computer equipment
Li et al. Image manipulation localization using attentional cross-domain CNN features
CN113034421A (en) Image detection method, device and storage medium
Selay et al. Adaptive random testing for image comparison in regression web testing
CN114663705A (en) Video auditing model training method, video auditing method and related device
CN110321257A (en) Abnormity screen compatibility test method, device, computer equipment and storage medium
CN110248235A (en) Software teaching method, apparatus, terminal device and medium
CN112966547A (en) Neural network-based gas field abnormal behavior recognition early warning method, system, terminal and storage medium
CN116983660A (en) Image processing method and related device
Lindstedt et al. Simple agglomerative visual grouping for ACT-R
CN114821733A (en) Method, device and medium for compensating robustness of mode recognition model of unconstrained scene
CN111382689A (en) Card punching system and method for online learning by using computer
Tripathi et al. Smart Attendance Portal using Facial Recognition

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240621