CN106095679B - 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 PDF

Info

Publication number
CN106095679B
CN106095679B CN201610408581.1A CN201610408581A CN106095679B CN 106095679 B CN106095679 B CN 106095679B CN 201610408581 A CN201610408581 A CN 201610408581A CN 106095679 B CN106095679 B CN 106095679B
Authority
CN
China
Prior art keywords
test
software
interface
user
freehandhand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610408581.1A
Other languages
Chinese (zh)
Other versions
CN106095679A (en
Inventor
汤恩义
王伟成
成浩亮
张初成
冯世宁
潘敏学
李宣东
赵祖威
杨开懋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CN201610408581.1A priority Critical patent/CN106095679B/en
Publication of CN106095679A publication Critical patent/CN106095679A/en
Application granted granted Critical
Publication of CN106095679B publication Critical patent/CN106095679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

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 identified based on Freehandhand-drawing, there are manual test cost is excessively high for the Test cases technology of current graphical interfaces for this method, the problems such as script difficulty of test is excessive, carry out the generating process of subtest use-case by using Sketch recognition technology so that mobile device software and the graphical interfaces interactive testing of personal computer software become more easy, efficient.

Description

Graphical interfaces method for generating test case based on Freehandhand-drawing identification
Technical field
The invention belongs to computer graphical processing and software test field, relate to the use of Sketch recognition technology to be directed to The technology that the graphical interfaces of software is tested.The predominantly survey of mobile device software and personal computer software graphical interfaces Examination provides a kind of easy, efficient automatic example generation method, is surveyed so that the relevant software of graphical interfaces is effectively performed Examination.
Background technology
Graphic user interface (GUI) is the major way that computer software is interacted with user.Graphic user interface is soft Part test refers to being directed to that Graphic User Interface software carries out and graphical interfaces relevant operation and the relevant software test of function, Test content includes the correctness test that interface redirects, the pressure test inputted extremely, the cooperation test at multilayer interface etc..Mesh Before, the test for software systems graphic user interface can be divided into manual test and automatic test.
Manual test requires user in true software environment, each in software graphical interface is needed work(to be tested Energy step 1 one is attempted, and examines the test result information of software.There is manual test certain limitation, major defect to exist In:(1) testing cost is very high, needs the combination function of each component in a large amount of artificial traversal interface of consumption;(2) it tests Completeness be difficult to ensure, since the graphic user interface of many large softwares is extremely complex, user be easy omit test combination With test action;(3) manual test can lead to the inaccuracy of test result, such as certain uncertainty programs, examine hand The software output of work does not ensure that test passes through;(4) for the relatively high system of complicated system or security requirement, make Test is unable to meet demand by hand.
Automatic test includes mainly the automatic test based on script edit, i.e. tester writes for software interface Simulated operation script, and test data is generated by automatic perform script.Although the test method greatly reduces the people of test Power cost, but still there is obviously limitation, it is embodied in:(1) writing for test script needs very strong profession It is larger to write difficulty for technology;(2) it writes test script and lacks intuitive, complicated interface and interface are redirected and tended not to very It identifies well;(3) it writes to single test script it is difficult to accomplish high coverage rate, thus be difficult the testing requirement for meeting user, both Redundancy testing can be brought, and some interface actions can be made to fail to obtain Complete test;(4) existing test script is supported at present The general inefficiency of system can only test the single action sequence of user, cannot support the interface detection containing cycle well.
The problem of in the presence of conventional automated test, current already present technology, which provides, several possibly to be improved Scheme.Include mainly:(1) the state machine transformation model of system under test (SUT) is established, and test foot is automatically generated according to the transformation model This;(2) state transition sequence of system under test (SUT) input and output is established, and by the analysis to the sequence, automatically determines each test The conspiracy relation of node.But there is only theoretic feasibilities for previous scheme, and state machine conversion is established to large-scale complicated system The problem of model is substantially infeasible, existence Space Explosion.Latter scheme is hardly produced complete state conversion sequence Row, and readable the problem of lacking can be caused for test case evaluation.Since input and output should be inherently test A part for use-case, obtaining state transition sequence according to input and output can make test become imperfect, to occur in test It omits.
Invention content
Technical problem:The present invention for current graphical interfaces Test cases technology there are manual test cost is excessively high, foot A kind of the problems such as this difficulty of test is excessive, it is proposed that graphical interfaces method for generating test case based on Freehandhand-drawing identification.
Technical solution: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 is opened by test software to be measured soft Part.Test software enters backstage after opening, user enters software to be tested.Ensure to exist simultaneously in the process of mobile device to be measured Software and test software, and system is reserved with enough spaces and carries out needed for data collection and test job before software test The memory wanted.Using the permission for needing to possess the execution that backstage is kept.Into after software under testing, user prepares to start screenshotss rank Section.
Step 2:After user enters software under testing, software is operated in a normal way.User be necessary to ensure that for Test in need interface it is all at least opened one or many.It might have certain delay card in actual mechanical process .User confirms that each interface to be measured by after sectional drawing, closes software under testing, returns to test software.
Step 3:For user while foreground and software under testing interact, test software carries out shot operation on backstage. When test software detects that current interface has bigger difference with a upper interface, start sectional drawing, test software detection sectional drawing is It is no to be preserved by previous shot operation, sectional drawing is numbered if not preserving, and is stored in test software. The number of sectional drawing ensures uniqueness when software under testing each time is run.
Step 4:User executes Freehandhand-drawing process.System shows the interface of user's screenshotss according to screenshotss sequence, and user can root According to the demand adjustment screenshotss sequence of oneself, but be unable to adjust the number of screenshotss.The behavior that user tests as needed, on interface Carry out simple Freehandhand-drawing.Freehandhand-drawing is divided into three phases.First stage user determines the operational motion for needing to carry out.The overwhelming majority is mobile The action behavior at end, is such as clicked, and is double-clicked, and is pulled, long-press, and the behavior of preserving is reflected all in test software for the behaviors such as keyboard input It penetrates, Freehandhand-drawing rule is provided by system, and user carries out simulated operation according to gesture as defined in test software on the interface of screenshotss, Test software is 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 Screenshot picture number where Freehandhand-drawing, is stored as an action sequence.Second stage is the optional stage, determines the behavior of action Restriction range.Such as every sub- option in drop-down menu click or specified region any position is carried out clicking behaviour Make behavior, test software Additional definitions " for-all ", " arbitrary ", the ranges such as " presence " symbol are selected for user.Phase III Target is acted to determine.For the action for thering is interface to redirect, user can additional required movement target interface screenshotss number. Target can also be an expection for screen change, a certain on screen if a word occurs in some region on screen There is the not collapse etc. of a color change or screen software in block.User can on software selection target.
Step 5:System separates the stroke of the three phases of a Freehandhand-drawing, identifies these three strokes, they are standardized After the intelligible content of system, action symbol is generated respectively, range constraint symbol, the attached letter of aiming symbol and symbol Breath.If the Freehandhand-drawing of system None- identified user, can guess hand-drawing graphics, user is allowed to determine whether the gesture, User can preserve conjecture gesture or abandon Freehandhand-drawing again.Then these symbols are synthesized an assemble of symbol by system, are carried It supplies finite state machine and carries out model construction.
Step 6:System generates finite state machine.Initial interface after system Selection Software first is opened is finite state machine Starting point.The assemble of symbol in starting point is chosen by source interface of starting point, if not including restriction range in assemble of symbol, It then using source interface as starting point, acts as side, target is terminal extended finite state machine.If model containing Constrained in assemble of symbol It encloses, then n side and n terminal is generated according to the type of restriction range.Then the type of terminal is judged, if terminal is a boundary This operation is then continued in face by source interface of terminal, until this finite state machine does not contain also un-added assemble of symbol.Such as Fruit terminal is that a screen change is expected, then using a interface as a leaf node, terminates this finite state machine.
Step 7:Generate test case script.System is extracted from the finite state machine simplified, with state machine Starting point is starting position, and arbitrary leaf node is terminal, extracts a sequence for including any amount action, this sequence can reflect Penetrate the sequence of operation to be redirected between the different interfaces of tested software in reality.System preserves the serial number of this sequence, and This process that repetition is extracted and numbered ensures to stop after all at least extracting everything once.By the sequence of all extractions Leie generates test script according to the syntax rule of Lua scripts according to the actual conditions of target interface, former interface and action, Each script will include the everything for extracting sequence.System integrates all Lua scripts of generation, automatically generates Junit tests code, waits pending test process.
Step 8:Generate test target.The target of the test script of number is collected separately system, by test script and survey It tries target to correspond, the target for generating test script is expected, and they are packaged together, generates test general objective.
Step 9:User keeps the posterior process of test software not close, and test software is opened in selection, and system will be held automatically The test script that row preserves, the automatic perform script of user's waiting system.User only needs to carry in system in measuring executing process Show that the when of returning to initial interface reloads software.After the completion of prompting to test, system waits for automatic rebound test software Generate test output result.
Step 10:System is divided into five classes according to the situation in measuring executing process, by the test result of each action:
(1) test passes through:If going to test action, and stuck without occurring, sudden strain of a muscle is moved back, and is restarted and is waited collapse cases, And it is predefined if there is what interface redirected, then redirects interface and be recognized by the system, the intended result interface cut and pre-saved It coincide.When undefined interface redirects, the case where only considering whether to collapse.
(2) failure:If going to test action, but occur when executing this test action accumulative three times or more to block Extremely, sudden strain of a muscle is moved back, and restarts equal collapse cases, then it is assumed that this test result fails.
(3) it alerts:One occurs when if going to test action, but test this action to collapse condition twice, then will This test result is defined as alerting, overstriking operation of recording type and coordinate, and it is bug or design error to allow user to judge.
(4) mistake:If going to test action, collapse condition do not occur for measuring executing process, but target interface without Method identifies or target interface is with it is expected that interface is inconsistent, then the test result for defining this action is error.
(5) undefined:If due to the failure, warning or mistake of test action before, cause a certain item original interface can not It reaches, or since some accidental causes make certain test that can not be performed, then the test result for defining this action is not Definition.
System summarizes all test results, generate test result report, while preserve non-successful test former interface, Type of action and coordinate, target interface.
Step 11:System shows that test report document, user can additionally check that each test is dynamic in test software The test result of work, fail wrong or successful execution journal.For different test results, user can be according to report text Shelves trace back to specific interface and the action carried out at the interface and target interface, to determine the mistake of software and correct in time.
Advantageous effect:Graphic user interface test method proposed by the present invention is excellent compared to traditional user's manual test Gesture is:
(1) user, which only needs to concentrate, does Freehandhand-drawing operation, you can the action at all interfaces is tested in completion;It is not required to Wanting user, distributing carries out interface operation during the test.
(2) retest for there are multiple similar options in situation, such as drop-down menu is turned for the multi-hop of specific interface Situation, the present invention develop cycle criterions such as " for-all ", and user can be allowed only to carry out simple Freehandhand-drawing, automatically generate complicated survey Whole submenus in training this test drop-down menu;It solves to need to execute an interface repeatedly when user test " to test-return Return-test " trouble;
(3) when interface complexity, user is easy holiday test action, can be reduced using the present invention since user loses The loss of coverage rate caused by the test action accidentally brought is omitted.
(4) present invention can greatly improve the efficiency of test, convert a large amount of manual test to and automatically complete Script is tested, and can be saved manpower and time.
(5) this test can automatically generate test report, manually recorded when being compared to manual test, and the present invention can be with Standardization processing is carried out to test result, saves time and clear bright and clear.
(6) this method possesses higher code coverage and branch covering rate relative to traditional test method, in the field of business Boundary possesses higher testing efficiency.
Graphic user interface test method proposed by the present invention is compared to the advantage that traditional script edit is tested:
(1) there is relatively better intuitive, user only to need to carry out Freehandhand-drawing i.e. at the interface of software under testing for Freehandhand-drawing identification It can;Tradition, which writes script and generally requires tester, has 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 the special of test user personnel Industry technology requires relatively low.Requirement of the tester for test case Script Programming decreased significantly, and tester can be only Code simply debug.
(3) the invention enables testers higher working efficiency:Tester can intuitively grasp figure Make, compare hand-coding code, can greatly improve the work incentive and working efficiency of tester.
(4) module divides definitely:Traditional-handwork is write in the work of test script, often part of detecting and test Interpretation of result mixes so that there are higher couplings for entire test process, very unfavorable for being multiplexed and changing.
(5) time is saved:It is compared to traditional script exploitation and is easy mistake, debug the problems such as difficult, the present invention is automatic Script is generated, time cost is mainly reflected in screenshotss and drafting action, can significantly save the time.
(6) compare script edit, and the modification of Freehandhand-drawing is very convenient, it is thus only necessary to will draw problematic screenshotss and individually weigh It is multiple to draw, do not have to modification elaborated code, without any coupling sex chromosome mosaicism.
Description of the drawings
Fig. 1 is the basic procedure of the graphical interfaces method for generating test case identified based on Freehandhand-drawing,
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.
Specific implementation mode
It is exemplified below specific embodiments of the present invention, and to step 5 and step 6 complex in the present invention, And the stroke icon defined in Freehandhand-drawing, it is described in more detail.
Testing procedure is illustrated:
Step 1:User opens test software, and selection starts to test, and opens software under testing A.
Step 2:User operates in the normal fashion, and at the starting interface of A, selection enters software, opens menu list, selection Grassroot project inputs " hello world " at interface, clicks ctrl+s, click is exited, end operation.
Step 3:It is 001 that system, which intercepts initial interface, and browsing menu interface is 002 (assuming that menu one shares 5), is created Project interface is 003
Step 4:User browses each sectional drawing again, and specified 001 clicks in button position selection, and target interface is 002; For-all range symbols are selected at 002 interface, are acted to click, it is 003 to specify target interface;It selects to open text at 003 interface This editing machine, " hello, world " are clicked in position button selection, and test target selects " exiting software " for input.
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.The Freehandhand-drawing symbol of system extraction 002, generates assemble of symbol:Action is single-click operation, ranging from menu bar Table recycles, target interface 003.System extracts 003 Freehandhand-drawing symbol, generates assemble of symbol:Action is input text, and point is beaten back Go out, target is " software exits ".
Step 6:System generates finite state machine, and starting point is 001 interface, and 001 is connected to 002 by clicking the side of button; Each menu item generates a line in 002, and side is to click menu item, terminal 003.003 generates a side as input word It clicks and exits again, terminal is the state that software exits.
Step 7:System extracts the access (altogether 10) of each finite state machine, and 10 test access are generated 10 The test case of the script of Lua language, and converged by junit.
Step 8:System preserves the result set of 10 test cases, and saves as expected test result.
Step 9:User waits for software to jump to A softwares and executes test automatically.
Step 10:System generates test result.
Step 11:User checks test result.
The present invention is (as shown in Figure 2) in the specific embodiment of step 5 Freehandhand-drawing Symbol recognition:
Step 5.1: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, system is guessed, user can select to receive the conjecture or throwing of system Abandon Freehandhand-drawing again.After determining action symbol, system converts Freehandhand-drawing to the action symbol being appreciated that and preserves.Simultaneity factor will protect 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 It encloses.For arbitrarily constraining, system will be created on the coordinate of the point of random amount in range;List is arbitrarily constrained, system will List in analytical range generates the coordinate of a point for each list items in list;It is constrained for existing, system exists Any position generates a coordinate in range.For the range symbol of system None- identified, then directly abandons, user is allowed to paint again System.After determining constraint class symbol, system preserves the type of the range and 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 It redirects, then records the number of target interface;If target is interface, variation is expected, can be with according to the expected software that generates The language of understanding saves as the target of finite state machine;If user not specify target, then it is assumed that as long as do not collapse as Pass through.For the target gesture of system None- identified, system is directly abandoned, and user is allowed to 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, along with the information at source interface generates a glossary of symbols, glossary of symbols can indicate to carry out on the interface of source primary Completely there is expected motion action.
The present invention is (as shown in Figure 3) in the specific embodiment of the generating process of step 6 finite state machine:
Step 6.1:First, system generates an empty finite state machine.The glossary of symbols identified according to Freehandhand-drawing is chosen The interface that software test enters is starting point, preserves the symbolic information of start interface, and a node is generated by content of this interface, As the start node of finite state machine, and using this interface as source interface.
Step 6.2:It is chosen at the assemble of symbol on this interface according to source interface, if containing more than one on this interface A assemble of symbol then needs to choose these assemble of symbol one by one, makees the generation on the side of finite state machine respectively.
Step 6.3:Judge whether this assemble of symbol contains Constrained.This assemble of symbol is split, if this A assemble of symbol does not contain restriction range symbol, thens follow the steps 6.4;If this assemble of symbol contains restriction range symbol, Then follow the steps 6.5
Step 6.4:If this assemble of symbol does not contain restriction range symbol, according to the target of this assemble of symbol, A node is generated, the side between being expressed as the two points with the action symbol in assemble of symbol, extended finite state machine.
Step 6.5:If this assemble of symbol contains restriction range symbol, according to the point of restriction range symbol generation Quantity, generates n target and n side, these sides are expressed as reaching the action of each target, these targets can have identical Situation.It is input with current finite state machine, expands finite state machine, system preserves the finite state machine after extension.
Step 6.6:Judge whether the target of this assemble of symbol is termination target.The target of assemble of symbol is classified It discusses, is redirected if target is an interface, then follow the steps 6.7;It is expected if target is a screen change, as long as It asks interface not collapse, thens follow the steps 6.8.
Step 6.7:It is redirected if target is an interface, sets the interface redirected to source interface, continue to execute 6.2, until assemble of symbol all on this interface is all processed.
Step 6.8:If target be screen with itself or only require that interface does not collapse, set this node to Leaf node goes to handle those assemble of symbol if node before also has assemble of symbol not handle, if all nodes Assemble of symbol has all been handled, then terminates this finite state machine, and preserves this finite state machine.
The present invention defines standard Freehandhand-drawing icon as shown in Figure 4 during user's Freehandhand-drawing:
(a) it clicks:The position for drawing point mark is the position that test is clicked, and test software preserves the point of the expression of user's Freehandhand-drawing Coordinate and place screenshotss number.In testing then single-click operation is executed in the coordinate position of preservation.
(b) it double-clicks:The position for drawing point 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 number.In testing then single-click operation is executed in the coordinate position of preservation.
(c) it pulls:The position for drawing point mark is the initial position that test pulls, and the position of blue arrow is the position for pulling terminal It sets, test software preserves the coordinate and place screenshotss number for the beginning and end that user's Freehandhand-drawing indicates.It is then single in actual test Initial position is hit, and the content of initial position is dragged to final position, does not consider whether grammer can pull.
(d) it slides:The position for drawing point mark is the initial position that test pulls, and the position of arrow pulls the position of terminal, Test software preserves the coordinate and place screenshotss number for the beginning and end that user's Freehandhand-drawing indicates.It has then been clicked in actual test Beginning position, and the content of initial position is dragged to final position, do not consider whether grammer can slide.
The present invention provides restriction range gesture as shown in Figure 5, main packet for there is the action of certain repeated characteristic It includes:
(a) arbitrary:It needs a closed figures to determine range, indicates that any point can be used as test within the scope of this The point of generation, system can generate a certain number of points in range at random in practical operation, ensure that selected point is sporadicly spread, be Blanket insurance deposits the coordinate of these points, and action symbol is supplied to be operated.
(b) list is arbitrary:List where symbol meeting automatic identification symbol, and list is parsed, by list point Solution is n rows, and to every a line, system generates a point, it is ensured that this puts the item that can choose list.System preserves these Point is supplied to symbol action to be operated.
(c) exist:It needs a closed figures to determine range, indicates that any point can be used as test within the scope of this The point of generation, system can generate a point in range at random in practical operation, make to act when going to this action each time Coordinate all may it is different, system preserve this point coordinate, be supplied to action symbol to be operated.

Claims (3)

1. a kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification, it is characterised in that the generation method utilizes Freehandhand-drawing Sketch recognition technology is tested to be directed to the graphical interfaces of software, predominantly mobile device software and personal computer software The test of graphical interfaces provides a kind of easy, efficient automatic example generation method, the specific steps are:
Step 1:User opens test software, carries out the selection of test condition, and open software under testing by test software, surveys It tries to enter backstage after software is opened, user enters software to be tested, it is ensured that exists simultaneously software under testing in the process of mobile device And test software, and system is reserved with the data collection before enough space progress software tests and test job is required Memory, using the permission for needing to possess the execution that backstage is kept, into after software under testing, user prepares to start the screenshotss stage;
Step 2:After user enters software under testing, software is operated in a normal way, user is necessary to ensure that for all Need interface to be tested all at least opened primary;It might have certain delay interim card in actual mechanical process, user is true Each interface to be measured is recognized by after sectional drawing, is closed software under testing, is returned to test software;
Step 3:For user while foreground and software under testing interact, test software carries out shot operation on backstage, works as survey When examination software detection has significant difference to current interface and a upper interface, start sectional drawing, whether test software detects sectional drawing Through by previous shot operation preservation, sectional drawing being numbered if not preserving, and is stored in test software, sectional drawing Number ensure uniqueness when software under testing each time is run;
Step 4:User executes Freehandhand-drawing process, and system shows that the interface of user's screenshotss, user can be according to certainly according to screenshotss sequence Oneself demand adjustment screenshotss sequence, but the number of screenshotss is unable to adjust, the behavior that user tests as needed carries out on interface Simple Freehandhand-drawing, Freehandhand-drawing are divided into three phases;
Step 5:System separates the stroke of the three phases of a Freehandhand-drawing, identifies these three strokes, they are standardized as be After intelligible content of uniting, action symbol is generated respectively, range constraint symbol, the satellite information of aiming symbol and symbol;Such as The Freehandhand-drawing of fruit system None- identified user, then can guess hand-drawing graphics, user is allowed to determine whether the Freehandhand-drawing, Yong Huke To preserve conjecture Freehandhand-drawing or abandon Freehandhand-drawing again, then these symbols are synthesized an assemble of symbol by system, have been supplied to It limits state machine and carries out model construction;
Step 6:System generates finite state machine, and the initial interface after system Selection Software first is opened is rising for finite state machine Initial point chooses the assemble of symbol in starting point by source interface of starting point, if not including restriction range in assemble of symbol, with Source interface is starting point, is acted as side, and target is terminal extended finite state machine;If containing restriction range in assemble of symbol, N side and n terminal are generated according to the type of restriction range, then judges the type of terminal, if terminal is an interface, Continue this operation by source interface of terminal, until this finite state machine does not contain also un-added assemble of symbol;If eventually Point is expected for a screen change, then using this interface as a leaf node, terminates this finite state machine;
Step 7:Test case script is generated, system is extracted from the finite state machine simplified, with the starting point of state machine For starting position, arbitrary leaf node is terminal, extracts a sequence for including any amount action, this sequence can be mapped as The sequence of operation redirected between the different interfaces of tested software in reality;System preserves the serial number of this sequence, and repeats This process for extracting and numbering ensures all at least to extract everything into primary rear stopping;By the sequence of all extractions according to According to the syntax rule of Lua scripts, test script is generated according to the actual conditions of target interface, former interface and action, each Script will include the everything for extracting sequence, and all Lua scripts of generation are integrated, automatically generated by system Junit tests code, waits pending test process;
Step 8:Test target is generated, the target of the test script of number is collected separately system, by test script and test mesh Mark corresponds, and the target for generating test script is expected, and they are packaged together, generates test general objective;
Step 9:User keeps the posterior process of test software not close, and test software is opened in selection, and system will execute guarantor automatically The test script deposited, the automatic perform script of user's waiting system;User only needs to return in system prompt in measuring executing process Software is reloaded when to initial interface, after the completion of prompting to test, system waits automatic rebound test software to be generated Test output result;
Step 10:System is divided into five classes according to the situation in measuring executing process, by the test result of each action:Test is logical It crosses, fail, alerting, is mistake, undefined;
System summarizes all test results, generates test result report, while preserving the former interface of non-successful test, action Type and coordinate, target interface;
Step 11:System shows that test report document, user can additionally check each test action in test software Test result, fail wrong or successful execution journal, and for different test results, user can return according to report file It traces back to specific interface and the action carried out at the interface and target interface, to determine the mistake of software and correct in time.
2. a kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification according to claim 1, feature exist In the step 4:During user executes Freehandhand-drawing, Freehandhand-drawing is divided into three phases;First stage user determines what needs carried out Operational motion, the action behavior of mobile terminal:It clicks, double-clicks, pull, long-press, keyboard input behavior all preserves in test software There are behavior mapping, Freehandhand-drawing rule to be provided by system, user carries out mould according to gesture as defined in test software on the interface of screenshotss Quasi- operation, test software are identified according to the figure of user's Freehandhand-drawing, record the figure of user's Freehandhand-drawing, graphics critical position Screenshot picture number where coordinate and Freehandhand-drawing, is stored as an action sequence;Second stage is the optional stage, determines action Covenant of works beam range to every sub- option in drop-down menu click or specified region any position is clicked Operation behavior, test software Additional definitions " for-all ", " arbitrary ", " presence " range symbol are selected for user;Phase III Act target to determine, for the action for thering is interface to redirect, user can additional required movement target interface screenshotss number, Target can also be an expection for screen change;If there is a word, a certain on screen in some region on screen There is a color change or screen software and does not collapse in block, user can on software selection target.
3. a kind of graphical interfaces method for generating test case based on Freehandhand-drawing identification according to claim 1, feature exist In the step 10:System is divided into five classes according to the situation in measuring executing process, by the test result of each action, has Body is:
1) tests pass through:If going to test action, and stuck without occurring, sudden strain of a muscle is moved back, and is restarted and is waited collapse cases, and It being predefined if there is what interface redirected, then redirects interface and be recognized by the system, the intended result interface cut and pre-saved coincide, When undefined interface redirects, the case where only considering whether to collapse;
2) fails:If go to test action, but occur when executing this test action it is accumulative three times or more stuck, Sudden strain of a muscle is moved back, the collapse case restarted, then it is assumed that this test result fails;
3) is alerted:One occurs when if going to test action, but test this action to collapse condition twice, then by this Test result is defined as alerting, overstriking operation of recording type and coordinate, and it is bug or design error to allow user to judge;
4) mistakes:If going to test action, collapse condition does not occur for measuring executing process, but target interface can not be known Not or target interface is with it is expected that interface is inconsistent, then the test result for defining this action is error;
5) is undefined:If due to the failure, warning or mistake of test action before, a certain item original interface is caused not reach, Or since some accidental causes make certain test that can not be performed, then the test result for defining this action is undefined.
CN201610408581.1A 2016-06-12 2016-06-12 Graphical interfaces method for generating test case based on Freehandhand-drawing identification Active CN106095679B (en)

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 CN106095679A (en) 2016-11-09
CN106095679B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
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
US9934129B1 (en) * 2017-03-17 2018-04-03 Google Llc Determining application test results using screenshot metadata
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

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
Overview of Graphical Operational Profiles for Generating Test Cases of GUI Software;Yuma Namba etc.;《2015 16th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing》;20150806;全文 *
基于语义的多领域草图符号识别研究;李路;《中国优秀硕士学位论文全文数据库信息科技辑》;20120815;第2012年卷(第8期);I138-952 *

Also Published As

Publication number Publication date
CN106095679A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106095679B (en) Graphical interfaces method for generating test case based on Freehandhand-drawing identification
Amalfitano et al. A general framework for comparing automatic testing techniques of Android mobile apps
US6654950B1 (en) Software rehosting system and method
CN105512023B (en) A kind of Monkey test method and device
CN101295280B (en) Automatic software debugging method and system
CN104809056B (en) A kind of generation method and device of interface testing code
US20150339213A1 (en) Automated testing of an application system
US20180173614A1 (en) Technologies for device independent automated application testing
CN102804147A (en) Code inspection executing system for performing a code inspection of ABAP source codes
US10296444B1 (en) Methods and systems for testing mobile applications for android mobile devices
US20020091968A1 (en) Object-oriented data driven software GUI automated test harness
US20070094541A1 (en) Method and apparatus for generating test execution sequences automatically for a software testing process
JPH02272645A (en) Method for supporting program debugging
CN106681919B (en) A kind of user interface automated testing method and system
US11650799B2 (en) Remote application modernization
CN106951368A (en) Automatic example generation method based on UML timing diagrams
CN108399124A (en) Application testing method, device, computer equipment and storage medium
CN106599695B (en) A kind of bootable semiology analysis leak detection method merged based on path
CN106874208A (en) The processing method of test script, device and electronic equipment
US10073764B1 (en) Method for instruction sequence execution analysis and visualization
Yan et al. Widget-sensitive and back-stack-aware GUI exploration for testing android apps
CN103455672B (en) A kind of FPGA emulation testing use-case automatization homing method
Givens et al. Exploring the internal state of user interfaces by combining computer vision techniques with grammatical inference
US10430309B2 (en) Duplicating a task sequence from a graphical user interface interaction for a development application in view of trace data
CN111143205A (en) Android platform-oriented test case automatic generation method and generation system

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