CN106095679A - Graphical interfaces method for generating test case based on Freehandhand-drawing identification - Google Patents
Graphical interfaces method for generating test case based on Freehandhand-drawing identification Download PDFInfo
- Publication number
- CN106095679A CN106095679A CN201610408581.1A CN201610408581A CN106095679A CN 106095679 A CN106095679 A CN 106095679A CN 201610408581 A CN201610408581 A CN 201610408581A CN 106095679 A CN106095679 A CN 106095679A
- Authority
- CN
- China
- Prior art keywords
- test
- software
- interface
- user
- action
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 187
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000008569 process Effects 0.000 claims abstract description 23
- 238000005516 engineering process Methods 0.000 claims abstract description 10
- 230000009471 action Effects 0.000 claims description 71
- 230000006399 behavior Effects 0.000 claims description 12
- 239000000284 extract Substances 0.000 claims description 10
- 230000008859 change Effects 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims description 7
- 210000003205 muscle Anatomy 0.000 claims description 4
- 230000003466 anti-cipated effect Effects 0.000 claims description 2
- 238000010276 construction Methods 0.000 claims description 2
- 238000013480 data collection Methods 0.000 claims description 2
- 238000013461 design Methods 0.000 claims description 2
- 238000010297 mechanical methods and process Methods 0.000 claims description 2
- 230000005226 mechanical processes and functions Effects 0.000 claims description 2
- 230000000630 rising effect Effects 0.000 claims 1
- 230000002452 interceptive effect Effects 0.000 abstract 1
- 238000010998 test method Methods 0.000 description 4
- 238000007630 basic procedure Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 238000013102 re-test Methods 0.000 description 1
- 238000012956 testing procedure Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention proposes a kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification, manual test high cost is there is in the method for the Test cases technology of current graphical interfaces, the problems such as script difficulty of test is excessive, by utilizing Sketch recognition technology to carry out the generation process of subtest use-case so that the graphical interfaces interactive testing of mobile device software and personal computer software becomes the easiest, efficiently.
Description
Technical field
The invention belongs to computer graphical processing and software test field, relate to the use of Sketch recognition technology come for
The graphical interfaces of software carries out the technology tested.Predominantly mobile device software and the survey of personal computer software graphical interfaces
Examination provides a kind of automatic example generation method easy, efficient, in order to effectively carries out the relevant software of graphical interfaces and surveys
Examination.
Background technology
Graphic user interface (GUI) is the major way that computer software interacts with user.Graphic user interface is soft
Part test refers to the software test relevant with function to graphical interfaces associative operation carried out for Graphic User Interface software, its
Test content includes the correctness test that interface redirects, the stress test of abnormal input, cooperation test of many bed boundarys etc..Mesh
Before, the test for software system graphic user interface can be divided into manual test and automatic test.
Manual test requirement user is in real software environment, by software graphical interface, each needs the merit tested
Step can attempt one by one, and check the test result information of software.Manual test has certain limitation, and its major defect exists
In: (1) testing cost is the highest, needs to consume the combination function of each assembly in substantial amounts of artificial traversal interface;(2) test
Completeness be difficult to ensure, owing to the graphic user interface of a lot of large softwares is extremely complex, user easily omit test combination
With test action;(3) manual test can cause the inaccurate of test result, such as, for some uncertainty program, check hands
The software output of work does not ensures that test is passed through;(4) for the system that complicated system or security requirement are higher, make
Test can not meet demand by hand.
Automatic test mainly includes automatic test based on script edit, i.e. tester writes for software interface
Simulated operation script, and by automatically performing script to generate test data.Although this method of testing greatly reduces the people of test
Power cost, but still there is obviously limitation, it is embodied in: writing of (1) test script needs the strongest specialty
Technology, writes difficulty bigger;(2) write test script and lack intuitive, complicated interface and interface are redirected and tends not to very
Identify well;(3) write single test script and be difficult to accomplish high coverage rate, thus be difficult to meet the testing requirement of user, both
Redundancy testing can be brought, some interface action can be made again to fail to obtain Complete test;(4) current existing test script support
The general inefficiency of system, can only test the action sequence that user is single, it is impossible to well support the interface detection containing circulation.
For the problem in the presence of conventional automated test, current already present technology provides several to be improved possibly
Scheme.Specifically include that (1) sets up the state machine transformation model of system under test (SUT), and automatically generate test foot according to this transformation model
This;(2) set up the state transition sequence of system under test (SUT) input and output, and through the analysis to this sequence, automatically determine each test
The conspiracy relation of node.But, previous scheme only exists theoretic feasibility, and large-scale complicated system is set up state machine conversion
Model is the most infeasible, the problem of existence Space Explosion.Latter scheme is hardly produced complete State Transferring sequence
Row, and the problem that readable disappearance can be caused for test case is evaluated.It should be inherently test due to input and output
A part for use-case, obtains state transition sequence according to input and output and test can be made to become imperfect, thus occur in test
Omit.
Summary of the invention
Technical problem: the Test cases technology that the present invention is directed to current graphical interfaces exists manual test high cost, foot
The problems such as this difficulty of test is excessive, it is proposed that a kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification.
Technical scheme: graphical interfaces method for generating test case based on Freehandhand-drawing identification specifically includes following steps:
Step 1: user opens test software, carries out the selection of test condition, and opens to be measured soft by test software
Part.Test software enters backstage after opening, and user enters software to be tested.Guarantee the process of mobile device exists simultaneously to be measured
Software and test software, and system is reserved with needed for enough spaces carry out the data collection before software test and test job
The internal memory wanted.Application needs to have the authority of the execution that backstage keeps.After entering software under testing, user prepares to start screenshotss rank
Section.
Step 2: after user enters software under testing, operates software in a normal way.User be necessary to ensure that for
Be there is a need to the most opened one or many in interface of test.Certain time delay card is there may be in actual mechanical process
?.User confirms that software under testing, by after sectional drawing, is closed in each interface to be measured, returns test software.
Step 3: user is while foreground interacts with software under testing, and test software carries out shot operation on backstage.
When testing software detection and having bigger difference to current interface with a upper interface, starting sectional drawing, test software detection sectional drawing is
No preserved by previous shot operation, then sectional drawing is numbered without preserving, and be saved in test software.
The numbering of sectional drawing ensures uniqueness when software under testing each time runs.
Step 4: user performs Freehandhand-drawing process.System shows the interface of user's screenshotss according to screenshotss order, and user can root
Adjust screenshotss order according to the demand of oneself, but the numbering of screenshotss can not be adjusted.The behavior that user tests as required, on interface
Carry out simple Freehandhand-drawing.Freehandhand-drawing is divided into three phases.First stage user determines the operational motion needing to carry out.Most mobile
The behaviors such as the action behavior of end, as clicked, double-clicks, pull, and long presses, input through keyboard all in test software the behavior of preserving reflect
Penetrating, Freehandhand-drawing rule is provided by system, and the gesture that user specifies according to test software carries out simulated operation on the interface of screenshotss,
Test software be identified according to the figure of user's Freehandhand-drawing, record the figure of user's Freehandhand-drawing, the coordinate of graphics critical position and
The screenshot picture numbering at Freehandhand-drawing place, is stored as an action sequence.Second stage is the optional stage, determines the behavior of action
Restriction range.As every sub-option in drop-down menu is clicked on or for specifying optional position, region to carry out the behaviour such as click
Making behavior, test software Additional definitions " for-all ", " arbitrarily ", the scope symbol such as " existence " is for user's selection.Phase III
For determining action target.For the action having interface to redirect, user can the screenshotss numbering of the extra target interface of required movement.
Target can also is that an expection for screen change, as on screen, a word occurs in some region, a certain on screen
There is a color change, or the not collapse etc. of screen software in block.User can select target on software.
Step 5: system by the stroke of the three phases of a Freehandhand-drawing separately, identifies these three stroke, by their standardization
After the intelligible content of system, generate the attached letter of action symbol, range constraint symbol, aiming symbol, and symbol respectively
Breath.If the Freehandhand-drawing of system None-identified user, then hand-drawing graphics can be guessed, allow user determine whether this gesture,
User can preserve conjecture gesture or abandon Freehandhand-drawing again.Then these symbols are synthesized an assemble of symbol by system, carry
Supply finite state machine carries out model construction.
Step 6: system generates finite state machine.System initial interface after first Selection Software is opened is finite state machine
Starting point.The assemble of symbol in starting point is chosen with starting point for interface, source, if assemble of symbol does not comprise restriction range,
Then with interface, source as starting point, action is limit, and target is terminal extended finite state machine.If the model Han Constrained in assemble of symbol
Enclose, then generate n bar limit and n terminal according to the kind of restriction range.Then the type of terminal is judged, if terminal is a boundary
Face, then continue this operation with terminal for interface, source, until this finite state machine does not contains the most un-added assemble of symbol.As
Really terminal is a screen change expection, then using individual interface as a leaf node, terminate this finite state machine.
Step 7: generate test case script.System extracts from the finite state machine simplified, with state machine
Starting point is starting position, and any leaf node is terminal, extracts a sequence comprising any amount action, and this sequence can be reflected
Penetrate the sequence of operation for redirecting between the different interfaces of tested software in reality.System preserves the sequence number of this sequence, and
Repeat extraction and this process numbered, it is ensured that the most at least extracted by everything and stop the most afterwards.Sequence by all extractions
Leu, according to the grammatical rules of Lua script, generates test script according to the practical situation of target interface, former interface and action,
Each script will include the everything of extraction sequence.The all of Lua script generated is integrated by system, automatically generates
Junit tests code, waits pending test process.
Step 8: generate test target.The target of the test script of numbering is collected separately by system, by test script and survey
Examination target one_to_one corresponding, generates the target expection of test script, and they is packed in the lump, generate test general objective.
Step 9: user keeps testing the posterior process of software and do not closes, and selects to open test software, and system will be held automatically
The test script that row preserves, user's waiting system performs script automatically.In measuring executing process, user only needs to carry in system
Software is reloaded when showing and return to initial interface.After prompting test completes, automatic rebound is tested software by system, waits
Generate test output result.
Step 10: the test result of each action, according to the situation in measuring executing process, is divided into five classes by system:
(1) test is passed through: if going to test action, and not occurring stuck, sudden strain of a muscle is moved back, and the collapse case such as restarts,
And if there is predefining that interface redirects, then redirect interface and be recognized by the system, the intended result interface cut and pre-save
It coincide.When undefined interface redirects, only consider whether the situation of collapse.
(2) failure: if going to test action, but occur when performing this test action to add up three times or block above
Extremely, sudden strain of a muscle is moved back, and the collapse case such as restarts, then it is assumed that this test result failure.
(3) warning: if going to test action, but when testing this action, there is one to twice collapse condition, then will
This test result is defined as warning, overstriking operation of recording type and coordinate, allows user judge bug or design error.
(4) mistake: if going to test action, there is not collapse condition in measuring executing process, but target interface without
Method identification or target interface are inconsistent with anticipated interface, then the test result defining this action is error.
(5) undefined: if owing to failed, the warning of test action before or mistake, to cause the former interface of a certain bar can not
Arrive, or owing to some accidental causes make certain test to be performed, then define the test result of this action for not
Definition.
All test results are collected by system, generate test result report, preserve simultaneously the test of non-successful former interface,
Type of action and coordinate, target interface.
Step 11: system shows test report document in test software, user can additionally check that each test is dynamic
The test result made, failed wrong or successful execution journal.For different test results, user can be according to report literary composition
Shelves trace back to concrete interface and the action carried out at this interface, and target interface, to determine the mistake of software and to revise in time.
Beneficial effect: excellent compared to traditional user's manual test of graphic user interface method of testing that the present invention proposes
Gesture is:
(1) user has only to concentration and does Freehandhand-drawing operation, can complete to test the action at all interfaces;It is not required to
User's distributing in test process is wanted to carry out interface operation.
(2) situation is redirected for specific interface more, such as drop-down menu has the retest of multiple similar option
Situation, the present invention develops cycle criterions such as " for-all ", user can be allowed only to carry out simple Freehandhand-drawing, automatically generates complicated survey
Whole submenus in training this test drop-down menu;Solve to need repeatedly to perform " to test-return to an interface during user test
Return-test " trouble;
(3) user's easy holiday test action when interface complexity, uses the present invention can reduce owing to user loses
The loss of the coverage rate that the test action by mistake brought is omitted and caused.
(4) present invention can be greatly enhanced the efficiency of test, is converted into by substantial amounts of manual test and to automatically complete
Script is tested, and can save manpower and time.
(5) this test can automatically generate test report, manually recorded when being compared to manual test, and the present invention is permissible
Test result is carried out standardization processing, saves the time and the brightest and the clearest.
(6) this method has higher code coverage and branch covering rate relative to traditional method of testing, in the field of business
Boundary has higher testing efficiency.
The graphic user interface method of testing that the present invention proposes is compared to the advantage of traditional script edit test:
(1) Freehandhand-drawing identification has the intuitive that comparison is good, and user has only to carry out Freehandhand-drawing at the interface of software under testing i.e.
Can;Tradition is write script and is generally required tester and have higher visionary and to figure, pattern, the grasp ability of color.
(2) test code can be automatically generated according to finite state machine after Freehandhand-drawing identification, for testing the special of user personnel
Industry technology requires that ratio is relatively low.Tester is decreased obviously for the requirement of test case Script Programming, and tester can be only
Code is simply debugged.
(3) tester is the invention enables to have higher work efficiency: figure can be grasped by tester intuitively
Making, compare hand-coding code, can be greatly improved work incentive and the work efficiency of tester.
(4) Module Division is definitely: traditional-handwork is write in the work of test script, often part of detecting and test
Interpretation of result mixes so that whole test process exists higher coupling, the most unfavorable for multiplexing and amendment.
(5) time-consuming: being compared to traditional script and develop the problems such as easy mistake, debugging difficulty, the present invention is automatic
Generating script, time cost is mainly reflected in screenshotss and drafting action, can be the most time-consuming.
(6) compare script edit, and the amendment of Freehandhand-drawing is very convenient, it is thus only necessary to will draw problematic screenshotss and individually weigh
Draw again, elaborated code need not be revised, there is no any coupling problem.
Accompanying drawing explanation
Fig. 1 is the basic procedure of graphical interfaces method for generating test case based on Freehandhand-drawing identification,
Fig. 2 is the basic procedure of Freehandhand-drawing Symbol recognition,
Fig. 3 is the basic procedure that finite state machine generates,
Fig. 4 is the set of Freehandhand-drawing standard symbol,
Fig. 5 is critical field gesture assemble of symbol.
Detailed description of the invention
Specific embodiments of the present invention are exemplified below, and to step 5 complex in the present invention and step 6,
And the stroke icon defined in Freehandhand-drawing, it is described in more detail.
Testing procedure is illustrated:
Step 1: user opens test software, selects to start test, opens software under testing A.
Step 2: user operates in the normal fashion, selects at the initial interface of A to enter software, opens menu list, select
Grassroot project, inputs " hello world " at interface, clicks on ctrl+s, and click is exited, end operation.
Step 3: it is 001 that system intercepts initial interface, and browsing menu interface is 002 (assuming that menu one has 5), newly-built
Project interface is 003
Step 4: user browses each sectional drawing again, it is intended that 001 selects to click in button positions, and target interface is 002;
Selecting for-all scope symbol at 002 interface, action is for clicking on, it is intended that target interface is 003;Select to open literary composition at 003 interface
This editing machine, inputs " hello, world ", selects to click in position button, and test target selects " exiting software ".
Step 5: system extracts the Freehandhand-drawing symbol of initial interface 001, generates assemble of symbol: action symbol is single-click operation,
Target is interface 002.System extracts the Freehandhand-drawing symbol of 002, generates assemble of symbol: action is single-click operation, and scope is menu bar
Table circulates, and target interface is 003.System extracts 003 Freehandhand-drawing symbol, generates assemble of symbol: action is input text, and point is beaten back
Going out, target is " software exits ".
Step 6: system generates finite state machine, and starting point is 001 interface, 001 is connected to 002 by clicking on the limit of button;
In 002, each menu item generates a limit, and limit is for clicking on menu item, and terminal is 003.003 generates a limit for input word
Clicking on and exit, terminal is the state that software exits.
10 test access are generated 10 by step 7: system extracts the path (10 altogether) of each finite state machine
The test case of the script of Lua language, and converged by junit.
Step 8: system preserve 10 test cases result set, and save as expected test result.
Step 9: user waits that software jumps to A software and automatically performs test.
Step 10: system generates test result.
Step 11: user checks test result.
The present invention is (as shown in Figure 2) in the specific embodiments of step 5 Freehandhand-drawing Symbol recognition:
Step 5.1: the action class symbol in system extraction user's Freehandhand-drawing symbol, determines position and the class of action symbol
Type, if the Freehandhand-drawing symbol of user is difficult to, then system is guessed, user can select to accept conjecture or the throwing of system
Abandon Freehandhand-drawing again.After determining action symbol, Freehandhand-drawing is converted into understandable action symbol and preserves by system.Simultaneity factor will be protected
Deposit the coordinate information of action symbol.
Step 5.2: system extracts the restriction range class symbol in user's Freehandhand-drawing symbol, determines constrained type and constraint model
Enclose.For arbitrarily constraint, system will be created in the range of the coordinate of point of random amount;Constraint any for list, system will
List in analytical range, for each list items in list, generates the coordinate of a point;For there is constraint, system exists
In the range of optional position generate a coordinate.For the scope symbol of system None-identified, the most directly abandon, allow user again paint
System.After determining constraint class symbol, system preserves scope and the type of constraint of obligatory point.
Step 5.3: system extracts the aiming symbol in user's Freehandhand-drawing symbol, determines targeted species.If target is interface
Redirect, then record the numbering of target interface;If target is an interface change expection, then generate software according to expection permissible
The language understood, saves as the target of finite state machine;If user does not specify target, then it is assumed that be as long as not collapsing
Pass through.For the target gesture of system None-identified, system is directly abandoned, and allows user repaint.After determining aiming symbol, it is
Blanket insurance deposits aiming symbol and target logic type.
Step 5.4: system is according to action symbol, action symbol coordinate, restriction range, constrained type, aiming symbol, target
Logical symbol, the information adding interface, source generates a glossary of symbols, and glossary of symbols can represent and carries out once on interface, source
Complete has intended motion action.
The present invention is (as shown in Figure 3) in the specific embodiments of the generation process of step 6 finite state machine:
Step 6.1: first, system generates an empty finite state machine.The glossary of symbols obtained according to Freehandhand-drawing identification, chooses
The interface that software test enters is starting point, preserves the symbolic information of start interface, generates a node with this interface for content,
As the start node of finite state machine, and using this interface as interface, source.
Step 6.2: be chosen at the assemble of symbol on this interface according to interface, source, if containing more than one on this interface
Individual assemble of symbol, then need to choose these assemble of symbol one by one, make respectively finite state machine the generation on limit.
Step 6.3: judge that whether this assemble of symbol is containing Constrained.This assemble of symbol is split, if this
Individual assemble of symbol does not contains restriction range symbol, then perform step 6.4;If this assemble of symbol contains restriction range symbol,
Then perform step 6.5
Step 6.4: if this assemble of symbol does not contains restriction range symbol, then according to the target of this assemble of symbol,
Generate a node, be expressed as the limit between the two point, extended finite state machine with the action symbol in assemble of symbol.
Step 6.5: if this assemble of symbol contains restriction range symbol, then the point generated according to restriction range symbol
Quantity, generates n target and n bar limit, and these limits are expressed as reaching the action of each target, and these targets can have identical
Situation.With current finite state machine for input, expanding finite state machine, system preserves the finite state machine after extension.
Step 6.6: whether the target judging this assemble of symbol is termination target.The target of assemble of symbol is classified
Discuss, redirect if target is an interface, then perform step 6.7;If target is a screen change expection, as long as or
Ask interface not collapse, then perform step 6.8.
Step 6.7: redirect if target is an interface, then the interface redirected is set to interface, source, continues executing with
6.2, until all of assemble of symbol is the most processed on this interface.
Step 6.8: if target be a screen with itself or only require that interface does not collapses, then this node is set to
Leaf node, if node before also has assemble of symbol not process, then goes to process those assemble of symbol, if all nodes
Assemble of symbol is the most treated, then terminate this finite state machine, and preserve this finite state machine.
The present invention, during user's Freehandhand-drawing, defines standard Freehandhand-drawing icon as shown in Figure 4:
A () clicks: the position drawing some mark is the position that test is clicked on, and test software preserves the point of the expression of user's Freehandhand-drawing
Coordinate and place screenshotss numbering.The most then perform single-click operation at the coordinate position preserved.
B () double-clicks: the position drawing some mark is the position that test is double-clicked, and test software preserves the point of the expression of user's Freehandhand-drawing
Coordinate and place screenshotss numbering.The most then perform single-click operation at the coordinate position preserved.
C () pulls: the position drawing some mark is the original position that test pulls, and the position of blue arrow is the position pulling terminal
Putting, test software preserves coordinate and the place screenshotss numbering of the beginning and end that user's Freehandhand-drawing represents.In reality is tested then singly
Hit original position, and the content of original position is dragged to final position, do not consider whether grammer can pull.
D () is slided: the position drawing some mark is the original position that test pulls, and the position of arrow pulls the position of terminal,
Test software preserves coordinate and the place screenshotss numbering of the beginning and end that user's Freehandhand-drawing represents.Then click in reality is tested
Beginning position, and the content of original position is dragged to final position, do not consider whether grammer can slide.
The present invention is for there being the action of certain repeated characteristic, it is provided that restriction range gesture as shown in Figure 5, mainly wraps
Include:
A () is any: need a closed figures to determine scope, represents that any point all can be as test in the range of this
The point generated, in practical operation system can at random in the range of generate a number of point, it is ensured that selected point sporadicly spreads, and is
Blanket insurance deposits the coordinate of these points, it is provided that operate to action symbol.
B () list is any: this symbol can the list at automatic distinguished symbol place, and list is resolved, list is divided
Solving is n row, and to every a line, system generates a point, it is ensured that this point can choose an item of list.System preserves these
Point, it is provided that operate to symbol action.
C () exists: one closed figures of needs determines scope, represents that any point all can be as test in the range of this
The point generated, in practical operation system can at random in the range of generate a point, make to go to each time action during this action
Coordinate all may different, system preserve this point coordinate, it is provided that operate to action symbol.
Claims (3)
1. a graphical interfaces method for generating test case based on Freehandhand-drawing identification, it is characterised in that this generation method utilizes Freehandhand-drawing
Sketch recognition technology is tested for the graphical interfaces of software, predominantly mobile device software and personal computer software
The test of graphical interfaces provides a kind of automatic example generation method easy, efficient, concretely comprises the following steps:
Step 1: user opens test software, carries out the selection of test condition, and opens software under testing by test software, survey
Examination software enters backstage after opening, and user enters software to be tested, it is ensured that there is software under testing in the process of mobile device simultaneously
With test software, and system is reserved with enough spaces and carries out required for the data collection before software test and test job
Internal memory, application needs to have the authority of the execution that backstage keeps, and after entering software under testing, user prepares to start the screenshotss stage;
Step 2: after user enters software under testing, operates software in a normal way, and user is necessary to ensure that for all
The interface needing test is the most opened once;There may be certain time delay card in actual mechanical process to pause, user is true
Recognize each interface to be measured by after sectional drawing, close software under testing, return test software;
Step 3: user is while foreground interacts with software under testing, and test software carries out shot operation on backstage, works as survey
When examination software detection has bigger difference to current interface and a upper interface, starting sectional drawing, test software detection sectional drawing is the most
Through being preserved by previous shot operation, then sectional drawing is numbered without preserving, and is saved in test software, sectional drawing
Numbering ensure uniqueness when software under testing each time runs;
Step 4: user performs Freehandhand-drawing process, system is according to the interface of screenshotss order displaying user's screenshotss, and user can be according to certainly
Oneself demand adjusts screenshotss order, but can not adjust the numbering of screenshotss, and the behavior that user tests as required is carried out on interface
Simple Freehandhand-drawing, Freehandhand-drawing is divided into three phases;
Step 5: system by the stroke of the three phases of a Freehandhand-drawing separately, identifies these three stroke, they are standardized as be
After intelligible content of uniting, generate action symbol, range constraint symbol, aiming symbol, and the satellite information of symbol respectively;As
The really Freehandhand-drawing of system None-identified user, then can guess hand-drawing graphics, allows user determine whether this gesture, Yong Huke
To preserve conjecture gesture or to abandon Freehandhand-drawing again, then these symbols are synthesized an assemble of symbol by system, it is provided that had
Limit state machine carries out model construction;
Step 6: system generates finite state machine, system initial interface after first Selection Software is opened is rising of finite state machine
Initial point, chooses the assemble of symbol in starting point with starting point for interface, source, if assemble of symbol does not comprise restriction range, then with
Interface, source is starting point, and action is limit, and target is terminal extended finite state machine;If containing restriction range in assemble of symbol, then
Kind according to restriction range generates n bar limit and n terminal, then judges the type of terminal, if terminal is an interface, then
This operation is continued, until this finite state machine does not contains the most un-added assemble of symbol with terminal for interface, source;If eventually
Point is a screen change expection, then using this interface as a leaf node, terminate this finite state machine;
Step 7: generating test case script, system extracts from the finite state machine simplified, with the starting point of state machine
For starting position, any leaf node is terminal, extracts a sequence comprising any amount action, and this sequence can be mapped as
The sequence of operation redirected between the different interfaces of tested software in reality;System preserves the sequence number of this sequence, and repeats
Extraction and this process numbered, it is ensured that everything is the most at least extracted and stops the most afterwards;The sequence of all extractions is depended on
According to the grammatical rules of Lua script, generate test script according to the practical situation of target interface, former interface and action, each
Script will include the everything of extraction sequence, and all of Lua script generated is integrated by system, automatically generates
Junit tests code, waits pending test process;
Step 8: generating test target, the target of the test script of numbering is collected separately by system, by test script and test mesh
Mark one_to_one corresponding, generates the target expection of test script, and they is packed in the lump, generate test general objective;
Step 9: user keeps testing the posterior process of software and do not closes, and selects to open test software, and system will perform guarantor automatically
The test script deposited, user's waiting system performs script automatically;In measuring executing process, user only needs to return at system prompt
Reloading software during to initial interface, after prompting test completes, automatic rebound is tested software by system, waits to be generated
Test output result;
Step 10: the test result of each action, according to the situation in measuring executing process, is divided into five classes: test is logical by system
Cross, failure, warning, mistake, undefined;
All test results are collected by system, generate test result report, preserve the former interface of the test of non-successful, action simultaneously
Type and coordinate, target interface;
Step 11: system shows test report document in test software, and user can additionally check each test action
Test result, failed wrong or successful execution journal, for different test results, user can return according to report file
Trace back concrete interface and the action that carries out at this interface, and target interface, to determine the mistake of software and to revise in time.
A kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification the most according to claim 1, its feature exists
In described step 4: during user performs Freehandhand-drawing, Freehandhand-drawing is divided into three phases;First stage user determines that needs are carried out
Operational motion, the action behavior of most mobile terminals, as clicked, to double-click, pull, the behaviors such as length is pressed, input through keyboard are all being surveyed
Preserving behavior in examination software to map, Freehandhand-drawing rule is provided by system, and the gesture that user specifies according to test software, at screenshotss
Carrying out simulated operation on interface, test software is identified according to the figure of user's Freehandhand-drawing, records the figure of user's Freehandhand-drawing, figure
The coordinate of shape key position and the screenshot picture numbering at Freehandhand-drawing place, be stored as an action sequence;Second stage is optional rank
Section, determines the covenant of works bundle scope of action, clicks on or every sub-option in drop-down menu for specifying region to appoint
Meaning position carries out the operation behaviors such as click, tests software Additional definitions " for-all ", " arbitrarily ", and " existence " scope symbol supplies
User selects;Phase III, for the action having interface to redirect, user can the mesh of extra required movement in order to determine action target
Demarcate face screenshotss numbering, target can also is that an expection for screen change;If some region occurs one on screen
On individual word, screen, a certain piece occurs that a color change or screen software do not collapse, and user can select on software
Target.
A kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification the most according to claim 1, its feature exists
In described step 10: the test result of each action, according to the situation in measuring executing process, is divided into five classes by system, tool
Body is:
1). test is passed through: if going to test action, and not occurring stuck, sudden strain of a muscle is moved back, and the collapse case such as restarts, and
If there is predefining that interface redirects, then redirecting interface and be recognized by the system, the intended result interface cut and pre-save coincide,
When undefined interface redirects, only consider whether the situation of collapse;
2). failure: if going to test action, but occur when performing this test action accumulative three times or the most stuck,
Sudden strain of a muscle is moved back, and the collapse case such as restarts, then it is assumed that this test result failure;
3). warning: if going to test action, but there is one to twice collapse condition when testing this action, then by this
Test result is defined as warning, overstriking operation of recording type and coordinate, allows user judge bug or design error;
4). mistake: if going to test action, there is not collapse condition in measuring executing process, but target interface cannot be known
Not or target interface is inconsistent with anticipated interface, then the test result of this action is defined for slipping up;
5). undefined: if owing to failed, the warning of test action before or mistake, to cause the former interface of a certain bar to arrive,
Or owing to some accidental causes make certain test to be performed, then the test result defining this action is undefined.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610408581.1A CN106095679B (en) | 2016-06-12 | 2016-06-12 | Graphical interfaces method for generating test case based on Freehandhand-drawing identification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610408581.1A CN106095679B (en) | 2016-06-12 | 2016-06-12 | Graphical interfaces method for generating test case based on Freehandhand-drawing identification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106095679A true CN106095679A (en) | 2016-11-09 |
CN106095679B CN106095679B (en) | 2018-10-16 |
Family
ID=57227857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610408581.1A Active CN106095679B (en) | 2016-06-12 | 2016-06-12 | Graphical interfaces method for generating test case based on Freehandhand-drawing identification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106095679B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066381A (en) * | 2017-02-27 | 2017-08-18 | 网易(杭州)网络有限公司 | Generate method, device and the equipment of the test analysis report based on image recognition |
CN108205674A (en) * | 2017-12-22 | 2018-06-26 | 广州爱美互动网络科技有限公司 | Content identification method, electronic equipment, storage medium and the system of social APP |
CN110337641A (en) * | 2017-03-17 | 2019-10-15 | 谷歌有限责任公司 | It is determined using screenshot capture metadata and applies test result |
CN110502237A (en) * | 2019-09-07 | 2019-11-26 | 创新奇智(广州)科技有限公司 | A kind of software interface prototype method and tool based on state diagram |
CN112069080A (en) * | 2020-09-23 | 2020-12-11 | 北京合众伟奇科技股份有限公司 | Automatic executable script test method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420712A (en) * | 2010-09-28 | 2012-04-18 | 中国移动通信集团公司 | Testing method and equipment |
CN103838674A (en) * | 2014-03-21 | 2014-06-04 | 徐禄勇 | Intelligent testing robot based on digital image and use method thereof |
-
2016
- 2016-06-12 CN CN201610408581.1A patent/CN106095679B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420712A (en) * | 2010-09-28 | 2012-04-18 | 中国移动通信集团公司 | Testing method and equipment |
CN103838674A (en) * | 2014-03-21 | 2014-06-04 | 徐禄勇 | Intelligent testing robot based on digital image and use method thereof |
Non-Patent Citations (2)
Title |
---|
YUMA NAMBA ETC.: "Overview of Graphical Operational Profiles for Generating Test Cases of GUI Software", 《2015 16TH IEEE/ACIS INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ARTIFICIAL INTELLIGENCE, NETWORKING AND PARALLEL/DISTRIBUTED COMPUTING》 * |
李路: "基于语义的多领域草图符号识别研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066381A (en) * | 2017-02-27 | 2017-08-18 | 网易(杭州)网络有限公司 | Generate method, device and the equipment of the test analysis report based on image recognition |
CN110337641A (en) * | 2017-03-17 | 2019-10-15 | 谷歌有限责任公司 | It is determined using screenshot capture metadata and applies test result |
CN110337641B (en) * | 2017-03-17 | 2023-03-21 | 谷歌有限责任公司 | Determining application test results using screen shot primitive data |
CN108205674A (en) * | 2017-12-22 | 2018-06-26 | 广州爱美互动网络科技有限公司 | Content identification method, electronic equipment, storage medium and the system of social APP |
CN108205674B (en) * | 2017-12-22 | 2022-04-15 | 广州爱美互动网络科技有限公司 | Social APP content identification method, electronic device, storage medium and system |
CN110502237A (en) * | 2019-09-07 | 2019-11-26 | 创新奇智(广州)科技有限公司 | A kind of software interface prototype method and tool based on state diagram |
CN112069080A (en) * | 2020-09-23 | 2020-12-11 | 北京合众伟奇科技股份有限公司 | Automatic executable script test method and system |
Also Published As
Publication number | Publication date |
---|---|
CN106095679B (en) | 2018-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106095679B (en) | Graphical interfaces method for generating test case based on Freehandhand-drawing identification | |
Savage et al. | Topic XP: Exploring topics in source code using latent Dirichlet allocation | |
Agrawal et al. | Mining system tests to aid software maintenance | |
CN105512023B (en) | A kind of Monkey test method and device | |
CN106681919B (en) | A kind of user interface automated testing method and system | |
CN106599695B (en) | A kind of bootable semiology analysis leak detection method merged based on path | |
US20070061641A1 (en) | Apparatus and method for generating test driver | |
CN108399124A (en) | Application testing method, device, computer equipment and storage medium | |
CN108647147B (en) | Automatic testing robot implemented by using atlas analysis and use method thereof | |
CN108829389A (en) | Android application automation triggering execution method based on Appium | |
Lebeuf et al. | Understanding, debugging, and optimizing distributed software builds: A design study | |
CN103455672B (en) | A kind of FPGA emulation testing use-case automatization homing method | |
Arlt et al. | Behind the scenes: an approach to incorporate context in GUI test case generation | |
Swearngin et al. | Human performance regression testing | |
Lämsä | Comparison of GUI testing tools for Android applications | |
Villalobos-Arias et al. | Evaluation of a model‐based testing platform for Java applications | |
CN111143205B (en) | Android platform-oriented test case automatic generation method and generation system | |
US10579761B1 (en) | Method and system for reconstructing a graph presentation of a previously executed verification test | |
Quade et al. | Predicting task execution times by deriving enhanced cognitive models from user interface development models | |
Bouchet et al. | Formal testing of multimodal interactive systems | |
CN106528412B (en) | A kind of related gesture dispensing test frame of Android application | |
Koutsopoulos et al. | Advancing data race investigation and classification through visualization | |
Sun et al. | End-User support for debugging demonstration-based model transformation execution | |
Ibrahim et al. | Finite State Machine-Model Based Testing on Website Application | |
Yip et al. | Graphical user interfaces validation: a problem analysis and a strategy to solution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |