CN105094511A - Test case generating method and test case generating device - Google Patents

Test case generating method and test case generating device Download PDF

Info

Publication number
CN105094511A
CN105094511A CN201410213950.2A CN201410213950A CN105094511A CN 105094511 A CN105094511 A CN 105094511A CN 201410213950 A CN201410213950 A CN 201410213950A CN 105094511 A CN105094511 A CN 105094511A
Authority
CN
China
Prior art keywords
described
current interface
user operation
interface
queue
Prior art date
Application number
CN201410213950.2A
Other languages
Chinese (zh)
Inventor
张军
邹纲
张沈斌
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to CN201410213950.2A priority Critical patent/CN105094511A/en
Publication of CN105094511A publication Critical patent/CN105094511A/en

Links

Abstract

The present invention discloses a test case generating method and a test case generating device. The test case generating method comprises: selecting one user operation from a candidate user operation queue of an application and deleting the user operation from the queue, wherein the user operation is a specific action executed in a specific area on a specific interface; performing the selected user operation to obtain a current interface of the application; determining whether the current interface is accessed, and if the current interface is accessed, generating a test case wherein the test example comprises a series of user operations that start from a main interface of a touch operation device, are already performed and cause the current interface; if the current interface is not accessed, acquiring the user operation in the current interface according to the current interface, and adding the acquired user operation into the queue; and performing the steps repeatedly until a predetermined condition is met.

Description

Test case generation method and test case generation equipment

Technical field

Relate generally to Application testing field of the present invention.Specifically, the present invention relates to a kind of generation for the method and apparatus of Test Application in the test case of the application program of touching type operation equipment.

Background technology

In recent years, along with the develop rapidly of touching type operation equipment correlation technique, touching type operation equipment obtains general application.Touching type operation equipment is such as smart mobile phone, panel computer, intelligent television etc.Correspondingly, the application program on touching type operation equipment emerges in an endless stream.The application program only used on smart mobile phone just number in necessarily.

Due to dog-eat-dog, the Develop Application System cycle is short, and the requirement of application programs is high.Application program, before issue, through strict test to ensure the quality of application program, but is not wished to test the overlong time taken.The basis of test is test case.The quality of test case directly affects the result of test, and and then affects the Consumer's Experience of application program.But the generation of test case takies a lot of time usually.

Traditionally, rely on and manually go the test case of design application, such work to be numerous and diverse, poor efficiency, easily to make mistakes.The range of the test case of engineer, the degree of depth are not easy to adjust neatly as required.The mode of engineer's test case is difficult to automatically, efficiently, neatly generate test case.

Therefore, expect that a kind of generation is for the method and apparatus of Test Application in the test case of the application program of touching type operation equipment, it can generate required test case automatically, efficiently, neatly.

Summary of the invention

Give hereinafter about brief overview of the present invention, to provide about the basic comprehension in some of the present invention.Should be appreciated that this general introduction is not summarize about exhaustive of the present invention.It is not that intention determines key of the present invention or pith, and nor is it intended to limit the scope of the present invention.Its object is only provide some concept in simplified form, in this, as the preorder in greater detail discussed after a while.

The object of the invention is the problems referred to above for prior art, propose a kind of can automatically, efficiently, neatly generate needed for for the method and apparatus of Test Application in the test case of the application program of touching type operation equipment.

To achieve these goals, according to an aspect of the present invention, provide a kind of generation for the method for Test Application in the test case of the application program of touching type operation equipment, the method comprises: from the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface; User operation selected by execution, to obtain the current interface of described application program; Judge whether to access current interface, if accessed current interface, then generate described test case, it comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface, if do not access current interface, then obtain the user operation in current interface according to current interface, and obtained user operation is added in described queue; Repeat above-mentioned steps, until reach predetermined condition.

According to another aspect of the present invention, provide a kind of generation for the equipment of Test Application in the test case of the application program of touching type operation equipment, this equipment comprises: selecting arrangement, be configured to: from the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface; Actuating unit, is configured to: the user operation selected by execution, to obtain the current interface of described application program; Judgment means, be configured to: judge whether to access current interface, when being judged as accessing current interface, command generating device generates described test case, described test case comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface, when being judged as not accessing current interface, instruction acquisition device obtains the user operation in current interface according to current interface, and adds in described queue by obtained user operation; Control device, is configured to: described in instruction, selecting arrangement, actuating unit, judgment means perform, until reach predetermined condition.

In addition, according to a further aspect in the invention, a kind of storage medium is additionally provided.Described storage medium comprises machine-readable program code, and when performing described program code on messaging device, described program code makes described messaging device perform according to said method of the present invention.

In addition, in accordance with a further aspect of the present invention, a kind of program product is additionally provided.Described program product comprises the executable instruction of machine, and when performing described instruction on messaging device, described instruction makes described messaging device perform according to said method of the present invention.

Accompanying drawing explanation

Below with reference to the accompanying drawings illustrate embodiments of the invention, above and other objects, features and advantages of the present invention can be understood more easily.Parts in accompanying drawing are just in order to illustrate principle of the present invention.In the accompanying drawings, same or similar technical characteristic or parts will adopt same or similar Reference numeral to represent.In accompanying drawing:

Fig. 1 shows the process flow diagram of test case generation method according to an embodiment of the invention;

Fig. 2 shows the example of screen block;

Fig. 3 shows the block diagram of the test case generation equipment according to the embodiment of the present invention; And

Fig. 4 shows and can be used for implementing the schematic block diagram according to the computing machine of the method and apparatus of the embodiment of the present invention.

Embodiment

To be described in detail one exemplary embodiment of the present invention by reference to the accompanying drawings hereinafter.For clarity and conciseness, all features of actual embodiment are not described in the description.But, should understand, must make a lot specific to the decision of embodiment in the process of any this actual embodiment of exploitation, to realize the objectives of developer, such as, meet those restrictive conditions relevant to system and business, and these restrictive conditions may change to some extent along with the difference of embodiment.In addition, although will also be appreciated that development is likely very complicated and time-consuming, concerning the those skilled in the art having benefited from present disclosure, this development is only routine task.

At this, also it should be noted is that, in order to avoid the present invention fuzzy because of unnecessary details, illustrate only in the accompanying drawings with according to the closely-related apparatus structure of the solution of the present invention and/or treatment step, and eliminate other details little with relation of the present invention.In addition, also it is pointed out that the element described in an accompanying drawing of the present invention or a kind of embodiment and feature can combine with the element shown in one or more other accompanying drawing or embodiment and feature.

The flow process of test case generation method is according to an embodiment of the invention described below with reference to Fig. 1.

Fig. 1 shows the process flow diagram of test case generation method according to an embodiment of the invention.As shown in Figure 1, generate according to an embodiment of the invention and be used for Test Application in the method for the test case of the application program of touching type operation equipment, comprise the steps: from the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action (step S1) performed in the specific region on specific interface; User operation selected by execution, to obtain the current interface (step S2) of described application program; Judge whether to access current interface, if accessed current interface, then generate described test case, it comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface, if do not access current interface, then obtain the user operation in current interface according to current interface, and obtained user operation is added (step S3) in described queue; And judge whether to reach predetermined condition.If reach predetermined condition, then terminate whole flow process.If do not reach predetermined condition, then proceed to step S1, re-execute above-mentioned steps S1-S3(step S4).

Test case is a series of user operation in essence.User operation refers to the specific action performed in the specific region on the specific interface of user in application program.Test case simulation be exactly the sequence of the operation that user may make.

Due to for be touching type operation equipment, so the operation of user is for the region on the interface of application program.The one-level interface that the interface of application program at least comprises main interface and is switched to because of user operation from main interface.The interface of application program also may comprise the secondary interface be switched to because of user operation from one-level interface, the like.The number of levels at interface is larger, and the degree of depth that user operation relates to is darker.

Each interface can be divided into multiple region.The quantity in the region in the interface that user operation relates to is more, and the range that user operation relates to is larger.When not considering expense, the degree of depth involved by the user operation that test case comprises is darker, range is larger, and the test effect of test case is better.

The action of user can comprise the everything that user may make for touching type operation equipment, includes, but are not limited to: single-click operation, double click operation, left slide, to the right slide, upward sliding operation, slide downward operation etc.

In the method for the invention, the candidate user operation queue having an application program is safeguarded.Queue can be the queue of first-in first-out, also can be the queue sorted by priority, and also can be that out-of-order arrangement is random takes out item destination queue.What store in the candidate user operation queue of application program is the user operation of the candidate of application program to be tested.

In the initialization of this queue, first user operation added in queue is the action starting application program on the main interface of touching type operation equipment.In process subsequently, as hereinafter described in detail, by the analysis result according to current interface, add new user operation.

In step sl, from the candidate user operation queue of described application program, select a user operation and it is deleted from described queue.

From the candidate user operation queue of application program, select the mode of user operation can be Stochastic choice.The advantage of this mode is relatively more flexible, can solve in alternate manner the situation being difficult to select.Such as, when selecting according to priority, if the priority of two candidate user operation is identical, can one of both Stochastic choice.The deficiency of this mode lacks specific aim.

From the candidate user operation queue of application program, select the mode of user operation can be according to priority select.That is, the candidate user operation selecting priority the highest.The advantage of this mode by the needs of actual conditions, can carry out the generation of test case targetedly, embodies emphasis factors to be tested better.Such as, it is desirable to test mainly for clicking operation.Higher priority can be given to the user operation clicking type.For another example, depth-first is wished.Higher priority can be given to the user operation for darker interface.

From the candidate user operation queue of application program, select the mode of user operation can be order by first-in first-out.The user operation initially had due to the candidate user operation queue of application program is the action starting application program on the main interface of touching type operation equipment, so resolving at first and adding in candidate user operation queue is each action of the regional at the main interface of application program, follow-up what add is each action of the regional at each one-level interface of application program.Therefore, the principle of what this mode embodied is breadth First.

No matter adopt which kind of mode to select a user operation from the candidate user operation queue of application program, after have selected this user operation, all need it to delete from queue.

In step s 2, the user operation selected by execution, to obtain the current interface of described application program.

Particularly, perform the user operation selected in step sl with instruction type, to simulate the situation of actual generation.The execution of user operation is usually with the switching of Application Program Interface.

Such as, during first user operation in the candidate user operation queue of executive utility, the main interface from the main changing interface of touching type operation equipment to application program.Now, current interface is the main interface of application program.

Suppose that the main interface of application program has 4 icons, and the user operation selected in step sl is user clicks first icon " broadcasting video ", when then performing this user operation in step s 2, the video playback interface from the main changing interface of application program to the one-level interface as application program.Now, current interface is video playback interface.

In step s3, judge whether to access current interface.

In the present invention, maintain an access list.The user interface of having accessed is stored in access list.By comparing with the interface in access list, judge whether current interface accessed.

Because interface presents with image format.Therefore, current interface compares with the interface in access list, is actually the comparison between image.Any known image comparison method in this area can be adopted, the similarity between movement images.

Similarity is exceeded to the image pair of predetermined similarity threshold, think identical image.If the similarity at a certain interface in current interface and access list is higher than predetermined similarity threshold, then think the accessed mistake of current interface.

As one preferred embodiment, first can extract the text at each interface in current interface and access list, then compare the similarity of text as the similarity between interface.Because interface can be characterized by text wherein.

In step s3, if be judged as accessing current interface, then test case is generated.

In the present invention, maintain a tree construction.Tree construction records the hierarchical relationship between interface, especially records the linking relationship between interface, that is which interface which user operation to be switched to another interface because of from.

When being judged as accessing current interface, just can according to this tree construction, generate the test case comprising following user operation: from the main interface of touching type operation equipment, executed, a series of user operations of causing current interface.

Obviously, if be judged as accessing current interface, then current interface accessed mistake twice, therefore, can obtain two groups of test cases, and these two groups of test cases, all from the main interface of touching type operation equipment, through different path, arrive current interface.

The test case generated just simulates the set of the operation that user may make.

In step s3, if be judged as not accessing current interface, then current interface is added in access list.

Correspondingly, also recording-related information in tree construction, as the hierarchical relationship of current interface in whole Application Program Interface, it by which user operation on which interface is caused.

And, utilize analytical tool, obtain user operation possible in current interface according to current interface, and obtained user operation is added in the candidate user operation queue of application program.

Particularly, analytical tool resolves current interface, current interface is divided into multiple region, provides candidate actions for each region.

Preferably, all possible user operation in current interface is obtained.

Analytical tool is such as MonkeyRunner, can be see:

http://developer.android.com/tools/help/monkeyrunner_concepts.html。

Alternatively, the priority of the user operation newly added is calculated.

As mentioned above, according to the priority of user operation, user operation can be selected from the candidate user operation queue of application program.

The priority of user operation can embody the significance level of user operation, the emphasis of reflection test.

Such as, can according to user operation for the position of region in interface, calculate the priority of user operation.

In advance the screen divider of touching type operation equipment can be multiple pieces.Usually, block is rectangle, user operation for region be also rectangle.The size of each piece can be identical, also can be different.

It has been generally acknowledged that the significance level of zones of different is different.Therefore, can be each piece and give different weights.Weight can embody the significance level of block, by the overlap situation of comparison domain with block, according to the significance level in the weight calculation region of block.

Such as, as shown in Figure 2, user interface is divided into 9 blocks.9 blocks not of uniform size, weighted.The numeral shown in block is the example of the weight corresponding to block.

According to the position of region in interface be candidate actions (user operation) give priority time, can according to the weight of the block divided in advance with this area coincidence, the priority of calculated candidate action (user operation).

Such as, suppose to slide to the right near the intersection of certain user operation for the first row in the current interface shown in Fig. 2 first block and second block from left to right, this action through these two blocks, then according to corresponding weight " 10 " and " 9 ", can calculate the priority of this user operation.

Exemplarily, weighting weighs the numerical value of mean value " 9.5 " as the priority of this user operation of " 10 " and " 9 ".

Preferably, according to the overlap ratio of this region with the block divided in advance and the weight of relevant block, the priority of calculated candidate action (user operation).

Such as, suppose to slide to the right near the intersection of certain user operation for the first row in the current interface shown in Fig. 2 first block and second block from left to right, this action is through these two blocks, the region of this action is respectively " 90% " and " 10% " with the ratio that overlaps of two blocks, then according to corresponding weight " 10 " and " 9 " and the corresponding ratio that overlaps " 90% " and " 10% ", the priority of this user operation can be calculated.

Exemplarily, weighting weighs the numerical value of weighted mean value " 10*90%+9*10%=9.9 " as the priority of this user operation of " 10 " and " 9 ".

Above account form is example, should not be considered as limitation of the present invention.As long as according to the position of region in interface, calculate the priority of user operation, just fall among protection scope of the present invention.Those skilled in the art can design various concrete embodiment neatly.Do not repeat them here.

Except calculating except the priority of user operation according to region this factor of position in interface, the priority of user operation can also be calculated separately according to the type of candidate actions.

Particularly, according to the needs of test or the other factors of consideration when designing, the type for different actions gives different priority.

Such as, may wish to carry out more deep test for click action, then can be click action, double-click the relatively high priority of the action impartings such as action, be that various sliding action gives relatively low priority.

Except being used alone the position of region in interface, being used alone the type of candidate actions to calculate the priority of user operation, can also the type two of the position of calmodulin binding domain CaM in interface and candidate actions because usually calculating the priority of user operation.

Such as, the right of priority by the position calculation of region in interface and the right of priority that the type by candidate actions calculates can be got weighted mean value, as the right of priority of final user operation.

Certainly, also the right of priority that the right of priority by the position calculation of region in interface and the type by candidate actions calculate can be multiplied, get the right of priority of product as final user operation.

The invention is not restricted to above-mentioned two kinds of concrete exemplary approach.

By giving suitable right of priority for user operation, important branch priority can be made to be tested and process.

Through the process of step S1-S3, new user operation or test case can be obtained.Repeated execution of steps S1-S3, can obtain more user operation or test case.

In step s 4 which, judge whether to reach predetermined condition.

If be judged as reaching predetermined condition, then terminate whole flow process.

If be judged as not reaching predetermined condition, then proceed to step S1, re-execute above-mentioned steps S1-S3.

Predetermined condition can set flexibly according to the needs of actual design.

For example, predetermined condition can be that the candidate user operation queue of application program is for empty.Reach this predetermined condition and show that all possible operating process of application program has been extracted all as test case.The breadth and depth of test case reaches maximization.

Predetermined condition also can be that the right of priority of user operation in the candidate user operation queue of application program is all lower than predetermined priority threshold value.Reach this predetermined condition and show that the important user operation that is considered to being embodied importance by right of priority has been extracted all as test case.Test case can embody laying particular stress on of test well.By the adjustment calculating of right of priority and the value of priority threshold, the emphasis of test can be adjusted neatly.

Predetermined condition can also be user operation in the candidate user operation queue of application program for interface phase all depth threshold is greater than for the degree of depth at the main interface of application program.Reach this predetermined condition and show that the MTD involved by test case reaches the degree of expection.By percentage regulation threshold value, the degree of depth of test can be adjusted neatly.

Below, with reference to Fig. 3, the test case generation equipment according to the embodiment of the present invention is described.

Fig. 3 shows the block diagram of the test case generation equipment according to the embodiment of the present invention.As shown in Figure 3, be used for Test Application according to generation of the present invention to comprise in the test case generation equipment 300 of the test case of the application program of touching type operation equipment: selecting arrangement 31, be configured to: from the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface; Actuating unit 32, is configured to: the user operation selected by execution, to obtain the current interface of described application program; Judgment means 33, be configured to: judge whether to access current interface, when being judged as accessing current interface, command generating device 35 generates described test case, described test case comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface, when being judged as not accessing current interface, instruction acquisition device 36 obtains the user operation in current interface according to current interface, and adds in described queue by obtained user operation; Control device 34, is configured to: described in instruction, selecting arrangement 31, actuating unit 32, judgment means 33 perform, until reach predetermined condition.

In one embodiment, queue is initialized to and comprises: the action starting described application program on the main interface of described touching type operation equipment.

In one embodiment, selecting arrangement 31 is further configured to: Stochastic choice user operation from described queue.

In one embodiment, acquisition device 36 comprises: resolution unit, is configured to: resolve described current interface, and described current interface is divided into multiple region, provides candidate actions for each region.

In one embodiment, acquisition device 36 also comprises: priority determining unit, is configured to: according to the position of region in current interface and/or the type of candidate actions, for each candidate actions gives priority.Selecting arrangement 31 is further configured to: from described queue, select a user operation by described priority.

In one embodiment, test case generation equipment 300 also comprises: divide device, be configured to: in advance the screen divider of described touching type operation equipment is multiple pieces, and is each piece of corresponding weight of imparting.Priority determining unit is further configured to: according to the weight of the block divided in advance with this area coincidence, calculate the priority of described candidate actions.

In one embodiment, priority determining unit is further configured to: according to the overlap ratio of this region with the described block divided in advance and the weight of relevant block, calculate the priority of described candidate actions.

In one embodiment, judgment means 33 is further configured to: when being judged as not accessing current interface, current interface is added in access list; And judgment means 33 is further configured to: the similarity comparing each interface in current interface and access list, if having similarity higher than predetermined similarity threshold, is judged as accessing current interface, otherwise is judged as not accessing current interface.

In one embodiment, judgment means 33 is further configured to: the text extracting each interface in described current interface and described access list; Relatively the similarity of text is as the similarity between described interface.

In one embodiment, specific action comprises: click, double-click, left/right/up/down slides.

In one embodiment, touching type operation equipment comprises smart mobile phone.

In one embodiment, the user operation in the current interface obtained is all possible user operation in described current interface.

In one embodiment, predetermined condition comprises one of following item: described queue is for empty, and the right of priority of the user operation in described queue is all lower than predetermined priority threshold value; User operation in described queue for interface phase all depth threshold is greater than for the degree of depth at the main interface of described application program.

Because the process in each device/unit included in test case generation equipment according to the present invention is similar with the process in included each step/sub-step in above-described test case generation method respectively, therefore for simplicity, the detailed description of these devices is omitted at this.

In addition, still need here it is noted that each component devices can be configured by software, firmware, hardware or its mode combined in the said equipment.Configure spendable concrete means or mode is well known to those skilled in the art, do not repeat them here.When being realized by software or firmware, to the computing machine (multi-purpose computer 400 such as shown in Fig. 4) with specialized hardware structure, the program forming this software is installed from storage medium or network, this computing machine, when being provided with various program, can perform various functions etc.

Fig. 4 shows and can be used for implementing the schematic block diagram according to the computing machine of the method and apparatus of the embodiment of the present invention.

In the diagram, CPU (central processing unit) (CPU) 401 performs various process according to the program stored in ROM (read-only memory) (ROM) 402 or from the program that storage area 408 is loaded into random access memory (RAM) 403.In RAM403, also store the data required when CPU401 performs various process etc. as required.CPU401, ROM402 and RAM403 are connected to each other via bus 404.Input/output interface 405 is also connected to bus 404.

Following parts are connected to input/output interface 405: importation 406(comprises keyboard, mouse etc.), output 407(comprises display, such as cathode-ray tube (CRT) (CRT), liquid crystal display (LCD) etc., and loudspeaker etc.), storage area 408(comprises hard disk etc.), communications portion 409(comprises network interface unit such as LAN card, modulator-demodular unit etc.).Communications portion 409 is via network such as the Internet executive communication process.As required, driver 410 also can be connected to input/output interface 405.Detachable media 411 such as disk, CD, magneto-optic disk, semiconductor memory etc. can be installed on driver 410 as required, and the computer program therefrom read is installed in storage area 408 as required.

When series of processes above-mentioned by software simulating, from network such as the Internet or storage medium, such as detachable media 411 installs the program forming software.

It will be understood by those of skill in the art that this storage medium is not limited to wherein having program stored therein shown in Fig. 4, distributes the detachable media 411 to provide program to user separately with equipment.The example of detachable media 411 comprises disk (comprising floppy disk (registered trademark)), CD (comprising compact disc read-only memory (CD-ROM) and digital universal disc (DVD)), magneto-optic disk (comprising mini-disk (MD) (registered trademark)) and semiconductor memory.Or hard disk that storage medium can be ROM402, comprise in storage area 408 etc., wherein computer program stored, and user is distributed to together with comprising their equipment.

The present invention also proposes a kind of program product storing the instruction code of machine-readable.When described instruction code is read by machine and performs, the above-mentioned method according to the embodiment of the present invention can be performed.

Correspondingly, be also included within of the present invention disclosing for carrying the above-mentioned storage medium storing the program product of the instruction code of machine-readable.Described storage medium includes but not limited to floppy disk, CD, magneto-optic disk, storage card, memory stick etc.

Above in the description of the specific embodiment of the invention, the feature described for a kind of embodiment and/or illustrate can use in one or more other embodiment in same or similar mode, combined with the feature in other embodiment, or substitute the feature in other embodiment.

Should emphasize, term " comprises/comprises " existence referring to feature, key element, step or assembly when using herein, but does not get rid of the existence or additional of one or more further feature, key element, step or assembly.

In addition, method of the present invention be not limited to specifications in describe time sequencing perform, also can according to other time sequencing ground, perform concurrently or independently.Therefore, the execution sequence of the method described in this instructions is not construed as limiting technical scope of the present invention.

Although above by the description of specific embodiments of the invention to invention has been disclosure, should be appreciated that, above-mentioned all embodiments and example are all illustrative, and not restrictive.Those skilled in the art can design various amendment of the present invention, improvement or equivalent in the spirit and scope of claims.These amendments, improvement or equivalent also should be believed to comprise in protection scope of the present invention.

Remarks:

1. generate and be used for Test Application in a method for the test case of the application program of touching type operation equipment, comprising:

From the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface;

User operation selected by execution, to obtain the current interface of described application program;

Judge whether to access current interface,

If accessed current interface, then generate described test case, it comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface,

If do not access current interface, then obtained the user operation in current interface according to current interface, and obtained user operation was added in described queue;

Repeat above-mentioned steps, until reach predetermined condition.

2. the method as described in remarks 1, wherein said queue is initialized to and comprises: the action starting described application program on the main interface of described touching type operation equipment.

3. the method as described in remarks 1, wherein Stochastic choice user operation from described queue.

4. the method as described in remarks 1, the wherein said user operation obtained in current interface according to current interface comprises: resolve described current interface, described current interface is divided into multiple region, provide candidate actions for each region.

5. the method as described in remarks 4, wherein

The described user operation obtained in current interface according to current interface also comprises: according to the position of region in current interface and/or the type of candidate actions, for each candidate actions gives priority;

Described from the candidate user operation queue of described application program select a user operation comprise: from described queue, select a user operation by described priority.

6. the method as described in remarks 5, wherein said method also comprises: in advance the screen divider of described touching type operation equipment is multiple pieces, and is each piece of corresponding weight of imparting;

Wherein said is that each candidate actions imparting priority comprises according to the position of region in current interface: according to the weight of the block divided in advance with this area coincidence, calculate the priority of described candidate actions.

7. the method as described in remarks 6, wherein said is that each candidate actions imparting priority comprises according to the position of region in current interface: according to the overlap ratio of this region with the described block divided in advance and the weight of relevant block, calculate the priority of described candidate actions.

8. the method as described in remarks 1, wherein said method also comprises: if do not access current interface, then add in access list by current interface; And

Wherein saidly judge whether that accessing current interface comprises: the similarity comparing each interface in current interface and access list, if have similarity higher than predetermined similarity threshold, be judged as accessing current interface, otherwise be judged as not accessing current interface.

9. the method as described in remarks 8, the similarity at wherein said each interface of comparing in current interface and access list comprises:

Extract the text at each interface in described current interface and described access list;

Relatively the similarity of text is as the similarity between described interface.

10. the method as described in remarks 1, wherein said specific action comprises: click, double-click, left/right/up/down slides.

11. methods as described in remarks 1, wherein said touching type operation equipment comprises smart mobile phone.

12. methods as described in remarks 1, the user operation in wherein obtained current interface is all possible user operation in described current interface.

13. methods as described in remarks 1, wherein said predetermined condition comprises one of following item: described queue is for empty, and the right of priority of the user operation in described queue is all lower than predetermined priority threshold value; User operation in described queue for interface phase all depth threshold is greater than for the degree of depth at the main interface of described application program.

14. 1 kinds of generations are used for Test Application in the equipment of the test case of the application program of touching type operation equipment, comprising:

Selecting arrangement, is configured to: from the candidate user operation queue of described application program, and select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface;

Actuating unit, is configured to: the user operation selected by execution, to obtain the current interface of described application program;

Judgment means, is configured to: judge whether to access current interface,

When being judged as accessing current interface, command generating device generates described test case, and described test case comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface,

When being judged as not accessing current interface, instruction acquisition device obtains the user operation in current interface according to current interface, and adds in described queue by obtained user operation;

Control device, is configured to: described in instruction, selecting arrangement, actuating unit, judgment means perform, until reach predetermined condition.

15. equipment as described in remarks 14, wherein said acquisition device comprises: resolution unit, is configured to: resolve described current interface, and described current interface is divided into multiple region, provides candidate actions for each region.

16. equipment as described in remarks 15, wherein

Described acquisition device also comprises: priority determining unit, is configured to: according to the position of region in current interface and/or the type of candidate actions, for each candidate actions gives priority;

Described selecting arrangement is further configured to: from described queue, select a user operation by described priority.

17. equipment as described in remarks 16, wherein said equipment also comprises: divide device, be configured to: in advance the screen divider of described touching type operation equipment is multiple pieces, and be each piece of corresponding weight of imparting;

Wherein said priority determining unit is further configured to: according to the weight of the block divided in advance with this area coincidence, calculate the priority of described candidate actions.

18. equipment as described in remarks 17, wherein said priority determining unit is further configured to: according to the overlap ratio of this region with the described block divided in advance and the weight of relevant block, calculate the priority of described candidate actions.

19. equipment as described in remarks 14, wherein said judgment means is further configured to: when being judged as not accessing current interface, current interface is added in access list; And

Wherein said judgment means is further configured to: the similarity comparing each interface in current interface and access list, if having similarity higher than predetermined similarity threshold, is judged as accessing current interface, otherwise is judged as not accessing current interface.

20. equipment as described in remarks 14, wherein said predetermined condition comprises one of following item: described queue is for empty, and the right of priority of the user operation in described queue is all lower than predetermined priority threshold value; User operation in described queue for interface phase all depth threshold is greater than for the degree of depth at the main interface of described application program.

Claims (10)

1. generate and be used for Test Application in a method for the test case of the application program of touching type operation equipment, comprising:
From the candidate user operation queue of described application program, select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface;
User operation selected by execution, to obtain the current interface of described application program;
Judge whether to access current interface,
If accessed current interface, then generate described test case, it comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface,
If do not access current interface, then obtained the user operation in current interface according to current interface, and obtained user operation was added in described queue;
Repeat above-mentioned steps, until reach predetermined condition.
2. the method for claim 1, wherein said queue is initialized to and comprises: the action starting described application program on the main interface of described touching type operation equipment.
3. the method for claim 1, the wherein said user operation obtained in current interface according to current interface comprises: resolve described current interface, described current interface is divided into multiple region, provide candidate actions for each region.
4. method as claimed in claim 3, wherein
The described user operation obtained in current interface according to current interface also comprises: according to the position of region in current interface and/or the type of candidate actions, for each candidate actions gives priority;
Described from the candidate user operation queue of described application program select a user operation comprise: from described queue, select a user operation by described priority.
5. method as claimed in claim 4, wherein said method also comprises: in advance the screen divider of described touching type operation equipment is multiple pieces, and is each piece of corresponding weight of imparting;
Wherein said is that each candidate actions imparting priority comprises according to the position of region in current interface: according to the weight of the block divided in advance with this area coincidence, calculate the priority of described candidate actions.
6. method as claimed in claim 5, wherein said is that each candidate actions imparting priority comprises according to the position of region in current interface: according to the overlap ratio of this region with the described block divided in advance and the weight of relevant block, calculate the priority of described candidate actions.
7. the method for claim 1, wherein said method also comprises: if do not access current interface, then add in access list by current interface; And
Wherein saidly judge whether that accessing current interface comprises: the similarity comparing each interface in current interface and access list, if have similarity higher than predetermined similarity threshold, be judged as accessing current interface, otherwise be judged as not accessing current interface.
8. method as claimed in claim 7, the similarity at wherein said each interface of comparing in current interface and access list comprises:
Extract the text at each interface in described current interface and described access list;
Relatively the similarity of text is as the similarity between described interface.
9. the method for claim 1, wherein said predetermined condition comprises one of following item: described queue is for empty, and the right of priority of the user operation in described queue is all lower than predetermined priority threshold value; User operation in described queue for interface phase all depth threshold is greater than for the degree of depth at the main interface of described application program.
10. generate and be used for Test Application in an equipment for the test case of the application program of touching type operation equipment, comprising:
Selecting arrangement, is configured to: from the candidate user operation queue of described application program, and select a user operation and it deleted from described queue, described user operation is the specific action performed in the specific region on specific interface;
Actuating unit, is configured to: the user operation selected by execution, to obtain the current interface of described application program;
Judgment means, is configured to: judge whether to access current interface,
When being judged as accessing current interface, command generating device generates described test case, and described test case comprises a series of user operations that are from the main interface of described touching type operation equipment, executed, that cause current interface,
When being judged as not accessing current interface, instruction acquisition device obtains the user operation in current interface according to current interface, and adds in described queue by obtained user operation;
Control device, is configured to: described in instruction, selecting arrangement, actuating unit, judgment means perform, until reach predetermined condition.
CN201410213950.2A 2014-05-20 2014-05-20 Test case generating method and test case generating device CN105094511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410213950.2A CN105094511A (en) 2014-05-20 2014-05-20 Test case generating method and test case generating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410213950.2A CN105094511A (en) 2014-05-20 2014-05-20 Test case generating method and test case generating device

Publications (1)

Publication Number Publication Date
CN105094511A true CN105094511A (en) 2015-11-25

Family

ID=54575104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410213950.2A CN105094511A (en) 2014-05-20 2014-05-20 Test case generating method and test case generating device

Country Status (1)

Country Link
CN (1) CN105094511A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201898A (en) * 2016-07-26 2016-12-07 北京班墨科技有限责任公司 A kind of method and device of test software based on artificial intelligence

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060372A (en) * 2007-06-26 2007-10-24 华为技术有限公司 A method and system for rapid creating the automation test script
US20110282642A1 (en) * 2010-05-15 2011-11-17 Microsoft Corporation Network emulation in manual and automated testing tools
CN102495804A (en) * 2011-12-27 2012-06-13 创新科存储技术(深圳)有限公司 Automatic software testing method
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060372A (en) * 2007-06-26 2007-10-24 华为技术有限公司 A method and system for rapid creating the automation test script
US20110282642A1 (en) * 2010-05-15 2011-11-17 Microsoft Corporation Network emulation in manual and automated testing tools
CN102495804A (en) * 2011-12-27 2012-06-13 创新科存储技术(深圳)有限公司 Automatic software testing method
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201898A (en) * 2016-07-26 2016-12-07 北京班墨科技有限责任公司 A kind of method and device of test software based on artificial intelligence
CN106201898B (en) * 2016-07-26 2018-12-04 北京班墨科技有限责任公司 A kind of method and device of the test software based on artificial intelligence

Similar Documents

Publication Publication Date Title
Dehnert et al. A storm is coming: A modern probabilistic model checker
John et al. Predictive human performance modeling made easy
US8271936B2 (en) Non-graphical model dependencies in graphical modeling environments
US20070245339A1 (en) Creating documentation screenshots on demand
US8600967B2 (en) Automatic organization of browsing histories
US9513941B2 (en) Codeless generation of APIs
US9336023B2 (en) Visual generation of mobile applications based on data models
US8806429B2 (en) Dynamic generation of formatted user interfaces in software environments
CN104025079A (en) User interface for translation webpage
TWI552075B (en) Converting desktop applications to web applications
US8549478B2 (en) Graphical user interface input element identification
US8810576B2 (en) Manipulation and management of links and nodes in large graphs
CN102520841B (en) Collection user interface
Fortmann-Roe Insight Maker: A general-purpose tool for web-based modeling & simulation
Moreira et al. A pattern-based approach for GUI modeling and testing
Joorabchi et al. Reverse engineering iOS mobile applications
Montero et al. Idealxml: An interaction design tool
US8839127B2 (en) Object transitions
US20140068498A1 (en) Techniques for capturing and displaying user interaction data
CN102081647B (en) The method and apparatus of display pop-up ad
US8924842B2 (en) Method and system to build interactive documents
CN105190548A (en) Automatic risk analysis of software
CN104662514A (en) Modernization of legacy software systems based on modeled dependencies
US9411482B2 (en) Visualizing user interfaces
US20110252359A1 (en) User interface manipulation for coherent content presentation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20181019