CN105988934B - Hand swims automated detection method and device - Google Patents

Hand swims automated detection method and device Download PDF

Info

Publication number
CN105988934B
CN105988934B CN201610071338.5A CN201610071338A CN105988934B CN 105988934 B CN105988934 B CN 105988934B CN 201610071338 A CN201610071338 A CN 201610071338A CN 105988934 B CN105988934 B CN 105988934B
Authority
CN
China
Prior art keywords
test
controls
user interface
current operation
hand
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
CN201610071338.5A
Other languages
Chinese (zh)
Other versions
CN105988934A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610071338.5A priority Critical patent/CN105988934B/en
Publication of CN105988934A publication Critical patent/CN105988934A/en
Application granted granted Critical
Publication of CN105988934B publication Critical patent/CN105988934B/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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The present invention provides a kind of hand trip automated testing method, and it includes obtaining preset components testing decision tree which, which swims automated testing method,;The current operation interface for obtaining and parsing hand trip, to obtain the user interface controls at current operation interface;And using the corresponding components testing rule in current operation interface in components testing decision tree, click test is carried out to the user interface controls at current operation interface.The present invention also provides a kind of hands to swim automatic test device.Test is clicked in the automation that the hand trip automated testing method and test device of the present invention carries out hand trip by components testing decision tree, realizes the automation adaptation test of hand trip.

Description

Hand swims automated detection method and device
Technical field
The present invention relates to hands to swim detection field, and automated detection method and device are swum more particularly to a kind of hand.
Background technology
Existing hand trip automation adaptation test, mainly uses the test method and testing tool of common application, this A little test methods and testing tool can correspond to the Standard user interfaces control used and be identified and operate, such technology people Member can achieve the purpose that carry out automatic test to application by writing corresponding script.
But the exploitation of hand trip and common application difference, it is swum for many hands, technical staff can use Unity game engines It is developed, without using the user interface controls of standard to be developed.Lead to partial test tool None- identified hand in this way User interface controls in trip, and then the automation that existing test method and testing tool can not be used to carry out hand trip is adapted to Test.
Invention content
The embodiment of the present invention provide a kind of automation adaptation test of achievable hand trip hand trip automated detection method and Device;Technology to solve the automation adaptation test that existing hand trip automated detection method and device can not carry out hand trip is asked Topic.
The embodiment of the present invention provides a kind of hand trip automated testing method comprising:
Preset components testing decision tree is obtained, wherein the components testing decision tree includes each operation interface of hand trip Components testing rule;
The current operation interface for obtaining and parsing the hand trip, to obtain the user interface control at the current operation interface Part;And
Using the corresponding components testing rule in current operation interface described in the components testing decision tree, to described The user interface controls at current operation interface carry out click test.
The embodiment of the present invention also provides a kind of hand trip automatic test device comprising:
Decision tree acquisition module, for obtaining preset components testing decision tree, wherein the components testing decision tree packet Include the components testing rule of each operation interface of hand trip;
User interface controls acquisition module, the current operation interface for obtaining and parsing the hand trip, described in acquisition The user interface controls at current operation interface;And
Test module, for being surveyed using the corresponding control in current operation interface described in the components testing decision tree The user interface controls at the current operation interface are carried out click test by examination rule.
Hand trip automated detection method and device compared to the prior art, hand of the invention swim automated detection method and Test is clicked in the automation that device carries out hand trip by components testing decision tree, realizes the automation adaptation test of hand trip;Solution Existing hand trip automated detection method is determined and the technical issues of device can not carry out the automation adaptation test of hand trip.
Description of the drawings
Fig. 1 is the flow chart that the hand of the present invention swims the first preferred embodiment of automated detection method;
Fig. 2 is the flow chart that the hand of the present invention swims the second preferred embodiment of automated detection method;
Fig. 3 is the flow chart for the step S206 that the hand of the present invention swims the second preferred embodiment of automated detection method;
Fig. 4 is the flow chart for the step S302 that the hand of the present invention swims the second preferred embodiment of automated detection method;
Fig. 5 is the determination flow that the hand of the present invention swims the covering layer in the second preferred embodiment of automated detection method;
Fig. 6 be the present invention hand swim automated detection method the second preferred embodiment step S303 flow chart it One;
Fig. 7 be the present invention hand swim automated detection method the second preferred embodiment step S303 flow chart it Two;
Fig. 8 carries out simulation in the second preferred embodiment for the hand trip automated detection method of the present invention and clicks the stream tested Cheng Tu;
Fig. 9 is the structural schematic diagram that the hand of the present invention swims the first preferred embodiment of automatic detection device;
Figure 10 is the structural schematic diagram that the hand of the present invention swims the second preferred embodiment of automatic detection device;
Figure 11 is the structural representation for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device One of figure;
Figure 12 is the effective interaction for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device The structural schematic diagram of control acquiring unit;
Figure 13 is the covering layer decision-making function part that the hand of the present invention swims the second preferred embodiment of automatic detection device Structural schematic diagram;
Figure 14 is the test cell for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device One of structural schematic diagram;
Figure 15 is the test cell for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device Second structural representation;
Figure 16 is the structural representation for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device The two of figure;
Figure 17 is the structural representation for the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device The three of figure;
Figure 18 A, Figure 18 B are that the hand of the present invention swims automated detection method and the use of the specific embodiment of detection device is shown It is intended to;
Figure 19 is the working environment structural schematic diagram that the hand of the present invention swims the electronic equipment where automatic detection device.
Specific implementation mode
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the present invention is to implement one It is illustrated in computing environment appropriate.The following description be based on illustrated by the specific embodiment of the invention, should not be by It is considered as the limitation present invention other specific embodiments not detailed herein.
In the following description, specific embodiments of the present invention will be referred to by the operation performed by one or multi-section computer The step of and symbol illustrate, unless otherwise stating clearly.Therefore, these steps and operation be will appreciate that, carried for several times wherein having Include by representing with the computer disposal list of the electronic signal of the data in a structuring pattern to be executed by computer Member is manipulated.At this manipulation transforms data or the position being maintained in the memory system of the computer, it can match again It sets or in addition changes the running of the computer in a manner familiar to those skilled in the art.The data knot that the data are maintained Structure is the provider location of the memory, has the specific feature defined in the data format.But the principle of the invention is with above-mentioned Word illustrates, is not represented as a kind of limitation, those skilled in the art will appreciate that plurality of step as described below and Operation also may be implemented in hardware.
The present invention hand trip automatic detection device various electronic equipments can be used to be implemented, the electronic equipment include but It is not limited to personal computer, server computer, hand-held or laptop devices, mobile device (such as mobile phone, a number Word assistant (PDA), media player etc.), multicomputer system, consumer electronic devices, minicomputer, mass computing Machine includes the distributed computing environment, etc. of above-mentioned arbitrary system or equipment.But the electronic equipment is preferably hand trip detection service Device, to improve the compatibility and validity that hand swims automatic detection.
Fig. 1 is please referred to, Fig. 1 is the flow chart that the hand of the present invention swims the first preferred embodiment of automated detection method.This Above-mentioned electronic equipment can be used to be implemented for the hand trip automated detection method of preferred embodiment.The hand swims automatic detection side Method includes:
Step S101 obtains preset components testing decision tree, and wherein components testing decision tree includes each behaviour of hand trip Make the components testing rule at interface;
Step S102 obtains and parses the current operation interface of hand trip, to obtain the user interface control at current operation interface Part;
Step S103, using the corresponding components testing rule in current operation interface in components testing decision tree, to currently grasping The user interface controls for making interface carry out click test.
The following detailed description of the detailed process of each step of the hand trip automated detection method of this preferred embodiment.
In step S101, hand swims the components testing decision tree that automatic detection device obtains user preset, the wherein control Part test decision tree includes the components testing rule of each operation interface of hand trip.The components testing rule may include current operation Click test weight of all effective interactive controls at interface etc..Then pass to step S102.
In step s 102, hand trip automatic detection device obtains and parses the current operation interface of hand trip, is swum with defensive position Automatic detection device obtains the user interface controls in current operation interface using Software Development Kit.Then pass to step S103。
In step s 103, hand trip automatic detection device uses in the components testing decision tree obtained in step S101 The user interface controls at current operation interface are carried out click test by the corresponding components testing rule in current operation interface.In this way User can be avoided by improving the compatibility and testing efficiency that hand swims automatic test to the setting of components testing decision tree The problem of user interface controls None- identified, occurs.
The hand trip automatic detection process of the hand trip automated detection method of this preferred embodiment is completed in this way.
The hand trip automated detection method of this preferred embodiment carries out the automation point of hand trip by components testing decision tree Test is hit, the automation adaptation test of hand trip is realized.
Fig. 2 is please referred to, Fig. 2 is the flow chart that the hand of the present invention swims the second preferred embodiment of automated detection method.This Above-mentioned electronic equipment can be used to be implemented for the hand trip automated detection method of preferred embodiment.The hand swims automatic detection side Method includes:
Step S201 obtains the user interface controls tree at predetermined registration operation interface by Software Development Kit;
Step S202 parses user interface controls tree, obtains all interactive controls in user interface controls tree;
Step S203, at least one of user interface controls tree interactive controls setting control test order, to be formed Components testing decision tree;
Step S204 obtains preset components testing decision tree, and wherein components testing decision tree includes each behaviour of hand trip Make the components testing rule at interface;
Step S205 obtains and parses the current operation interface of hand trip, to obtain the user interface control at current operation interface Part;
Step S206, using the corresponding components testing rule in current operation interface in components testing Policy Tree, to currently grasping The user interface controls for making interface carry out click test;
Step S207 after clicking test, judges whether that appearance test is abnormal, does not occur test exception such as, then return to step Rapid S205;It is abnormal such as to there is test, then goes to step S208;
Step S208, after prompting exception information or recording exceptional information, opponent's trip carries out reset operation.
The following detailed description of the detailed process of each step of the hand trip automated detection method of this preferred embodiment.
In step s 201, hand trip automatic detection device passes through Software Development Kit (SDK, Software Development Kit) obtain hand trip predetermined registration operation interface user interface controls tree, i.e., hand trip pre-set user operation circle The control set in face.Then pass to step S202.
In step S202, hand trip automatic detection device solves the user interface controls tree that step S201 is obtained Analysis obtains all interactive controls in user interface controls tree.Then pass to step S203.
In step S203, hand swim automatic detection device in the user interface controls tree that is obtained in step S202 extremely Weight is tested in a few interactive controls setting control test order, such as the click of the part interactive controls of each operation interface, To form components testing decision tree.Then pass to step S204.
In step S204, when carrying out hand trip automatic detection, hand swims automatic detection device obtaining step S203 shapes At components testing decision tree.Then pass to step S205.
In step S205, hand trip automatic detection device obtains and parses the current operation interface of hand trip, is swum with defensive position Automatic detection device obtains the user interface controls in current operation interface using Software Development Kit.Then pass to step S206。
In step S206, hand trip automatic detection device uses in the components testing decision tree obtained in step S204 The user interface controls at current operation interface are carried out click test by the corresponding components testing rule in current operation interface.In this way User can be avoided by improving the compatibility and testing efficiency that hand swims automatic test to the setting of components testing decision tree The problem of user interface controls None- identified, occurs.
Specific to please refer to Fig. 3, Fig. 3 is the step of hand of the present invention swims the second preferred embodiment of automated detection method The flow chart of S206.Step S206 includes:
Step S301, hand trip automatic detection device parse the user interface controls tree at current operation interface, with Obtain all user interface controls in user interface controls tree;It is such as swum by such as Unity3D game engines opponent current The user interface controls tree of operation interface is parsed, to obtain all user interface controls in user interface controls tree, i.e., GameObject nodes.Then pass to step S302.
Step S302, hand swim automatic detection device according to the control property of the step S301 user interface controls obtained with And control depth, obtain effective interactive controls in all user interface controls.
Specific to please refer to Fig. 4, Fig. 4 is the step of hand of the present invention swims the second preferred embodiment of automated detection method The flow chart of S302;Step S302 is specifically included:
Step S401, hand trip automatic detection device judges whether user interface controls are state of activation, such as user circle Face control is active, and the user interface controls have display content in the display screen that hand is swum, then go to step S402;Otherwise step S405 is gone to.
Step S402, if user interface controls are state of activation, and user interface controls have in the display screen that hand is swum There is display content, then hand trip automatic detection device judges whether the user interface controls can interact, such as the user interface controls Including Colider components, UIButton components, UIEventListener components, UIImageButton components, UIScrollView components, UIScroolBar components and UIToggle components.Then think that the user interface controls can interact, Go to step S403;Otherwise it is assumed that the user interface controls can not interact, step S405 is gone to.
Step S403, if user interface controls can interact, then hand swims automatic detection device according to the user interface controls Control depth, judge the user interface controls whether covered layer covering.It can be by returning to user interface controls RaycastDepth values, the depth value of the child node of the user interface controls or the Z axis seat for directly returning to the user interface controls The modes such as mark obtain the control depth of user interface controls.It subsequently determines whether the control depth of user interface controls is more than to cover The depth of layer, if the control depth of user interface controls is less than the depth of covering layer, then the not covered layer of user interface controls covers Lid, goes to step S404;Otherwise step S405 is gone to.
Step S404, such as the not covered layer covering of user interface controls, user circle is arranged in hand trip automatic detection device Face control is effective interactive controls.
Step S405, such as user interface controls un-activation, user interface controls judgement can not interact or user interface controls Covered layer covering, it is invalid control that the user interface controls, which are arranged, in hand trip automatic detection device.Then pass to step S303.
Step S303, hand swim automatic detection device and use the corresponding control in current operation interface in components testing decision tree Test order carries out random click to effective interactive controls at current operation interface and tests.
Specific to please refer to Fig. 6, Fig. 6 is the step of hand of the present invention swims the second preferred embodiment of automated detection method One of flow chart of S303.Step S303 includes:
Step S601, hand are swum automatic detection device according to components testing rule, are obtained effective in current operation interface The test weight of interactive controls, the i.e. click of effective interactive controls at current operation interface test weight.Then pass to step S602。
Step S602, hand swim test weight of the automatic detection device according to the step S601 effective interactive controls obtained, Random click is carried out to effective interactive controls at current operation interface to test;And after random click test, to what is clicked The test weight of effective interactive controls carries out weight adjustment, is such as carried out to the click test weight for the effective interactive controls clicked Reduction appropriate so that the click test probability of different effectively interactive controls is more nearly preset value.
If the A pages include effective interactive controls a, effective interactive controls b and effective interactive controls c, effective interactive controls A, the test weight of effective interactive controls b and effective interactive controls c are 10.Then hand trip automatic detection device with three/ One probability carries out random click to effective interactive controls a, effective interactive controls b and effective interactive controls c and tests.And such as Effective interactive controls a is clicked, then the test weight of effective interactive controls a can be changed to 9.
Random click test is carried out to all effective interactive controls by weight is tested, can effectively be avoided certain effective Interactive controls are covered due to specific condition ineffective treatment, such as covered layer.Random click test can be effectively improved in this way Success rate.
Preferably, the components testing rule at current operation interface may be in current operation interface in components testing decision tree Certain effective interactive controls be not provided with corresponding test weight.At this moment effective interactive controls at current operation interface are carried out It is random to click test, need the effective interactive controls for not having setting in these components testing decision trees to carry out additional setting.Tool Body please refers to Fig. 7, and Fig. 7 is the flow chart for the step S303 that the hand of the present invention swims the second preferred embodiment of automated detection method Two.Step S303 includes:
Step S701, hand swim automatic detection device according to components testing rule, obtain effective friendship at current operation interface The first pre- weight of test of mutual control;The first pre- weight of test is obtained according to components testing decision tree.Then pass to step S702。
Step S702, hand swims effective interactive controls in automatic detection device traversal current operation interface, according to effective The control type and number of clicks of interactive controls determine the pre- power of the second test of effective interactive controls in current operation interface Weight.Accordingly even when effective interactive controls in current operation interface are weighed in components testing decision tree without the corresponding test of setting Weight, also directly can determine effective interactive controls according to the control type of effective interactive controls and number of clicks second are surveyed Try pre- weight.Then pass to step S703.
Step S703, it is pre- according to the first of the step S701 effective interactive controls obtained the test that hand swims automatic detection device The second pre- weight of test of effective interactive controls that weight and step S702 are obtained, calculates the test power of effective interactive controls Weight.If effective interactive controls have the first pre- weight of test, then use the first pre- weight of test as effective interactive controls Test weight;Such as effective interactive controls do not have the first pre- weight of test, then use the second pre- weight of test effective as this The test weight of interactive controls.Then pass to step S704.
Step S704, hand swim test weight of the automatic detection device according to the step S703 effective interactive controls obtained, Random click is carried out to effective interactive controls at current operation interface to test;And after random click test, to what is clicked The first pre- weight of test of effective interactive controls carries out weight adjustment, such as clicks and surveys to the first of the effective interactive controls clicked It tries pre- weight and carries out reduction appropriate so that the click test probability of different effectively interactive controls is more nearly preset value.Due to The second pre- weight of test is to be generated in real time by the control type and number of clicks of effective interactive controls, therefore such as surveyed by second It tries pre- weight and generates test weight, then do not need the pre- weight of the second test and carry out weight adjustment.
If the A pages include effective interactive controls a, effective interactive controls b and effective interactive controls c, effective interactive controls a The first pre- weight of test be 10, the first pre- weight of test of effective interactive controls b is 10, and effective interactive controls c is without first Pre- weight is tested, according to the control type and number of clicks of effective interactive controls, calculates the second test of effective interactive controls c Pre- weight is 10.Then hand swims automatic detection device with the probability of one third to effective interactive controls a, effective interactive controls b And effectively interactive controls c carries out random click and tests.Such as click effective interactive controls a, then it can be by effective interactive controls a's The first pre- weight of test is changed to 9.Effective interactive controls c is such as clicked, then the number of clicks of effective interactive controls c is repaiied Change.
Random click test is carried out to all effective interactive controls by the pre- weight of the first test and the second pre- weight of test, Certain effective interactive controls can effectively avoided since specific condition is invalidated simultaneously, it can also be to components testing decision tree In there is no effective interactive controls of setting to carry out random clicking test.Then pass to step S207.
In step S207, after hand swims the click test of automatic detection device judgment step S206, display screen is No appearance test is abnormal, such as hand trip collapse or hand trip are without response;It is abnormal such as to there is test, then goes to step S208;As do not gone out It is now abnormal, then step S205 is gone to, the user interface controls test of other operation interfaces of hand trip is continued, until test knot Beam, such as user terminates or the testing time terminates.
In step S208, such as in step S207, there is test exception in display screen, then hand swims automatic detection device After prompting exception information or recording exceptional information, opponent's trip carries out reset operation, so that technical staff is handled in time.
The hand trip automatic detection process of the hand trip automated detection method of this preferred embodiment is completed in this way.
The decision process of covering layer in current operation interface is illustrated below.Fig. 5 is please referred to, Fig. 5 is of the invention Hand swims the determination flow of the covering layer in the second preferred embodiment of automated detection method.To user interface controls whether be During effective interactive controls, hand swims whether automatic detection device is also simultaneously that covering layer is sentenced to user interface controls Disconnected, detailed process includes:
Step S501, hand trip automatic detection device judge whether user interface controls have frame assembly, i.e., BoxColider components;Such as there is frame assembly, then go to step S502;Do not have frame assembly such as, then goes to step S505.
Step S502, if user interface controls have frame assembly, then hand trip automatic detection device passes through to user circle The video camera (Camera) that face control is rendered, obtains the position of corresponding frame assembly on the display screen, to obtain The display area of the frame assembly;Then pass to step S503.
Whether the display area of the frame assembly obtained in step S503, hand trip automatic detection device judgment step S502 Whether it is more than the first setting value more than the first setting value, such as 80%, such as the display area of frame assembly, then goes to step S504; If the display panel of frame assembly is less than or equal to the first setting value, then step S505 is gone to.
Step S504, since the display panel of frame assembly is larger, hand trip automatic detection device judges the user Interface control is covering layer.
Step S505, the display area as user interface controls do not have frame assembly or frame assembly is smaller, then hand is swum Automatic detection device judges that user interface controls are non-covering layer.
The decision process of the covering layer in this preferred embodiment is completed in this way.
Preferably, in step S206, hand swim automatic detection device to the user interface controls at current operation interface into Test is clicked in row automation.It can be that test or virtual click test are clicked in simulation that test is clicked in the automation.
When test is clicked in automation clicks test for simulation, Fig. 8 is please referred to, Fig. 8 is the hand trip automation inspection of the present invention The flow chart that test is clicked in simulation is carried out in second preferred embodiment of survey method.It includes:
Step S801, hand swim the gaming world coordinate that automatic detection device obtains user interface controls.Such as user circle Face control is two-dimentional control, and such as the NGUI controls of rectangle, then hand trip automatic detection device obtains pair of the user interface controls Answer the world coordinates on four vertex of rectangle.Such as user interface controls are three-dimensional control, as the user interface controls include MeshFilter components, Boxcolider components or Render components, then hand trip automatic detection device obtain the user interface The world coordinates on eight vertex of the correspondence cuboid of control.Then pass to step S802.
Step S802, hand, which is swum automatic detection device and obtained by the video camera rendered, turns above-mentioned world coordinates It is changed to screen coordinate.The centre coordinate of the world coordinates on four vertex is such as converted into screen coordinate or by the world on eight vertex The centre coordinate of coordinate is converted to screen coordinate.Then pass to step S803.
Step S803, the screen coordinate that hand trip automatic detection device is obtained according to step S802, to current operation interface User interface controls carry out simulation click test.
When it is virtual click test that test is clicked in automation, hand trip automatic detection device then passes through call operation system The interface of offer carries out virtual click test to the user interface controls at current operation interface.Specially:
Hand trip automatic detection device is built according to parameter set by user first clicks test event;It is automatic with defensive position trip Change detection device and corresponding game display module is obtained by game engine, such as UnityPlayer objects;Then it tests clicking Event and the calling logic relationship of game display module are packaged processing;Most defensive position swims automatic detection device call operation system The interface provided of uniting carries out virtual click test by display module of playing to the click test event after encapsulation process.
On the basis of first preferred embodiment, the hand trip automated detection method of this preferred embodiment controls effectively interaction Part is identified, carries out timely processing to test weight progress adjustment in real time and to test is abnormal, further improves certainly The compatibility and accuracy of dynamicization test.
The present invention also provides a kind of hands to swim automatic detection device, please refers to Fig. 9, and Fig. 9 is the hand trip automation of the present invention The structural schematic diagram of the first preferred embodiment of detection device.The hand trip automatic detection device of this preferred embodiment can be used The first preferred embodiment for the hand trip automated detection method stated is implemented.It includes decision that the hand, which swims automatic detection device 90, Set acquisition module 91, user interface controls acquisition module 92 and test module 93.
For decision tree acquisition module 91 for obtaining preset components testing decision tree, wherein components testing decision tree includes hand The components testing rule of each operation interface of trip.User interface controls acquisition module 92 is used to obtain and parse the current of hand trip Operation interface, to obtain the user interface controls at current operation interface.Test module 93 is used for using in components testing decision tree The user interface controls at current operation interface are carried out click test by the corresponding components testing rule in current operation interface.
The hand trip automatic test device 90 of this preferred embodiment is in use, decision tree acquisition module 91 obtains user first Preset components testing decision tree, wherein the components testing decision tree include the components testing rule of each operation interface of hand trip Then.The components testing rule may include click test weight of all effective interactive controls at current operation interface etc..
Subsequent user interface controls acquisition module 92 obtains and parses the current operation interface of hand trip, and user interface control Part acquisition module 92 obtains the user interface controls in current operation interface using Software Development Kit.
Current operation interface in the components testing decision tree that last test module 93 is obtained using decision tree acquisition module The user interface controls at current operation interface are carried out click test by corresponding components testing rule.User can be by right in this way The setting of components testing decision tree improves the compatibility and testing efficiency of hand trip automatic test, avoids user interface controls The problem of None- identified, occurs.
The hand trip automatic detection process of the hand trip automatic detection device 90 of this preferred embodiment is completed in this way.
The hand trip automatic detection device of this preferred embodiment carries out the automation point of hand trip by components testing decision tree Test is hit, the automation adaptation test of hand trip is realized.
Figure 10 is please referred to, Figure 10 is the structural representation that the hand of the present invention swims the second preferred embodiment of automatic detection device Figure.The second preferred reality of above-mentioned hand trip automated detection method can be used in the hand trip automatic detection device of this preferred embodiment Example is applied to be implemented.It includes control tree acquisition module 101, interactive controls acquisition module that the hand, which swims automatic detection device 100, 102, decision tree formed module 103, decision tree acquisition module 104, user interface controls acquisition module 105, test module 106, The abnormal judgment module 107 of test, jump module 108 and reseting module 109.
Control tree acquisition module 101 is used to obtain the user interface controls at predetermined registration operation interface by Software Development Kit Tree.Interactive controls acquisition module 102 obtains all in user interface controls tree for being parsed to user interface controls tree Interactive controls.Decision tree forms module 103 and is used to survey at least one of user interface controls tree interactive controls setting control Examination rule, to form components testing decision tree.Decision tree acquisition module 104 is used to obtain preset components testing decision tree, Middle components testing decision tree includes the components testing rule of each operation interface of hand trip.User interface controls acquisition module 105 Current operation interface for obtaining and parsing hand trip, to obtain the user interface controls at current operation interface.Test module 106 For using the corresponding components testing rule in current operation interface in components testing decision tree, to user circle at current operation interface Face control carries out click test.After the abnormal judgment module 107 of test is used to click test, judge whether test exception occur. Jump module 108 is used to as do not occurred test exception, then jump to user interface controls acquisition module.Reseting module 109 is used for It is abnormal such as to there is test, then reset operation is carried out to hand trip after prompting exception information or recording exceptional information.
Figure 11 is please referred to, Figure 11 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device One of structural schematic diagram.The test module 106 includes resolution unit 111, effective interactive controls acquiring unit 112 and test Unit 113.
Resolution unit 111 is for parsing the user interface controls tree at current operation interface, to obtain user interface All user interface controls in control tree.Effective interactive controls acquiring unit 112 is for the control according to user interface controls Attribute and control depth obtain effective interactive controls in all user interface controls.Test cell 113 is used to use control The corresponding components testing rule in current operation interface, carries out a little effective interactive controls at current operation interface in test decision tree Hit test.
Figure 12 is please referred to, Figure 12 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device Effective interactive controls acquiring unit structural schematic diagram.Effective interactive controls acquiring unit 112 judges including state of activation Subelement 121, interaction judgment sub-unit 122, Covering judgment subelement 123 and effective interactive controls obtain subelement 124.
State of activation judgment sub-unit 121 is for judging whether user interface controls are state of activation.Interaction judges that son is single Member 122 is state of activation for such as user interface controls, then judges whether user interface controls can interact.Covering judgment subelement 123 can interact for such as user interface controls, then according to the control depth of user interface controls, whether judge user interface controls Covered layer covering.Effective interactive controls obtain subelement 124 and are used for the not covered layer covering of such as user interface controls, then are arranged User interface controls are effective interactive controls.
Figure 14 is please referred to, Figure 14 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device One of the structural schematic diagram of test cell.The test cell 113 includes test Weight Acquisition subelement 141 and the first test Subelement 142.
Weight Acquisition subelement 141 is tested for according to components testing rule, obtaining effective friendship in current operation interface The test weight of mutual control.First test subelement 142 is used for the test weight according to effective interactive controls, to current operation circle Effective interactive controls in face carry out click test, and the test weight of effective interactive controls to having clicked carries out weight adjustment.
Figure 15 is please referred to, Figure 15 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device Test cell second structural representation.The test cell 113 tests pre- Weight Acquisition subelement 151, second including first Test pre- Weight Acquisition subelement 152, test weight calculation subelement 153 and the second test subelement 154.
The first pre- Weight Acquisition subelement 151 of test is used to, according to components testing rule, obtain in current operation interface The first pre- weight of test of effective interactive controls.The second pre- Weight Acquisition subelement 152 of test is for traversing current operation interface In effective interactive controls determined in current operation interface according to the control type and number of clicks of effective interactive controls The second pre- weight of test of effective interactive controls.Weight calculation subelement 153 is tested for according to the first of effective interactive controls Pre- weight and the second pre- weight of test are tested, the test weight of effective interactive controls is calculated.Second test subelement 154 is used for According to the test weight of effective interactive controls, click test is carried out to effective interactive controls at current operation interface, and to point The first pre- weight of test of the effective interactive controls hit carries out weight adjustment.
The hand of this preferred embodiment swims automatic test device 100 in use, control tree acquisition module 101 is by soft first Part development kit (SDK, Software Development Kit) obtains the user interface control at the predetermined registration operation interface of hand trip Part tree, i.e. hand swim the control set in pre-set user operation interface.
The user interface controls tree that subsequent interactive controls acquisition module 102 obtains control tree acquisition module 101 solves Analysis obtains all interactive controls in user interface controls tree.
Then decision tree is formed in the user interface controls tree that module 103 obtains interactive controls acquisition module 102 extremely Weight is tested in a few interactive controls setting control test order, such as the click of the part interactive controls of each operation interface, To form components testing decision tree.
Then when carrying out hand trip automatic detection, decision tree acquisition module 104 obtains decision tree and forms the formation of module 103 Components testing decision tree.
Then user interface controls acquisition module 105 obtains and parses the current operation interface of hand trip, subsequent user interface Control acquisition module obtains the user interface controls in current operation interface using Software Development Kit.
Subsequent test module 106 uses the current operation in the components testing decision tree of 104 acquisition of decision tree acquisition module The user interface controls at current operation interface are carried out click test by the corresponding components testing rule in interface.User Ke Tong in this way It crosses and the compatibility and testing efficiency that hand swims automatic test is improved to the setting of components testing decision tree, avoid user interface The problem of control None- identified, occurs.
The click test process is specially:
One, the resolution unit 111 of test module 106 parses the user interface controls tree at current operation interface, with Obtain all user interface controls in user interface controls tree;It is such as swum by such as Unity3D game engines opponent current The user interface controls tree of operation interface is parsed, to obtain all user interface controls in user interface controls tree, i.e., GameObject nodes.
Two, the user interface that effective interactive controls acquiring unit 112 of test module 106 is obtained according to resolution unit 111 The control property and control depth of control, obtain effective interactive controls in all user interface controls.It wherein obtains effective The process of interactive controls is specially:
The state of activation judgment sub-unit 121 of effective interactive controls acquiring unit 112 judge user interface controls whether be State of activation.
Such as the user interface controls are active, and the user interface controls have in the display screen that hand is swum it is aobvious Show content, then the interaction judgment sub-unit 22 of effective interactive controls acquiring unit 112 judges whether the user interface controls can be handed over Mutually.
Such as user interface controls include Colider components, UIButton components, UIEventListener components, UIImageButton components, UIScrollView components, UIScroolBar components and UIToggle components, then it is assumed that the use Family interface control can interact, and the Covering judgment subelement 123 of effective interactive controls acquiring unit 112 is according to the user interface controls Control depth, judge the user interface controls whether covered layer covering.It can be by returning to user interface controls RaycastDepth values, the depth value of the child node of the user interface controls or the Z axis seat for directly returning to the user interface controls The modes such as mark obtain the control depth of user interface controls.It subsequently determines whether the control depth of user interface controls is more than to cover The depth of layer.
If the control depth of user interface controls is less than the depth of covering layer, then the not covered layer of user interface controls covers Lid, it is effective that effective interactive controls of effective interactive controls acquiring unit 112, which obtain subelement 124 user interface controls are arranged, Interactive controls.
Such as user interface controls un-activation, user interface controls judgement can not interact or the covered layer of user interface controls covers Lid, it is invalid control that the user interface controls, which are arranged, in effective interactive controls acquiring unit 112.
Three, test cell 113 is using the corresponding components testing rule in current operation interface in components testing decision tree, to working as Effective interactive controls of preceding operation interface carry out random click and test.Wherein carry out click test process be specially:
The test Weight Acquisition subelement 141 of test cell 113 is obtained according to components testing rule in current operation interface Effective interactive controls test weight, i.e., effective interactive controls at current operation interface click test weight.
First test subelement 142 of subsequent test cell 113 obtains effective according to test Weight Acquisition subelement 141 The test weight of interactive controls carries out random click to effective interactive controls at current operation interface and tests;And it is clicking at random After test, weight adjustment is carried out to the test weight for the effective interactive controls clicked, such as the effective interaction clicked is controlled The click test weight of part carries out reduction appropriate so that the click test probability of different effectively interactive controls is more nearly default Value.
If the A pages include effective interactive controls a, effective interactive controls b and effective interactive controls c, effective interactive controls A, the test weight of effective interactive controls b and effective interactive controls c are 10.Then hand trip automatic detection device with three/ One probability carries out random click to effective interactive controls a, effective interactive controls b and effective interactive controls c and tests.And such as Effective interactive controls a is clicked, then the test weight of effective interactive controls a can be changed to 9.
Random click test is carried out to all effective interactive controls by weight is tested, can effectively be avoided certain effective Interactive controls are covered due to specific condition ineffective treatment, such as covered layer.Random click test can be effectively improved in this way Success rate.
Preferably, the components testing rule at current operation interface may be in current operation interface in components testing decision tree Certain effective interactive controls be not provided with corresponding test weight.At this moment effective interactive controls at current operation interface are carried out It is random to click test, need the effective interactive controls for not having setting in these components testing decision trees to carry out additional setting.This Shi Jinhang clicks the process tested:
The first pre- Weight Acquisition subelement 151 of test of test cell 113 obtains current operation according to components testing rule The first pre- weight of test of effective interactive controls at interface;The first pre- weight of test is obtained according to components testing decision tree.
The second pre- Weight Acquisition subelement 152 of test of subsequent test cell 113 traverses effective in current operation interface Interactive controls determine effective interaction in current operation interface according to the control type and number of clicks of effective interactive controls The second pre- weight of test of control.Accordingly even when effective interactive controls in current operation interface do not have in components testing decision tree There is the corresponding test weight of setting, also directly can determine that this has according to the control type of effective interactive controls and number of clicks Imitate the second pre- weight of test of interactive controls.
Then the test weight calculation subelement 153 of test cell 113 tests pre- Weight Acquisition subelement 151 according to first Effective friendship that the pre- weight of the first test of the effective interactive controls obtained and the second pre- Weight Acquisition subelement 152 of test obtain The second pre- weight of test of mutual control, calculates the test weight of effective interactive controls.As effective interactive controls have first to survey Pre- weight is tried, then uses test weight of the first pre- weight of test as effective interactive controls;Such as effective interactive controls are not With the first pre- weight of test, then test weight of the second pre- weight of test as effective interactive controls is used.
Second test subelement 154 of last test unit 113 obtains effective according to test weight calculation subelement 153 The test weight of interactive controls carries out random click to effective interactive controls at current operation interface and tests;And it is clicking at random After test, weight adjustment is carried out to the first pre- weight of test of the effective interactive controls clicked, it is such as effective to what is clicked The first of interactive controls, which is clicked, tests pre- weight progress reduction appropriate so that the click test probability of different effectively interactive controls It is more nearly preset value.Since the second pre- weight of test is given birth in real time by the control type and number of clicks of effective interactive controls At, therefore test weight is such as generated by the second pre- weight of test, then it does not need the pre- weight of the second test and carries out weight adjustment.
If the A pages include effective interactive controls a, effective interactive controls b and effective interactive controls c, effective interactive controls a The first pre- weight of test be 10, the first pre- weight of test of effective interactive controls b is 10, and effective interactive controls c is without first Pre- weight is tested, according to the control type and number of clicks of effective interactive controls, calculates the second test of effective interactive controls c Pre- weight is 10.Then hand swims automatic detection device with the probability of one third to effective interactive controls a, effective interactive controls b And effectively interactive controls c carries out random click and tests.Such as click effective interactive controls a, then it can be by effective interactive controls a's The first pre- weight of test is changed to 9.Effective interactive controls c is such as clicked, then the number of clicks of effective interactive controls c is repaiied Change.
Random click test is carried out to all effective interactive controls by the pre- weight of the first test and the second pre- weight of test, Certain effective interactive controls can effectively avoided since specific condition is invalidated simultaneously, it can also be to components testing decision tree In there is no effective interactive controls of setting to carry out random clicking test.
Then it tests after the click test that abnormal judgment module 107 judges test module, whether display screen is surveyed Examination is abnormal, such as hand trip collapse or hand trip are without response;It is abnormal such as to there is test, then reseting module 109 prompts exception information or note After recording exception information, opponent's trip carries out reset operation, so that technical staff is handled in time.If do not occurred exception, then redirect Module 108 jumps to user interface controls acquisition module 105, continues the user interface controls of other operation interfaces of hand trip Test, until test terminates, such as user terminates or the testing time terminates.
The hand trip automatic detection process of the hand trip automatic detection device 100 of this preferred embodiment is completed in this way.
The decision process of covering layer in current operation interface is illustrated below.Figure 13 is please referred to, Figure 13 is the present invention Hand trip automatic detection device the second preferred embodiment covering layer decision-making function part structural schematic diagram.Hand trip is certainly Dynamicization detection device 100 further includes that frame assembly judgment module 131, control display area acquisition module 132 and covering layer are sentenced Cover half block 133.
Frame assembly judgment module 131 is for judging whether user interface controls have frame assembly.Control shows area Acquisition module 132, which is used for user interface controls such as, has frame assembly, then by corresponding video camera, obtains the aobvious of frame assembly Show area.Covering layer determination module 133 is used for the display area of frame assembly such as and is greater than the set value, then judges user interface controls For the covering layer.
Carry out covering layer judgement detailed process include:
One, frame assembly judgment module 31 judges whether user interface controls have frame assembly, i.e. BoxColider groups Part.
Two, such as there is frame assembly, control shows area acquisition module 132 by being rendered to user interface controls Video camera (Camera) obtains the position of corresponding frame assembly on the display screen, to obtain the display of the frame assembly Area.
Three, covering layer determination module 133 judges the display surface for the frame assembly that control shows that area acquisition module 132 obtains Whether product is more than the first setting value, such as 80%, and if whether the display area of frame assembly is more than the first setting value, then covering layer is sentenced Cover half block 133 judges that the user interface controls are covering layer.
Four, such as user interface controls do not have frame assembly or the display area of frame assembly is smaller, then covering layer judges Module 133 judges that user interface controls are non-covering layer.
The decision process of the covering layer in this preferred embodiment is completed in this way.
Preferably, test module carries out automation to the user interface controls at current operation interface and clicks test.This is automatic It can be simulation click test or virtual click test that test is clicked in change.
Figure 16 is please referred to, Figure 16 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device Second structural representation.The test module 106 includes world coordinates acquiring unit 161, coordinate transformation unit 162 and virtual Click unit 163.
World coordinates acquiring unit 161 is used to obtain the world coordinates of user interface controls.Coordinate transformation unit 162 is used for World coordinates is converted into screen coordinate.Simulation is clicked unit 163 and is used for according to screen coordinate to the user at current operation interface Interface control carries out click test.
When test is clicked in automation clicks test for simulation, world coordinates acquiring unit 161 obtains user interface first The gaming world coordinate of control.Such as user interface controls are two-dimentional control, such as the NGUI controls of rectangle, then hand trip automation inspection Survey device obtains the world coordinates on four vertex of the rectangle of the user interface controls.Such as user interface controls are three-dimensional control Part, if the user interface controls include MeshFilter components, Boxcolider components or Render components, then hand trip automation Detection device obtains the world coordinates on eight vertex of the cuboid of the user interface controls.
Subsequent coordinate transformation unit 162 is obtained by the video camera rendered above-mentioned world coordinates being converted to screen Coordinate.The centre coordinate of the world coordinates on four vertex is such as converted into screen coordinate or will be in the world coordinates on eight vertex Heart coordinate is converted to screen coordinate.
Finally the screen coordinate that unit 163 is obtained according to coordinate transformation unit is clicked in simulation, to the use at current operation interface Family interface control carries out simulation and clicks test.
Figure 17 is please referred to, Figure 17 is the test module that the hand of the present invention swims the second preferred embodiment of automatic detection device Third structural representation.The test module 106 includes virtual click unit 171.
The interface that virtual click unit 171 is used to provide by call operation system, to user circle at current operation interface Face control carries out virtual click test.
When it is virtual click test that test is clicked in automation, what virtual click unit was then provided by call operation system Interface carries out virtual click test to the user interface controls at current operation interface.Specially:
Virtual click unit 171 builds according to parameter set by user and clicks test event first;Subsequent virtual click list Member 171 obtains corresponding game display module by game engine, such as UnityPlayer objects;Then to clicking test event It is packaged processing with the calling logic relationship of game display module;Last 171 call operation system of virtual click unit provides Interface by play display module to after encapsulation process click test event carry out virtual click test.
On the basis of first preferred embodiment, the hand trip automatic detection device of this preferred embodiment controls effectively interaction Part is identified, carries out timely processing to test weight progress adjustment in real time and to test is abnormal, further improves certainly The compatibility and accuracy of dynamicization test.
Illustrate the hand trip automated detection method of the present invention and the specific work of detection device below by a specific embodiment Make principle.Please refer to Figure 18 A and Figure 18 B.Figure 18 A, Figure 18 B are that the hand of the present invention swims automated detection method and detection device Specific embodiment uses schematic diagram.Wherein Figure 18 A are the user interface controls of the operation interface of hand trip and corresponding user The schematic diagram of interface control tree.Figure 18 B are the flow chart for for the user interface controls at current operation interface click test. Specifically clicking the process tested includes:
Step S1801, hand swim the user interface controls at automatic detection device traversal current operation interface;
Step S1802, hand trip automatic detection device judges whether the user interface controls got activate, if activation Go to step S1803;Return to step S1801 obtains next user interface controls if un-activation;
Step S1803, hand trip automatic detection device judge whether the user interface controls got are covering layer, are such as Covering layer, then return to step S1801 obtain next user interface controls;If not being covering layer, then step S1804 is gone to;
Step S1804, hand trip automatic detection device judge whether the user interface controls got can interact, can such as hand over Mutually, then step S1805 is gone to;It can not such as interact, then return to step S1801 obtains next user interface controls;
Step S1805, hand trip automatic detection device judge the whether covered layer covering of the user interface controls got, As capped, then return to step S1801 obtains next user interface controls;It is such as uncovered, then go to step S1806;
Step S1806, hand trip automatic detection device judge whether to have traversed all user interfaces at current operation interface Control, as unfinished, then return to step S1801 obtains next user interface controls, such as completes, then goes to step S1807;
Step S1807, hand trip automatic detection device determine all effective interactive controls at current operation interface;
Step S1808, hand trip automatic detection device pass through components testing decision tree or the control class of effective interactive controls Weight is tested in type and number of clicks, the click for obtaining all effective interactive controls;
Step S1809, hand swim automatic detection device and carry out click test according to test weight is clicked, and to clicking The click test weight of effective interactive controls after test is adjusted;
Step S1810 such as clicks test normally, then hand trip automatic detection device reads current new operation interface and returns Step S1801 is returned, until test terminates;It is abnormal such as to click test, then hand trip automatic detection device prompt exception information or note After recording exception information, opponent's trip carries out reset operation, so that technical staff is handled in time.
The hand trip automated detection method and device of the present invention carry out the automation point of hand trip by components testing decision tree Test is hit, the automation adaptation test of hand trip is realized, tester only need to carry out click testing setup in a terminal, with Components testing decision tree is formed, the components testing decision tree then can be used to carry out automation click in a variety of different terminals Test.And entire test process to be to click test weight as foundation, realize to emphasis control carry out maximum probability test, other On the basis of control carries out small probability test, be not in script test can not be after since test can not be detected caused by control Continuous problem.The skill that the automation adaptation of hand trip is tested can not be carried out by solving existing hand trip automated detection method and device Art problem.
" component ", " module ", " system ", " interface ", " process " etc. are usually intended to as used herein the term Refer to computer related entity:Hardware, the combination of hardware and software, software or software in execution.For example, component can be but not It is limited to run process on a processor, processor, object, executable application, thread, program and/or the computer executed. By diagram, both the application and the controller run on the controller can be component.One or more components can have It is in the process executed and/or thread, and component can be located on a computer and/or be distributed in two or more meters Between calculation machine.
Moreover, claimed theme may be implemented as generating software using standard program and/or engineering technology, consolidate The method, apparatus or manufacture of disclosed theme are realized in part, hardware or its arbitrary combination with control computer.It is used herein Term " manufacture " be intended to comprising can be from arbitrary computer readable device, carrier or the computer program of medium access.Certainly, Those skilled in the art will appreciate that many modifications can be carried out to the configuration, without departing from claimed theme range or Spirit.
Figure 19 and the discussion below are provided to the electronics where realization hand of the present invention trip automatic detection device Brief, summary the description of the working environment of equipment.The working environment of Figure 19 is only an example of working environment appropriate And suggestion is not intended to about the purposes of working environment or any restrictions of the range of function.Example electronic equipment 1912 include but It is not limited to personal computer, server computer, hand-held or laptop devices, mobile device (such as mobile phone, a number Word assistant (PDA), media player etc.), multicomputer system, consumer electronic devices, minicomputer, mass computing Machine includes the distributed computing environment, etc. of above-mentioned arbitrary system or equipment.
Although not requiring, in the common background that " computer-readable instruction " is executed by one or more electronic equipments Lower description embodiment.Computer-readable instruction can be distributed and (be discussed below) via computer-readable medium.It is computer-readable Instruction can be implemented as program module, such as the function of execution particular task or realization particular abstract data type, object, application Programming interface (API), data structure etc..Typically, the function of the computer-readable instruction can be in various environment arbitrarily Combination or distribution.
Figure 19 illustrates the electronic equipment that the hand including the present invention swims one or more embodiments of automatic detection device 1912 example.In one configuration, electronic equipment 1912 includes at least one processing unit 1916 and memory 1918.According to The exact configuration and type of electronic equipment, memory 1918 can be volatibility (such as RAM), it is non-volatile (such as ROM, flash memory etc.) or the two certain combination.The configuration is illustrated in Figure 19 by dotted line 1914.
In other embodiments, electronic equipment 1912 may include supplementary features and/or function.For example, equipment 1912 is also May include additional storage device (such as removable and/or non-removable) comprising but it is not limited to magnetic memory apparatus, light Storage device etc..This additional memory devices are illustrated in Figure 19 by storage device 1920.In one embodiment, it is used for real The computer-readable instruction of existing one or more embodiments provided in this article can be in storage device 1920.Storage device 1920 can also store other computer-readable instructions for realizing operating system, application program etc..Computer-readable instruction It can be loaded into memory 1918 and be executed by such as processing unit 1916.
Term as used herein " computer-readable medium " includes computer storage media.Computer storage media includes The volatibility that any method or technique of the information of such as computer-readable instruction or other data etc is realized for storage With non-volatile, removable and nonremovable medium.Memory 1918 and storage device 1920 are the realities of computer storage media Example.Computer storage media includes but not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, number Universal disc (DVD) or other light storage devices, cassette tape, tape, disk storage device or other magnetic storage apparatus can be with For storing any other medium it is expected information and can accessed by electronic equipment 1912.Arbitrary such computer storage is situated between Matter can be a part for electronic equipment 1912.
Electronic equipment 1912 can also include the communication connection 1926 for allowing electronic equipment 1912 to be communicated with other equipment.It is logical Letter connection 1926 can include but is not limited to modem, network interface card (NIC), integrated network interface, radiofrequency launcher/ Receiver, infrared port, USB connections or other interfaces for electronic equipment 1912 to be connected to other electronic equipments.Communication Connection 1926 may include wired connection or wireless connection.Communication connection 1926 can emit and/or receive communication medium.
Term " computer-readable medium " may include communication media.Communication media typically comprises computer-readable instruction Or other data in " the own modulated data signal " of such as carrier wave or other transmission mechanisms etc, and include that any information is passed Send medium.Term " own modulated data signal " may include such signal:One or more of the characteristics of signals is according to general Mode in information coding to signal is set or changed.
Electronic equipment 1912 may include input equipment 1924, for example, keyboard, mouse, pen, voice-input device, touch it is defeated Enter equipment, infrared camera, video input apparatus and/or any other input equipment.Can also include that output is set in equipment 1912 Standby 1922, such as one or more displays, loud speaker, printer and/or other arbitrary output equipments.1924 He of input equipment Output equipment 1922 can be connected to electronic equipment 1912 via wired connection, wireless connection or its arbitrary combination.In a reality It applies in example, input equipment or output equipment from another electronic equipment are used as the input equipment of electronic equipment 1912 1924 or output equipment 1922.
The component of electronic equipment 1912 can be connected by various interconnection (such as bus).Such interconnection may include outer Enclose component interconnection (PCI) (such as quick PCI), universal serial bus (USB), firewire (IEEE1394), optical bus structure etc. Deng.In another embodiment, the component of electronic equipment 1912 can pass through network interconnection.For example, memory 1918 can be by Multiple physical memory cells arcs composition in different physical locations, by network interconnection.
It would be recognized by those skilled in the art that the storage device for storing computer-readable instruction can be across network point Cloth.For example, can be stored for realizing one provided by the present invention via the electronic equipment 1930 that network 1928 accesses or The computer-readable instruction of multiple embodiments.Electronic equipment 1912 can access electronic equipment 1930 and downloading computer is readable What is instructed is part or all of for execution.Alternatively, electronic equipment 1912 can be downloaded a plurality of computer-readable on demand It instructs or some instruction can be executed at electronic equipment 1912 and some instructions can be held at electronic equipment 1930 Row.
There is provided herein the various operations of embodiment.In one embodiment, one or more operations can be with structure At the computer-readable instruction stored on one or more computer-readable mediums, will make to succeed in one's scheme when being executed by electronic equipment It calculates equipment and executes the operation.Describing the sequences of some or all of operations, to should not be construed as to imply that these operations necessarily suitable Sequence is relevant.It will be appreciated by those skilled in the art that the alternative sequence of the benefit with this specification.Furthermore, it is to be understood that Not all operation must exist in each embodiment provided in this article.
Moreover, word " preferred " used herein means serving as example, example or illustration.Feng Wen is described as " preferably " any aspect or design be not necessarily to be construed as than other aspect or design it is more advantageous.On the contrary, the use purport of word " preferred " Concept is being proposed in specific ways.Term "or" as used in this application is intended to mean the "or" for including and non-excluded "or".That is, unless specified otherwise or clear from the context, " X uses A or B " means that nature includes any one of arrangement. That is, if X uses A;X uses B;Or X uses A and B both, then " X uses A or B " is met in aforementioned any example.
Moreover, although the disclosure, this field skill has shown and described relative to one or more realization methods Art personnel will be appreciated that equivalent variations and modification based on the reading and understanding to the specification and drawings.The disclosure include it is all this The modifications and variations of sample, and be limited only by the scope of the following claims.In particular, to by said modules (such as element, Resource etc.) various functions that execute, the term for describing such component is intended to correspond to the specified work(for executing the component The random component (unless otherwise instructed) of energy (such as it is functionally of equal value), even if illustrated herein with execution in structure The disclosure exemplary implementations in function open structure it is not equivalent.In addition, although the special characteristic of the disclosure Through being disclosed relative to the only one in several realization methods, but this feature can with such as can be to given or specific application For be it is expected and one or more other features combinations of other advantageous realization methods.Moreover, with regard to term " comprising ", " tool Have ", " containing " or its deformation be used in specific implementation mode or claim for, such term be intended to with term The similar mode of "comprising" includes.
Each functional unit in the embodiment of the present invention can be integrated in a processing module, can also be each unit list Solely be physically present, can also two or more units be integrated in a module.Above-mentioned integrated module both may be used The form of hardware is realized, can also be realized in the form of software function module.If the integrated module is with software function The form of module is realized and when sold or used as an independent product, can also be stored in a computer-readable storage and be situated between In matter.Storage medium mentioned above can be read-only memory, disk or CD etc..Above-mentioned each device or system, can be with Execute the method in correlation method embodiment.
In conclusion although the present invention is disclosed above with preferred embodiment, above preferred embodiment is not to limit The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention Decorations, therefore protection scope of the present invention is subject to the range that claim defines.

Claims (20)

1. a kind of hand swims automated testing method, which is characterized in that including:
Preset components testing decision tree is obtained, wherein the components testing decision tree includes the control of each operation interface of hand trip Part test order;
The current operation interface for obtaining and parsing the hand trip, to obtain the user interface controls at the current operation interface;With And
Using the corresponding components testing rule in current operation interface described in the components testing decision tree, to described current The user interface controls of operation interface carry out click test.
2. hand according to claim 1 swims automated testing method, which is characterized in that the hand swims test method and further includes Step:
The user interface controls tree at predetermined registration operation interface is obtained by Software Development Kit;
The user interface controls tree is parsed, all interactive controls in the user interface controls tree are obtained;
To at least one of the user interface controls tree interactive controls setting control test order, to form the control Part test decision tree.
3. hand according to claim 2 swims automated testing method, which is characterized in that described to be determined using the components testing The corresponding components testing rule in current operation interface described in plan tree, to the user interface controls at the current operation interface Carrying out the step of click is tested includes:
The user interface controls tree at the current operation interface is parsed, to obtain the institute in the user interface controls tree There are user interface controls;
According to the control property of the user interface controls and control depth, effective friendship in all user interface controls is obtained Mutual control;And
Using the corresponding components testing rule in current operation interface described in the components testing decision tree, to described current Effective interactive controls of operation interface carry out click test.
4. hand according to claim 3 swims automated testing method, which is characterized in that described according to the user interface control The control property and control depth of part, the step of obtaining effective interactive controls in all user interface controls include:
Judge whether the user interface controls are state of activation;
If the user interface controls are state of activation, then judge whether the user interface controls can interact;
If the user interface controls can interact, then according to the control depth of the user interface controls, user circle is judged The whether covered layer covering of face control;And
If the user interface controls are not covered by the covering layer, then it is that effectively interaction is controlled that the user interface controls, which are arranged, Part.
5. hand according to claim 4 swims automated testing method, which is characterized in that the hand swims test method and further includes Step:
Judge whether the user interface controls have frame assembly;
As there is the user interface controls frame assembly to obtain the display of the frame assembly then by corresponding video camera Area;And
If the display area of the frame assembly is more than the first setting value, then judge that the user interface controls are the covering Layer;The wherein described frame assembly is BoxColider components.
6. hand according to claim 3 swims automated testing method, which is characterized in that described to be determined using the components testing The corresponding components testing rule in current operation interface described in plan tree, to effective interactive controls at the current operation interface Carrying out the step of click is tested includes:
According to components testing rule, the test weight of effective interactive controls in the current operation interface is obtained; And
According to the test weight of effective interactive controls, random point is carried out to effective interactive controls at the current operation interface Test is hit, and the test weight of effective interactive controls to having clicked carries out weight adjustment.
7. hand according to claim 3 swims automated testing method, which is characterized in that described to be determined using the components testing The corresponding components testing rule in current operation interface described in plan tree, to effective interactive controls at the current operation interface Carrying out the step of click is tested includes:
According to components testing rule, the first test for obtaining effective interactive controls in the current operation interface is pre- Weight;
Traverse effective interactive controls in the current operation interface, according to the control type of effective interactive controls with And number of clicks, determine the second pre- weight of test of effective interactive controls in the current operation interface;
According to the pre- weight of the first of effective interactive controls the test and the second pre- weight of test, effective interaction control is calculated The test weight of part;And
According to the test weight of effective interactive controls, random point is carried out to effective interactive controls at the current operation interface Test is hit, and the first pre- weight of test of effective interactive controls to having clicked carries out weight adjustment.
8. hand according to claim 1 swims automated testing method, which is characterized in that the hand swims automated testing method Further include:
After the click test, judge whether test exception occur;
As do not occurred, test is abnormal, then the step of going to the acquisition and parse the current operation interface of the hand trip;And
It is abnormal such as to there is test, then reset operation is carried out to hand trip after prompting exception information or recording exceptional information.
9. hand according to claim 1 swims automated testing method, which is characterized in that described to the current operation interface User interface controls carry out click test the step of include:
Obtain the world coordinates of the user interface controls;
The world coordinates is converted into screen coordinate;And
Click test is carried out to the user interface controls at the current operation interface according to the screen coordinate.
10. hand according to claim 1 swims automated testing method, which is characterized in that described to current operation circle The user interface controls in face carry out clicking the step of testing:
The interface provided by call operation system carries out virtual click survey to the user interface controls at the current operation interface Examination.
11. a kind of hand swims automatic test device, which is characterized in that including:
Decision tree acquisition module, for obtaining preset components testing decision tree, wherein the components testing decision tree includes hand The components testing rule of each operation interface of trip;
User interface controls acquisition module, the current operation interface for obtaining and parsing the hand trip are described current to obtain The user interface controls of operation interface;And
Test module, for being advised using the corresponding components testing in current operation interface described in the components testing decision tree Then, click test is carried out to the user interface controls at the current operation interface.
12. hand according to claim 11 swims automatic test device, which is characterized in that the hand trip automatic test dress It sets and further includes:
Control tree acquisition module, the user interface controls tree for obtaining predetermined registration operation interface by Software Development Kit;
Interactive controls acquisition module obtains the user interface controls tree for being parsed to the user interface controls tree In all interactive controls;And
Decision tree forms module, for being surveyed at least one of the user interface controls tree interactive controls setting control Examination rule, to form the components testing decision tree.
13. hand according to claim 12 swims automatic test device, which is characterized in that the test module includes:
Resolution unit is parsed for the user interface controls tree to the current operation interface, to obtain user circle All user interface controls in the control tree of face;
Effective interactive controls acquiring unit is obtained for the control property and control depth according to the user interface controls Effective interactive controls in all user interface controls;And
Test cell, for being advised using the corresponding components testing in current operation interface described in the components testing decision tree Then, click test is carried out to effective interactive controls at the current operation interface.
14. hand according to claim 13 swims automatic test device, which is characterized in that effective interactive controls obtain Unit includes:
State of activation judgment sub-unit, for judging whether the user interface controls are state of activation;
Interaction judgment sub-unit is state of activation for such as the user interface controls, then judges that the user interface controls are It is no to interact;
Covering judgment subelement can be interacted for such as described user interface controls, then according to the control of the user interface controls Depth judges the whether covered layer covering of the user interface controls;And
Effective interactive controls obtain subelement, are not covered by the covering layer for such as described user interface controls, then institute is arranged It is effective interactive controls to state user interface controls.
15. hand according to claim 14 swims automatic test device, which is characterized in that the hand trip automatic test dress It sets and further includes:
Frame assembly judgment module, for judging whether the user interface controls have frame assembly;
Control shows area acquisition module, has frame assembly for such as the user interface controls, then by imaging accordingly Machine obtains the display area of the frame assembly;And
Covering layer determination module, the display area for such as described frame assembly are greater than the set value, then judge the user interface Control is the covering layer;
The wherein described frame assembly is BoxColider components.
16. hand according to claim 13 swims automatic test device, which is characterized in that the test cell includes:
Weight Acquisition subelement is tested, for according to components testing rule, obtaining described in the current operation interface The test weight of effective interactive controls;And
First test subelement has the current operation interface for the test weight according to effective interactive controls It imitates interactive controls and carries out random click test, and the test weight of effective interactive controls to having clicked carries out weight tune It is whole.
17. hand according to claim 13 swims automatic test device, which is characterized in that the test cell includes:
The first pre- Weight Acquisition subelement of test, for according to components testing rule, obtaining in the current operation interface Effective interactive controls the first pre- weight of test;
The second pre- Weight Acquisition subelement of test, for traversing effective interactive controls in the current operation interface, root According to the control type and number of clicks of effective interactive controls, effective interaction in the current operation interface is determined The second pre- weight of test of control;
Weight calculation subelement is tested, for pre- according to the pre- weight of the first of effective interactive controls the test and the second test Weight calculates the test weight of effective interactive controls;And
Second test subelement has the current operation interface for the test weight according to effective interactive controls It imitates interactive controls and carries out random click test, and the first pre- weight of test of effective interactive controls to having clicked is weighed Recanalization.
18. hand according to claim 11 swims automatic test device, which is characterized in that the hand trip automatic test dress It sets and further includes:
The abnormal judgment module of test judges whether that appearance test is abnormal after click test;
Jump module, it is abnormal for not occurring test such as, then jump to the user interface controls acquisition module;And
Reseting module, it is abnormal for such as there is test, then progress is swum to the hand after prompting exception information or recording exceptional information Reset operation.
19. hand according to claim 11 swims automatic test device, which is characterized in that the test module further includes:
World coordinates acquiring unit, the world coordinates for obtaining the user interface controls;
Coordinate transformation unit, for the world coordinates to be converted to screen coordinate;And
Unit is clicked in simulation, for being clicked to the user interface controls at the current operation interface according to the screen coordinate Test.
20. hand according to claim 11 swims automatic test device, which is characterized in that the test module further includes:
Virtual click unit, the interface for being provided by call operation system, to the user interface at the current operation interface Control carries out virtual click test.
CN201610071338.5A 2016-02-01 2016-02-01 Hand swims automated detection method and device Active CN105988934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610071338.5A CN105988934B (en) 2016-02-01 2016-02-01 Hand swims automated detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610071338.5A CN105988934B (en) 2016-02-01 2016-02-01 Hand swims automated detection method and device

Publications (2)

Publication Number Publication Date
CN105988934A CN105988934A (en) 2016-10-05
CN105988934B true CN105988934B (en) 2018-07-27

Family

ID=57040872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610071338.5A Active CN105988934B (en) 2016-02-01 2016-02-01 Hand swims automated detection method and device

Country Status (1)

Country Link
CN (1) CN105988934B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628732B (en) * 2017-03-16 2023-04-18 腾讯科技(深圳)有限公司 Traversal test method and device for application interface control
CN108664383B (en) * 2017-03-28 2021-10-15 上海合福信息科技有限公司 Control testing method and software automatic testing method
CN107080945B (en) * 2017-05-11 2020-12-22 网易(杭州)网络有限公司 Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN108170611B (en) 2018-01-23 2019-07-16 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108280026B (en) 2018-01-23 2019-03-22 网易(杭州)网络有限公司 Game automated testing method and device, storage medium, electronic equipment
CN109324967A (en) * 2018-09-26 2019-02-12 深圳壹账通智能科技有限公司 The method, apparatus and terminal device of application program pop-up components testing
CN109840201B (en) * 2018-12-15 2023-07-18 中国平安人寿保险股份有限公司 UI test method, device, electronic equipment and computer readable storage medium
CN110794999B (en) * 2019-10-28 2021-01-15 珠海格力电器股份有限公司 Automatic control method and device based on interface segmentation and terminal
CN112527689B (en) * 2021-02-09 2021-05-11 腾讯科技(深圳)有限公司 Application testing method and device and storage medium
CN114090436A (en) * 2021-11-12 2022-02-25 乐元素科技(北京)股份有限公司 Test method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655817A (en) * 2009-09-24 2010-02-24 成都市华为赛门铁克科技有限公司 Method and apparatus for testing graphical user interface
US8856743B2 (en) * 2006-10-17 2014-10-07 Telerik Inc. System, method, and computer readable medium for universal software testing
CN104598380A (en) * 2015-01-16 2015-05-06 广东欧珀移动通信有限公司 Method and system for automatic testing based on control
CN104615538A (en) * 2015-02-05 2015-05-13 天津市康凯特软件科技有限公司 Mobile phone application testing method based on mobile phone interface control elements
CN104699617A (en) * 2015-03-31 2015-06-10 成都优聚软件有限责任公司 Automated testing method for games

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8856743B2 (en) * 2006-10-17 2014-10-07 Telerik Inc. System, method, and computer readable medium for universal software testing
CN101655817A (en) * 2009-09-24 2010-02-24 成都市华为赛门铁克科技有限公司 Method and apparatus for testing graphical user interface
CN104598380A (en) * 2015-01-16 2015-05-06 广东欧珀移动通信有限公司 Method and system for automatic testing based on control
CN104615538A (en) * 2015-02-05 2015-05-13 天津市康凯特软件科技有限公司 Mobile phone application testing method based on mobile phone interface control elements
CN104699617A (en) * 2015-03-31 2015-06-10 成都优聚软件有限责任公司 Automated testing method for games

Also Published As

Publication number Publication date
CN105988934A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN105988934B (en) Hand swims automated detection method and device
CN103501287B (en) Method and equipment for determining hit motion object in game operation process
KR101398086B1 (en) Method for processing user gesture input in online game
CN107423274A (en) Commentary content generating method, device and storage medium based on artificial intelligence
JP2017086215A (en) Game system for performing route search of non-player character based on movement history of player
CN110134375B (en) Game character behavior control method and device and readable storage medium
CN109985382A (en) Script execution, device, equipment and the storage medium of plot node
CN108096833B (en) Motion sensing game control method and device based on cascade neural network and computing equipment
CN108694073A (en) Control method, device, equipment and the storage medium of virtual scene
CN109364484A (en) Game role mobile test method and device
WO2022127241A1 (en) Virtual-sphere deformation control method, apparatus, program, and readable medium
CN106693365A (en) Method and device for rapidly transferring game object
Pouncy et al. What Is the Model in Model‐Based Planning?
CN112132936A (en) Picture rendering method and device, computer equipment and storage medium
CN109603154B (en) Game interface testing method, client, hosting server and system
Liu et al. Inspector: Pixel-based automated game testing via exploration, detection, and investigation
KR101868286B1 (en) Apparatus and Method for Randomly Generating Game Map
CN113934766B (en) Go fixed-type playing method and device, electronic equipment and storage medium
Buro et al. On the development of a free RTS game engine
US11878249B2 (en) Playtesting coverage with curiosity driven reinforcement learning agents
Yu et al. MiRTE: Mixed Reality Triage and Evacuation game for Mass Casualty information systems design, testing and training
CN109731326A (en) Aiming area display method and device of game weapon and electronic equipment
Bída et al. Evolution of GameBots project
CN106919388A (en) A kind of desktop card games engine
CN114288662A (en) NPC behavior control method and device and electronic equipment

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