CN108415831A - Method for generating test case and device, electronic equipment and readable storage medium storing program for executing - Google Patents

Method for generating test case and device, electronic equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN108415831A
CN108415831A CN201810114194.6A CN201810114194A CN108415831A CN 108415831 A CN108415831 A CN 108415831A CN 201810114194 A CN201810114194 A CN 201810114194A CN 108415831 A CN108415831 A CN 108415831A
Authority
CN
China
Prior art keywords
app
test case
user
clicks
click
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810114194.6A
Other languages
Chinese (zh)
Inventor
刘孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201810114194.6A priority Critical patent/CN108415831A/en
Publication of CN108415831A publication Critical patent/CN108415831A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A kind of method for generating test case and device of offer of the embodiment of the present invention, electronic equipment and readable storage medium storing program for executing.This method includes:Server obtains user from APP and clicks record, it is that the user in APP one-shots to end time clicks path that user, which clicks record, user click record include user click the location information of screen, click view name, click the electronic equipment type that time, the version of APP and APP are mounted, server clicks record according to the view name and user of clicking the sequencing of time, click and generates a test case, and server will be in the corresponding database of test case is stored in the version of APP and APP are mounted electronic equipment type.To which the user that can actually use APP according to user clicks record generation test case, has practicability, and reach the standard grade with the iteration new function of APP versions and automatically generate new test case, improves testing efficiency.

Description

Method for generating test case and device, electronic equipment and readable storage medium storing program for executing
Technical field
The present embodiments relate to software testing technology field more particularly to a kind of method for generating test case and device, Electronic equipment and readable storage medium storing program for executing.
Background technology
Along with the rapid development that mobile phone is applied, application program of mobile phone (APPlication, APP) is in occupation of very big The market share, an APP are needed to verify the correctness for function of newly reaching the standard grade by tester, be tested before reaching the standard grade every time Card is by can just reach the standard grade.There are the processes of the exploitation of test case and the execution of test for manual test, time-consuming and laborious, due to test Personnel's number and the testing time it is limited can lead to some problems, if test case is limited, test case is by tester It according to the demand proposition of product manager and develops, does not represent the thinking etc. of user, have been unable to meet software reliability test It needs, thus, automatic test is widely used.
Monkey tests are a kind of existing automatic tests, and Monkey tests the key-press input by analog subscriber, point Screen input is hit, gesture input etc. detects whether electronic equipment exception occurs after testing a period of time.Specifically, when For Monkey programs when simulator or true electronic equipment are run, Monkey programs will produce certain amount or certain time The event of interior stochastic simulation user's operation, such as click screen, click keys, gesture input etc. and some system levels Event (such as exits APP), to achieve the purpose that test.It is tested by using Monkey, tester need not expend the time Test case is developed with energy, test case is unlimited.
But the test case completely random that Monkey tests generate, for the test that new function is reached the standard grade, testing efficiency is very It is low, and do not have practicability.
Invention content
A kind of method for generating test case and device of offer of the embodiment of the present invention, electronic equipment and readable storage medium storing program for executing, can The test case for representing the true service condition of user is generated, there is practicability, improves testing efficiency.
In a first aspect, the embodiment of the present invention provides a kind of method for generating test case, including:
Server obtains user from application APP and clicks record, and it is the APP one-shots that the user, which clicks record, User in the end time clicks path, and it includes that user clicks the location information of screen, clicks that the user, which clicks record, View name, click the time, the APP version and electronic equipment type;
The server clicks record generation according to the sequencing of time, the view name of click and the user is clicked One test case;
The test case is stored in data corresponding with the version of the APP and electronic equipment type by the server In library.
Optionally, the test case is stored in and the version of the APP and electronic equipment type pair by the server The database answered, including:
The server carries out same paths conjunction to stored test case in the database and the test case And the test case is stored in and the path termination and path pair according to the path termination of the test case and path In the subdata base answered, when the test case stored in each subdata base includes location information and the click that user clicks screen Between.
Optionally, the method further includes:
The server is stored according in the number of all test cases generated in preset time and each subdata base The number of test case calculate and store the percentage that user clicks each individual path.
Optionally, it is the point that the preceding user sent after the APP starts uses the APP that the user, which clicks record, Hit record.
Optionally, the APP terminate include the APP exit or the APP collapse.
Second aspect, the embodiment of the present invention provide a kind of Test cases technology device, including:
Acquisition module clicks record for obtaining user from application APP, and it is the APP that the user, which clicks record, User in one-shot to end time clicks path, and it includes the position letter that user clicks screen that the user, which clicks record, Breath, click view name, click the time, the APP version and electronic equipment type;
Generation module, for clicking record according to the sequencing of click time, the view name of click and the user Generate a test case;
Memory module, it is corresponding with the version of the APP and electronic equipment type for being stored in the test case In database.
Optionally, the memory module is used for:
Same paths are carried out to stored test case in the database with the test case to merge, according to described The test case is stored in subdata corresponding with the path termination and path by the path termination of test case and path In library, the test case stored in each subdata base includes that user clicks the location information of screen and clicks the time.
Optionally, described device further includes:
Computing module, for being deposited according in the number of all test cases generated in preset time and each subdata base The number of the test case of storage calculates and stores the percentage that user clicks each individual path.
Optionally, it is the point that the preceding user sent after the APP starts uses the APP that the user, which clicks record, Hit record.
Optionally, the APP terminate include the APP exit or the APP collapse.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including:
Memory, for storing program instruction;
Processor, for calling and executing the program instruction in the memory, to realize the test case of first aspect Generation method.
Fourth aspect, the embodiment of the present invention provide a kind of readable storage medium storing program for executing, computer are stored in readable storage medium storing program for executing Program, when at least one processor of Test cases technology device executes the computer program, Test cases technology device is held The method for generating test case of row first aspect.
Method for generating test case and device provided in an embodiment of the present invention, electronic equipment and readable storage medium storing program for executing, pass through Server obtains user from APP and clicks record, and it is that the user in APP one-shots to end time clicks road that user, which clicks record, Diameter, user click record include user click the location information of screen, the view name of click, the click time, APP version and Electronic equipment type, server click record generation one according to the sequencing of time, the view name of click and user is clicked Test case is stored in database corresponding with the version of APP and electronic equipment type by a test case, last server. To which the user that can actually use APP according to user clicks record generation test case, represents the use of real user, has There is practicability, and reach the standard grade with the iteration new function of APP versions and automatically generate new test case, improves testing efficiency.
Description of the drawings
It, below will be to embodiment or existing in order to clearly demonstrate the embodiment of the present invention or technical solution in the prior art Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments of embodiment, for those of ordinary skill in the art, without having to pay creative labor, also It can be obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of method for generating test case provided in an embodiment of the present invention;
Fig. 2 is to click the test case schematic diagram that record generates according to first user;
Fig. 3 is to click the test case schematic diagram that record generates according to Article 2 user;
Fig. 4 is a kind of flow chart of method for generating test case provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram after merging same paths;
Fig. 6 is a kind of storage schematic diagram of the test case generated using method for generating test case provided by the embodiment;
Fig. 7 is a kind of storage schematic diagram of the test case generated using method for generating test case provided by the embodiment;
Fig. 8 is a kind of test case schematic diagram of the database purchase of server provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of Test cases technology device provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of Test cases technology device provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the embodiment of the present invention, instead of all the embodiments.Based on the embodiment in the embodiment of the present invention, this field The every other embodiment that those of ordinary skill is obtained without making creative work, belongs to implementation of the present invention The range of example protection.
The test case of Monkey tests in the prior art is the test case of stochastic simulation user's operation, is on the one hand It randomly generates, for the test that new function is reached the standard grade, or using the test case of intrinsic stochastic simulation user's operation, therefore Testing efficiency is very low, and another aspect test case does not represent the behavior of user, therefore does not have practicability, to solve this problem, A kind of method for generating test case and device of the application offer, electronic equipment and readable storage medium storing program for executing can use electricity according to user The data of sub- equipment generate test case, and test case is not limited, as the iteration new function of APP versions is reached the standard grade certainly Movable property gives birth to new test case, represents the use of real user, has practicability, improves testing efficiency.With reference to attached The technical solution of the application is described in detail in figure.
First, the part term in the embodiment of the present invention is explained below, in order to those skilled in the art Understand.
1, electronic equipment, including but not limited to mobile station (Mobile Station, MS), mobile terminal (Mobile Terminal), mobile phone (Mobile Telephone), mobile phone (handset) and portable equipment (portable Equipment) etc., which can be through wireless access network (Radio Access Network, RAN) and one or more Core net is communicated, for example, electronic equipment can be mobile phone (or being " honeycomb " phone), have wireless communication function Computer etc., electronic equipment can also be portable, pocket, hand-held, built-in computer or vehicle-mounted mobile dress It sets or equipment.
2, APP is the third party application on electronic equipment, also referred to as client, such as net purchase class APP, local clothes Be engaged in class APP, also other financing classes APP, searching class APP etc..
Fig. 1 is a kind of flow chart of method for generating test case provided in an embodiment of the present invention, and the method for the present embodiment can Applied to electronic equipment, the executive agent of the present embodiment can be the server of an APP, as shown in Figure 1, the method for the present embodiment May include:
S101, server obtain user from APP and click record, and it is APP one-shots to the end time that user, which clicks record, Interior user clicks path, when user's click record includes that user clicks the location information of screen, the view name of click, click Between, the version of APP and electronic equipment type.
Specifically, user is when using APP, and since starting APP, to APP, this terminates after starting, and APP statistics should The click path of user in the section time, APP terminate to include that APP is exited or APP collapses, and user, which clicks, once just counts primary, work Record is clicked for a user to preserve, if record last time click behavior is not to exit APP, is considered as collapse.Wherein, it uses It is that the preceding user sent after APP starts is recorded using the click of APP that record is clicked at family, i.e., that is, APP preservations are counted User click record, APP next time start after, report a preceding user using the APP click record.
Wherein, the location information that user clicks screen can be the abscissa and ordinate that user clicks screen, such as (60, 100).The view name of click can be the Page Name clicked, such as homepage, major class of renting a house page, exit and collapse.When click Between can be since start timing.
S102, server click record generation one according to the sequencing of time, the view name of click and user is clicked A test case.
Specifically, server clicks record generation according to the sequencing of time, the view name of click and user is clicked One test case, by taking following two users click record as an example, wherein user clicks the location information of screen to click screen For coordinate:
First user clicks record:
Electronic equipment type:The version of iPhone 6, APP:Version 7.7.0
00:00:00 starts
00:00:05 is current:Homepage clicks the view name that screen coordinate (60,100) is clicked:Major class of renting a house page
00:00:08 is current:Major class of renting a house page clicks the view name that screen coordinate (60,120) is clicked:Whole rent list page
00:00:15 is current:Whole rent list page clicks the view name that screen coordinate (30,60) is clicked:Screen the page
00:00:18 is current:It screens the page and clicks the view name that screen coordinate (10,200) is clicked:Whole rent list page
00:00:24 is current:The whole view name rented list page and clicked:It exits
Server clicks record according to the user and generates one according to the view name of the sequencing and click of clicking the time A test case, Fig. 2 is to click the test case schematic diagram that record generates according to first user, as shown in Fig. 2, being opened from APP It is dynamic to start to exiting APP to terminate, the time is only clicked except starting, is exited without clicking except screen coordinate, each remaining click View name be corresponding with and click the time and click screen coordinate, the path termination of test case shown in Fig. 2 is to exit, Fig. 2 Shown in the path of test case be that " startup-homepage-whole whole rent list page-of rent list page-screening page-of major class page-of renting a house is moved back Go out ".
Article 2 user clicks record:
Electronic equipment type:The version of iPhone 6, APP:Version 7.7.0
00:00:00 starts
00:00:05 is current:Homepage clicks the view name that screen coordinate (60,100) is clicked:Major class of renting a house page
00:00:08 is current:Major class of renting a house page clicks the view name that screen coordinate (100,120) is clicked:Share list page
00:00:15 is current:It shares list page and clicks the view name that screen coordinate (30,60) is clicked:Screen the page
00:00:18 is current:It screens the page and clicks the view name that screen coordinate (10,200) is clicked:Share list page
00:00:24 is current:Share the view name of list page click:Without (collapse)
Server clicks record according to the user and generates one according to the view name of the sequencing and click of clicking the time A test case, Fig. 3 is to click the test case schematic diagram that record generates according to Article 2 user, as shown in figure 3, being opened from APP It is dynamic to start to APP collapses to terminate, the time is only clicked except starting, is exited without clicking except screen coordinate, each remaining click View name be corresponding with and click the time and click screen coordinate, the path termination of test case shown in Fig. 3 is collapse, Fig. 3 Shown in the path of test case be that "-homepage-, which is rented a house major class page ,-to be shared list page-the screening page-to share list page-and collapse for startup It bursts ".
Test case is stored in database corresponding with the version of APP and electronic equipment type by S103, server.
Specifically, each APP version and electronic equipment type correspond to a database, store and are somebody's turn to do in database APP versions and the corresponding test case of electronic equipment type.
In the present embodiment, server storage test case can be that the S102 test cases generated are directly stored in data In library.
Above-mentioned S101-S103 is so that a user clicks record as an example come the process for illustrating how test case generates, clothes Business device gets a user and clicks record, i.e., generates test case as procedure described above and store.
Optionally, identical test case can delete one test case of other reservations.
After the server storage test case generated, when automatic test needs test case, export test is used Example, can export corresponding test case according to APP versions and electronic equipment type, can also export the view that required test is clicked The test case of title, such as test case of collapse, not only can learn user in which page according to the Page Name in record Face produces collapse, while can also focus on to test these test cases, and collapse is allowed to reappear.Finally by developer Lai Repair bug.Mass users use APP on line daily, provide the APP usage records data (i.e. user clicks record) of magnanimity, These data can be converted into unduplicated test case in the embodiment of the present invention.These test cases apply similar to In the such automated test tool of Monkey tests, the click event of Monkey tests is random, but according to the present invention The method for generating test case that embodiment provides, test case are to use generated test case by actual user, and test is more Added with practicability.And reach the standard grade with the iteration new function of APP versions and automatically generate new test case, represent real user Use, improve testing efficiency.
Method for generating test case provided in this embodiment obtains user from APP by server and clicks record, Yong Hudian It is that the user in APP one-shots to end time clicks path to hit record, and it includes that user clicks screen that user, which clicks record, Location information, click view name, click the time, APP version and electronic equipment type, server is according to clicking the time Sequencing, the view name of click and user click record and generate a test case, and last server deposits test case Storage is in database corresponding with the version of APP and electronic equipment type.To which the user of APP can be actually used according to user It clicks record and generates test case, represent the use of real user, there is practicability, and as the iteration of APP versions is new Function, which is reached the standard grade, automatically generates new test case, improves testing efficiency.
Fig. 4 is a kind of flow chart of method for generating test case provided in an embodiment of the present invention, and the method for the present embodiment can Applied to electronic equipment, the executive agent of the present embodiment can be the server of an APP, as shown in figure 4, the method for the present embodiment May include:
S201, server obtain user from APP and click record, and it is APP one-shots to the end time that user, which clicks record, Interior user clicks path, when user's click record includes that user clicks the location information of screen, the view name of click, click Between, the version of APP and electronic equipment type.
Detailed content can be found in the associated description in S101, and details are not described herein again.
S202, server click record generation one according to the sequencing of time, the view name of click and user is clicked A test case.
Detailed process can be found in the associated description in S102, and details are not described herein again.
S203, server carry out same paths with test case to stored test case in database and merge, according to Test case is stored in subdata base corresponding with path termination and path by the path termination of test case and path, each The test case stored in subdata base includes that user clicks the location information of screen and clicks the time.
Specifically, each APP version and electronic equipment type correspond to a database, store and are somebody's turn to do in database APP versions and the corresponding test case of electronic equipment type.In the database, multiple subdatas have been divided according to path termination Library.
By taking Fig. 2 and two test cases shown in Fig. 3 as an example, if test case shown in Fig. 2 is to have been stored in database Test case, test case shown in Fig. 3 is the test case that receives of server, the path of test case shown in Fig. 2 For " startup-homepage-rent a house the whole whole rent list page-of rent list page-screening page-of major class page-exit ", path termination is to exit, The path of test case shown in Fig. 3 is that "-homepage-, which is rented a house major class page ,-to be shared list page-the screening page-and share list for startup Page-collapse ", path termination are collapse, and the path and test case shown in Fig. 3 to test case shown in Fig. 2 carry out path Merge, Fig. 5 is the schematic diagram after merging same paths, as shown in figure 5, and storing test case shown in Fig. 2 after merging In subdata base corresponding with the path termination of test case shown in Fig. 2 and path, test case shown in Fig. 3 is stored in As shown in figure 3 in the corresponding subdata base of the path termination of test case and path, the test stored in each subdata base is used Example includes that user clicks the location information of screen and clicks the time.
As shown in figure 5, after same paths merge, there are the whole rent lists of individual path in the next stage path of " major class of renting a house page " Page and share list page.
Optionally, the method for the present embodiment can also include:
Server is according to the survey stored in the number of all test cases generated in preset time and each subdata base The number of example on probation calculates and stores the percentage that user clicks each individual path.Not having individual path, then percentage is " 100% ", as shown in figure 5, the percentage of two individual paths is 50%.Convenient for being selected according to percentage when automatic test Test case.
When test case is very much, such as hundreds of, thousands of or tens of thousands of, still according to the storage method of S203, Fig. 6 A kind of storage schematic diagram for the test case generated using method for generating test case provided by the embodiment, as shown in fig. 6, The version of APP is 7.6.0, after APP starts, after opening homepage, has 5 individual paths (percentage difference is as shown in Figure 6), calculates User clicks the percentage of each individual path, such as when individual path is second-hand article major class page, can be by " second-hand article The number of all test cases generated in the number divided by preset time of the test case of the corresponding subdata base storage of major class page " Value obtained by mesh, such as individual path are when exiting, and can be the test cases that " will exit " corresponding subdata base storage Value obtained by the number of all test cases generated in number divided by preset time, " major class of renting a house page " this individual path Percentage can be 100% value for subtracting gained after this grade of other individual paths, wherein " ... " indicates the number that display is not unfolded According to.Subsequent individual path calculating percentage is similar, and details are not described herein again.
Fig. 7 is a kind of storage schematic diagram of the test case generated using method for generating test case provided by the embodiment, As shown in fig. 7, the version of APP is 7.7.0, after APP starts, after opening homepage, having 6 individual paths, (percentage is respectively such as Fig. 7 It is shown), it calculates user and clicks the percentage of each individual path, such as when individual path is second-hand article major class page, Ke Yishi It is all by being generated in the number divided by preset time of the test case of " second-hand article major class page " corresponding subdata base storage Value obtained by the number of test case, such as individual path are when exiting, and can " will exit " corresponding subdata base storage Test case number divided by preset time in value obtained by the number of all test cases that generates, such as individual path is Can be generation in the number divided by preset time for the test case that will move back " collapse " corresponding subdata base storage when collapse Value obtained by the number of all test cases, the percentage of " major class of renting a house page " this individual path can 100% subtract this The value of gained after the other individual paths of grade, wherein " ... " indicates the data that display is not unfolded.
After the server storage test case generated, when automatic test needs test case, export test is used Example, can export corresponding test case according to APP versions and electronic equipment type, can also export the view that required test is clicked The test case of title, Fig. 8 are a kind of test case schematic diagram of the database purchase of server provided in an embodiment of the present invention, By taking the test case that database shown in Fig. 8 is stored as an example, the following detailed description of the process for how exporting test case:
The test case of database purchase according to figure 8 can export 4 test cases, wherein path according to path Terminal is the test case exited, exits the click that can be stored in corresponding subdata base and correspond to each view name in the path Time and screen coordinate is clicked, such as a derived test case is:
IPhone 6, Version 7.7.0
00:00:00 starts
00:00:05 is current:Homepage clicks the view name that screen coordinate (60,100) is clicked:Major class of renting a house page
00:00:08 is current:Major class of renting a house page clicks the view name that screen coordinate (60,120) is clicked:Share list page
00:00:15 is current:It shares list page and clicks the view name that screen coordinate (30,60) is clicked:Details page
00:00:18 is current:The view name that details page is clicked:It exits
Method for generating test case provided in this embodiment, by server to stored test case in database with Test case carries out same paths merging, is stored in test case and path end according to the path termination of test case and path In point subdata base corresponding with path, the test case stored in each subdata base includes the position letter that user clicks screen Breath and click time when automatic test selects test case, can select to belong to after exporting test case according to path termination Test case in same path, the number that the click path can be also obtained according to the percentage in different paths (do not identify in Fig. 8 Go out the percentage in each path, percentage can be calculated according to the above method), it is convenient for selecting to survey according to percentage when automatic test Example on probation.Such as the test case of collapse, not only it can learn that user produces in which page according to the view name in path Collapse, while can also focus on to test these test cases, allow collapse to reappear.Bug is finally repaired by developer. The method for generating test case provided according to embodiments of the present invention, test case are used using generated test by actual user Example is tested more added with practicability.And reach the standard grade with the iteration new function of APP versions and automatically generate new test case, it represents The use for real user, improves testing efficiency.
Fig. 9 is a kind of structural schematic diagram of Test cases technology device provided in an embodiment of the present invention, as shown in figure 9, this The device of embodiment may include:Acquisition module 11, generation module 12 and memory module 13, wherein
Acquisition module 11, which is used to obtain user from APP, clicks record, and it is at the end of APP one-shots arrive that user, which clicks record, Interior user clicks path, and it includes that user clicks the location information of screen, the view name of click, click that user, which clicks record, Time, the version of APP and electronic equipment type.
Generation module 12 is used to click record according to the sequencing of click time, the view name of click and user and generate One test case.
Memory module 13 is used to test case being stored in database corresponding with the version of APP and electronic equipment type In.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 1 or Fig. 4, realize former Manage similar, details are not described herein again.
Test cases technology device provided in this embodiment obtains user from APP by acquisition module and clicks record, user It is that the user in APP one-shots to end time clicks path to click record, and it includes that user clicks screen that user, which clicks record, Location information, click view name, click the time, APP version and electronic equipment type, generation module according to click when Between sequencing, click view name and user click record generate a test case, last memory module will test Use case storage is in database corresponding with the version of APP and electronic equipment type.To which APP can be actually used according to user User click record and generate test case, represent the use of real user, there is practicability, and with APP versions Iteration new function, which is reached the standard grade, automatically generates new test case, improves testing efficiency.
Optionally, memory module 13 is used for:It is mutually gone the same way with test case to stored test case in database Diameter merges, and test case is stored in subnumber corresponding with path termination and path according to the path termination of test case and path It include location information and the click time that user clicks screen according to the test case in library, stored in each subdata base.
Figure 10 is a kind of structural schematic diagram of Test cases technology device provided in an embodiment of the present invention, as shown in Figure 10, On the basis of the device device shown in Fig. 9 of the present embodiment, further, can also include:
Computing module 14, the computing module 14 are used for according to the number of all test cases generated in preset time and every The number of the test case stored in one subdata base calculates and stores the percentage that user clicks each individual path.
Specifically, the acquisition module 11 in the present embodiment, which is used to obtain user from APP, clicks record, and user, which clicks record, is User in APP one-shots to end time clicks path, user click the location information that record includes user's click screen, The view name of click, click the time, APP version and electronic equipment type.Generation module 12 was used for according to the click time Sequencing, the view name of click and user click record and generate a test case.Memory module 13 will be for that will test use Example is stored in database corresponding with the version of APP and electronic equipment type.
In the above-described embodiments, it is that the preceding user sent after APP starts is remembered using the click of APP that user, which clicks record, Record.
In the above-described embodiments, APP terminate include APP exit or APP collapse.
Figure 11 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention, as shown in figure 11, the present embodiment Electronic equipment may include:Memory 21 and processor 22,
Memory 21, for storing program instruction, which can be flash (flash memory).
Processor 22, for calling and executing the program instruction in memory, to realize that Fig. 1 or shown in Fig. 4 tests are used Each step in example generation method.The specific associated description that may refer in previous methods embodiment.
Optionally, memory 21 can also be that memory 21 is integrated with processor 22 either independent.
The embodiment of the present invention also provides a kind of readable storage medium storing program for executing, and computer program is stored in readable storage medium storing program for executing, when When at least one processor of Test cases technology device executes the computer program, Test cases technology device executes first party The method for generating test case in face.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above various embodiments is only to illustrate the technical solution of the embodiment of the present invention, rather than to it Limitation;Although the embodiment of the present invention is described in detail with reference to foregoing embodiments, those skilled in the art It should be understood that:Its still can with technical scheme described in the above embodiments is modified, either to which part or All technical features carries out equivalent replacement;And these modifications or replacements, it does not separate the essence of the corresponding technical solution this hair The range of bright each embodiment technical solution of embodiment.

Claims (12)

1. a kind of method for generating test case, which is characterized in that including:
Server obtains user from application APP and clicks record, and it is the APP one-shots to tying that the user, which clicks record, User in the beam time clicks path, the user click record include the location information of user's click screen, click view Title, click the time, the APP version and electronic equipment type;
The server clicks record generation one according to the sequencing of time, the view name of click and the user is clicked Test case;
The test case is stored in database corresponding with the version of the APP and electronic equipment type by the server In.
2. according to the method described in claim 1, it is characterized in that, the server by the test case be stored in it is described The version and the corresponding database of electronic equipment type of APP, including:
The server carries out same paths with the test case to stored test case in the database and merges, root The test case is stored according to the path termination and path of the test case corresponding with the path termination and path In subdata base, the test case stored in each subdata base includes that user clicks the location information of screen and clicks the time.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
The server is according to the survey stored in the number of all test cases generated in preset time and each subdata base The number of example on probation calculates and stores the percentage that user clicks each individual path.
4. according to claims 1 to 3 any one of them method, which is characterized in that it is that the APP is opened that the user, which clicks record, The preceding user sent after dynamic is recorded using the click of the APP.
5. according to claims 1 to 3 any one of them method, which is characterized in that the APP terminates to include that the APP is exited Or the APP collapses.
6. a kind of Test cases technology device, which is characterized in that including:
Acquisition module clicks record for obtaining user from application APP, and it is that the APP is primary that the user, which clicks record, The user started in the end time clicks path, and it includes location information, the point that user clicks screen that the user, which clicks record, The view name that hits, click the time, the APP version and electronic equipment type;
Generation module is generated for clicking record according to the sequencing of click time, the view name of click and the user One test case;
Memory module, for the test case to be stored in data corresponding with the version of the APP and electronic equipment type In library.
7. device according to claim 6, which is characterized in that the memory module is used for:
Same paths are carried out to stored test case in the database with the test case to merge, according to the test The test case is stored in subdata base corresponding with the path termination and path by the path termination of use-case and path, The test case stored in each subdata base includes that user clicks the location information of screen and clicks the time.
8. device according to claim 7, which is characterized in that described device further includes:
Computing module, for according to storing in the number of all test cases generated in preset time and each subdata base The number of test case calculates and stores the percentage that user clicks each individual path.
9. according to claim 6~8 any one of them device, which is characterized in that it is that the APP is opened that the user, which clicks record, The preceding user sent after dynamic is recorded using the click of the APP.
10. according to claim 6~8 any one of them device, which is characterized in that the APP terminates to include that the APP is exited Or the APP collapses.
11. a kind of electronic equipment, which is characterized in that including:
Memory, for storing program instruction;
Processor, for calling and executing the program instruction in the memory, to realize described in any one of Claims 1 to 5 Method for generating test case.
12. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program in the readable storage medium storing program for executing, work as test When at least one processor of use-case generating means executes the computer program, the requirement of Test cases technology device perform claim 1~5 any one of them method for generating test case.
CN201810114194.6A 2018-02-05 2018-02-05 Method for generating test case and device, electronic equipment and readable storage medium storing program for executing Pending CN108415831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810114194.6A CN108415831A (en) 2018-02-05 2018-02-05 Method for generating test case and device, electronic equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810114194.6A CN108415831A (en) 2018-02-05 2018-02-05 Method for generating test case and device, electronic equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN108415831A true CN108415831A (en) 2018-08-17

Family

ID=63126946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810114194.6A Pending CN108415831A (en) 2018-02-05 2018-02-05 Method for generating test case and device, electronic equipment and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN108415831A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344056A (en) * 2018-09-07 2019-02-15 武汉达梦数据库有限公司 A kind of test method and test device
CN109460366A (en) * 2018-11-16 2019-03-12 郑州云海信息技术有限公司 A kind of software stability test method, device, equipment and medium
CN110543427A (en) * 2019-09-06 2019-12-06 五八有限公司 Test case storage method and device, electronic equipment and storage medium
CN111060325A (en) * 2019-12-13 2020-04-24 斑马网络技术有限公司 Test scene construction method and device, electronic equipment and storage medium
CN111949549A (en) * 2020-08-31 2020-11-17 携程计算机技术(上海)有限公司 Test request screening method, system, electronic device and storage medium
CN112115039A (en) * 2019-06-21 2020-12-22 百度在线网络技术(北京)有限公司 Test case generation method, device and equipment
CN112241362A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Test method, test device, server and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8166347B2 (en) * 2006-02-22 2012-04-24 Sap Ag Automatic testing for dynamic applications
CN103312851A (en) * 2013-05-31 2013-09-18 南京大学 Intelligent cellphone application interaction interface program usability testing method
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal
CN103729446A (en) * 2013-12-30 2014-04-16 广州金山网络科技有限公司 Processing method and device for user operation data and server
CN104133765A (en) * 2013-12-23 2014-11-05 腾讯科技(深圳)有限公司 Test case sending method and test case server of network activities
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN105893253A (en) * 2016-03-29 2016-08-24 百度在线网络技术(北京)有限公司 Application software testing method, device and equipment
CN106951373A (en) * 2017-04-25 2017-07-14 国家电网公司 A kind of automated testing method and device that O&M software is moved for power network webmaster
CN107273284A (en) * 2017-04-20 2017-10-20 北京小度信息科技有限公司 The method and device of test application program performance
US20170337116A1 (en) * 2016-05-18 2017-11-23 Google Inc. Application testing on different device types

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8166347B2 (en) * 2006-02-22 2012-04-24 Sap Ag Automatic testing for dynamic applications
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal
CN103312851A (en) * 2013-05-31 2013-09-18 南京大学 Intelligent cellphone application interaction interface program usability testing method
CN104133765A (en) * 2013-12-23 2014-11-05 腾讯科技(深圳)有限公司 Test case sending method and test case server of network activities
CN103729446A (en) * 2013-12-30 2014-04-16 广州金山网络科技有限公司 Processing method and device for user operation data and server
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN105893253A (en) * 2016-03-29 2016-08-24 百度在线网络技术(北京)有限公司 Application software testing method, device and equipment
US20170337116A1 (en) * 2016-05-18 2017-11-23 Google Inc. Application testing on different device types
CN107273284A (en) * 2017-04-20 2017-10-20 北京小度信息科技有限公司 The method and device of test application program performance
CN106951373A (en) * 2017-04-25 2017-07-14 国家电网公司 A kind of automated testing method and device that O&M software is moved for power network webmaster

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘娅: "《软件测试技术与实践》", 30 June 2016 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344056A (en) * 2018-09-07 2019-02-15 武汉达梦数据库有限公司 A kind of test method and test device
CN109344056B (en) * 2018-09-07 2021-02-26 武汉达梦数据库股份有限公司 Test method and test device
CN109460366A (en) * 2018-11-16 2019-03-12 郑州云海信息技术有限公司 A kind of software stability test method, device, equipment and medium
CN112115039A (en) * 2019-06-21 2020-12-22 百度在线网络技术(北京)有限公司 Test case generation method, device and equipment
CN112115039B (en) * 2019-06-21 2023-09-19 百度在线网络技术(北京)有限公司 Test case generation method, device and equipment
CN112241362A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Test method, test device, server and storage medium
CN110543427A (en) * 2019-09-06 2019-12-06 五八有限公司 Test case storage method and device, electronic equipment and storage medium
CN111060325A (en) * 2019-12-13 2020-04-24 斑马网络技术有限公司 Test scene construction method and device, electronic equipment and storage medium
CN111949549A (en) * 2020-08-31 2020-11-17 携程计算机技术(上海)有限公司 Test request screening method, system, electronic device and storage medium
CN111949549B (en) * 2020-08-31 2024-02-27 携程计算机技术(上海)有限公司 Test request screening method, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108415831A (en) Method for generating test case and device, electronic equipment and readable storage medium storing program for executing
EP2778929B1 (en) Test script generation system
Cartaxo et al. Test case generation by means of UML sequence diagrams and labeled transition systems
CN103984626B (en) A kind of method and device for generating test case script
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN105068936B (en) Method and device for testing stability of software
CA2677534C (en) Tariff management test automation
CN112015660A (en) Service testing method and device, electronic equipment and storage medium
CN108459964A (en) Test cases selection method, apparatus, equipment and computer readable storage medium
CN102999419B (en) A kind of Android test incident record back method and device
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
CN105487970A (en) Interface display method and apparatus
CN105760300B (en) A kind of automated testing method and test macro of STK/UTK business
CN111309624B (en) Test method, test device, test equipment and storage medium
CN106776165A (en) Server performance method of testing and system
CN109992506A (en) Scheduling tests method, apparatus, computer equipment and storage medium
CN107220169A (en) A kind of emulating server returns to the method and apparatus for customizing data
CN104462116A (en) Data selecting method and device
CN111382071A (en) User behavior data testing method and system
CN114003293B (en) Interface management method, device, electronic equipment and readable storage medium
CN106302011A (en) Method of testings based on multiterminal and terminal
CN109523246A (en) Subscriber payment channel method and device for planning
CN112801551A (en) Test method, device, equipment and storage medium for online room selection system
CN112882758A (en) iOS device identifier generation method and system
CN112506765A (en) Software testing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180817