CN107678948A - Method for generating test case, terminal and storage medium - Google Patents

Method for generating test case, terminal and storage medium Download PDF

Info

Publication number
CN107678948A
CN107678948A CN201710848937.8A CN201710848937A CN107678948A CN 107678948 A CN107678948 A CN 107678948A CN 201710848937 A CN201710848937 A CN 201710848937A CN 107678948 A CN107678948 A CN 107678948A
Authority
CN
China
Prior art keywords
test case
target histories
abnormal
target
starting point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710848937.8A
Other languages
Chinese (zh)
Other versions
CN107678948B (en
Inventor
康德恩
何方
梁玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Overseas Electronics Huizhou Ltd
Original Assignee
TCL Overseas Electronics Huizhou 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 TCL Overseas Electronics Huizhou Ltd filed Critical TCL Overseas Electronics Huizhou Ltd
Priority to CN201710848937.8A priority Critical patent/CN107678948B/en
Publication of CN107678948A publication Critical patent/CN107678948A/en
Application granted granted Critical
Publication of CN107678948B publication Critical patent/CN107678948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The invention discloses a kind of method for generating test case, terminal and storage medium, methods described includes:Very first time stamp when obtaining the historical operation record of target device and occurring abnormal;Searched from historical operation record before very first time stamp and stab immediate target histories with the very first time and operated;The starting point for determining test case is operated according to the target histories, test case is generated according to the starting point of determination.The present invention is operated by searching target histories in being recorded from historical operation, the starting point for determining test case is operated according to the target histories, it is accurately positioned problem, solves problem so as to generate test case, problem is avoided to be come into the market because being difficult to positioning and further can not solving problem, product quality is improved, lifts Consumer's Experience.

Description

Method for generating test case, terminal and storage medium
Technical field
The present invention relates to automatic test field, more particularly to a kind of method for generating test case, terminal and storage medium.
Background technology
Domestic human cost more and more higher, urgent need reduce test manpower with automatic test.Factory is carrying out industrialization turn Type with automatic technology, it is necessary to improve testing efficiency, guarantee product quality.Present operating system, there is log system, it is various different Normal state, it can be seen that relevant information on log system.Software developer, according to these daily records, it is difficult to which orientation problem, past It is past to need tester's help reproduction problem, and many problems are sporadic, it is difficult to reappear.Because hardly possible reproduction, these problems Market can be flowed to, the customer complaint finally encountered.Existing automatic test cases, completely according to the experience of tester, Write manually.And for accidental sex chromosome mosaicism, it is difficult to write out rational test case.
Above- mentioned information is only used for auxiliary and understands technical scheme, does not represent and recognizes that above- mentioned information is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of method for generating test case, terminal and storage medium, it is intended to solve It is above-mentioned to be difficult to orientation problem so as to which the technical problem of corresponding test case write out.
To achieve the above object, the present invention provides a kind of method for generating test case, the method for generating test case bag Include following steps:
Very first time stamp when obtaining the historical operation record of target device and occurring abnormal;
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation;
The starting point for determining test case is operated according to the target histories, generating test according to the starting point of determination uses Example.
Preferably, it is described that the starting point for determining test case is operated according to the target histories, specifically include:
Judge whether the target histories operation is preset data;
When the target histories operation note is the preset data, by timestamp corresponding to target histories operation Starting point as test case.
Preferably, it is described judge whether target histories operation is preset data after, methods described also includes:
When target histories operation is not the preset data, when obtaining second corresponding to the target histories operation Between stab;
Searched from historical operation record before being in second timestamp and with second timestamp most Close new target histories operation, then perform and described judge that the target histories operate the step of whether being preset data.
Preferably, the preset data specifically includes:Application start-up data or without screen menu type adjust operation interface or Recorded in the page layout switch that a page stop exceedes preset time and do not send any operational order or have predetermined number.
Preferably, the historical operation record includes:Historical operation and history page data;
Correspondingly, it is described from the historical operation record in search in the very first time stamp before and with it is described The very first time stabs immediate target histories operation;The starting point for determining test case is operated according to the target histories, according to The starting point generation test case of determination, is specifically included:
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation and target histories page data;
The starting point of test case is determined according to target histories operation and history page data, according to the starting of determination Point generation test case.
Preferably, before the very first time stamp when historical operation for obtaining target device records and occurs abnormal, institute Stating method also includes:
Obtain the system journal of the target device;
Determine that the target device with the presence or absence of exception, exists abnormal in the target device according to the system journal When, the step of performing the historical operation record for obtaining target device and very first time stamp when occurring abnormal.
Preferably, it is described to determine that system with the presence or absence of exception, specifically includes according to the system journal:
Abnormal identifier is searched according to the system journal;
Abnormal identifier according to finding judges the system with the presence or absence of abnormal.
Preferably, it is described to judge the system with the presence or absence of abnormal, specific bag according to according to the abnormal identifier found Include:
Obtain the 3rd timestamp when the abnormal identifier occurs;
The historical operation before being in the 3rd timestamp is searched from historical operation record;
Judge the system with the presence or absence of abnormal according to the historical operation.
In addition, to achieve the above object, the present invention also proposes a kind of terminal, and the terminal includes:Memory, processor and It is stored in the test case generator that can be run on the memory and on the processor, the Test cases technology journey Sequence is arranged for carrying out the step of method for generating test case as described above.
In addition, to achieve the above object, the present invention also proposes a kind of computer-readable recording medium, described computer-readable Test case generator is stored with storage medium, is realized when the test case generator is executed by processor as above The step of described method for generating test case.
The very first time when present invention records by obtaining the historical operation of target device and occurs abnormal stabs;Gone through from described Searched in history operation note before very first time stamp and stab immediate target histories with the very first time and grasped Make;The starting point for determining test case is operated according to the target histories, test case is generated according to the starting point of determination.According to The very first time stabs and target histories operation is accurately positioned problem, solves problem so as to generate test case, avoids problem because being difficult to Positioning further can not solve problem and come into the market.
Brief description of the drawings
Fig. 1 is the terminal structure for the hardware running environment that a kind of method for generating test case embodiment scheme of the present invention is related to Schematic diagram;
Fig. 2 is a kind of schematic flow sheet of method for generating test case first embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of method for generating test case second embodiment of the present invention;
Fig. 4 is a kind of schematic flow sheet of method for generating test case 3rd embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Reference picture 1, Fig. 1 are the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to.
As shown in figure 1, the terminal can include:Processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is used to realize the connection communication between these components. User interface 1003 can include display screen (Display), input block such as keyboard (Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 can optionally connect including the wired of standard Mouth, wave point (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage terminal.
It will be understood by those skilled in the art that the restriction of the structure shown in Fig. 1 not structure paired terminal, can include than More or less parts are illustrated, either combine some parts or different parts arrangement.
The terminal can be desktop computer, notebook computer, television set, smart mobile phone or tablet personal computer etc., this implementation Example is not any limitation as to this.
As shown in figure 1, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, network Believe module, Subscriber Interface Module SIM and test case generator.
In the terminal shown in Fig. 1, network interface 1004 is mainly used in connection server, and carrying out data with server leads to Letter;User interface 1003 is mainly used in receiving the instruction of user's input, and the terminal calls memory by processor 1001 The test case generator stored in 1005, and perform following operate:
Very first time stamp when obtaining the historical operation record of target device and occurring abnormal;
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation;
The starting point for determining test case is operated according to the target histories, generating test according to the starting point of determination uses Example.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
Judge whether the target histories operation is preset data;
When the target histories operation note is the preset data, by timestamp corresponding to target histories operation Starting point as test case.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
When target histories operation is not the preset data, when obtaining second corresponding to the target histories operation Between stab;
Searched from historical operation record before being in second timestamp and with second timestamp most Close new target histories operation, then perform and described judge that the target histories operate the step of whether being preset data.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation and target histories page data;
The starting point of test case is determined according to target histories operation and history page data, according to the starting of determination Point generation test case.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
Obtain the system journal of the target device;
Determine that the target device with the presence or absence of exception, exists abnormal in the target device according to the system journal When, the step of performing the historical operation record for obtaining target device and very first time stamp when occurring abnormal.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
Abnormal identifier is searched according to the system journal;
Abnormal identifier according to finding judges the system with the presence or absence of abnormal.
Further, processor 1001 can call the test case generator stored in memory 1005, also perform Operate below:
Obtain the 3rd timestamp when the abnormal identifier occurs;
The historical operation before being in the 3rd timestamp is searched from historical operation record;
Judge the system with the presence or absence of abnormal according to the historical operation.
Based on above-mentioned hardware configuration, a kind of method for generating test case embodiment of the present invention is proposed.
Reference picture 2, propose a kind of method for generating test case first embodiment of the present invention.
In the present embodiment, the method for generating test case, comprises the following steps:
Step S10, very first time stamp when obtaining the historical operation record of target device and occurring abnormal;
It will be appreciated that the target device can be television set, smart mobile phone, tablet personal computer, notebook computer or platform Formula computer etc., the present embodiment is not any limitation as to this.
It should be noted that generally have log system in the operating system of target device, the operation shape for target device State has record, commonly referred to as system journal, when the target device occurs abnormal, various abnormalities, in system journal On can view relevant information, every daily record can all have corresponding timestamp, then when occurring abnormal, can be looked into according to system journal Timestamp when exception occurs is found, i.e., described very first time stamp.
It should be understood that equipment, when carrying out various operations, system generally has operation note, according to the operation note Any operation that device systems are done in each time can be checked, each operation is corresponding with corresponding timestamp, can understand Understanding specifically when performing corresponding operation, operation note is analyzed, so as to find problem generation Timestamp, so as to orientation problem.
Step S20, searched from historical operation record before very first time stamp and with described first The immediate target histories operation of timestamp;
It will be appreciated that in the prior art, when occurring abnormal, often because problem can not be accurately positioned, and cause to ask Topic comes into the market, and in the present embodiment, when occurring abnormal, obtains corresponding very first time stamp when exception occurs, then set from target The historical operation before the very first time stabs is searched in the historical operation record of standby system, will be stabbed most with the very first time Close historical operation is operated as target histories, then target histories operation is analyzed, and is gone wrong so as to position.
Step S30, the starting point for determining test case is operated according to the target histories, generated according to the starting point of determination Test case.
It should be understood that analyzing target histories operation, judge whether the target histories operation is abnormal Operation data, when target histories operation is abnormal operation data, it may be determined that the time that the target histories operation occurs The timestamp occurred for problem is stabbed, then can determine that the starting point of test case, and then generates test case, solution is asked accordingly Topic.
It should be noted that when target histories operation is not abnormal operation data, illustrate the very first time stamp It is not the time that problem occurs, then needs to further search for abnormal operation, now, obtains corresponding to target histories operation the Two timestamps, from the historical operation record in search be in second timestamp before and with second timestamp Immediate new target histories operation, the starting point of test case is determined further according to the new target histories operation.In this way, Untill the target histories operation found is capable of determining that the starting point of test case.
In the specific implementation, in historical operation record, generally except historical operation, history page data are also had, In order to more comprehensively more accurately find out the timestamp of problem appearance, in the present embodiment, the historical operation record includes:History is grasped Work and history page data;
Correspondingly, it is described from the historical operation record in search in the very first time stamp before and with it is described The very first time stabs immediate target histories operation;The starting point for determining test case is operated according to the target histories, according to The starting point generation test case of determination, is specifically included:
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation and target histories page data;
The starting point of test case is determined according to target histories operation and history page data, according to the starting of determination Point generation test case.
The present embodiment such scheme, the very first time when historical operation by obtaining target device records and occurs abnormal Stamp;Search before very first time stamp and stabbed with the very first time closest from historical operation record Target histories operation;The starting point for determining test case is operated according to the target histories, is generated according to the starting point of determination Test case.Problem is accurately positioned according to very first time stamp and target histories operation, problem is solved so as to generate test case, keeps away Exempt from problem to come into the market because being difficult to positioning and further can not solving problem, improve product quality, lift Consumer's Experience.
Further, as shown in figure 3, proposing that a kind of method for generating test case second of the present invention is real based on first embodiment Apply example.
In the present embodiment, the step S30, is specifically included:
Step S301, judge whether the target histories operation is preset data;
It will be appreciated that target histories operation is analyzed, when generally occurring within abnormal, the target histories operation Can be different from routine operation, the preset data is abnormal operation data, generally when target histories operation is described default During data, it can determine that and occur for problem, and then the starting point using timestamp corresponding to target histories operate as test case.For It is accurately positioned the timestamp for generation of ging wrong, in the present embodiment, the default abnormal data includes:Application start-up data;Or, Operation interface is adjusted without screen menu type;Or, stopped in a page more than preset time and do not send any operational order; Or, the page layout switch for having predetermined number records.
It should be understood that when application starts, easily there is the exception such as interim card, start if target histories operation is application Data, then it is the timestamp that occurs extremely to regard as timestamp corresponding to application start-up data, by the application start-up data Starting point of the corresponding timestamp as test case.When target histories operation is application start-up data, by the mesh Mark starting point of the timestamp as test case corresponding to historical operation.
It will be appreciated that screen menu type adjustment interface, the every tune of display usually ejected by screen after Menu key The rectangle menu of project information is saved, color, pattern, geometry etc. can be included to display work in every index by the menu It is adjusted, so as to reach optimal use state.It is without screen menu type adjustment interface when the target histories operate, then says The bright target histories operation is abnormal operation.Such as:Video is played for a long time, occurs exception during video is played, Can not display screen menu formula adjustment interface, then broadcast interface is directly entered, by the time corresponding to the historical operation of video playback Stab the starting point as test case.When then the target histories operation is no screen menu type regulation operation interface, by described in Starting point of the timestamp as test case corresponding to target histories operation.
It should be noted that the target device is operationally, generally the long time will not be stopped in a page, if Stopped the long time in a page, and without any operational order is sent, it is the abnormal page to illustrate this page, such as:If The target device is being tested, then can send test instruction always, the interval time between test instruction generally only 10 Second, and stopped 2 minutes if there is a page, and without any operational order of transmission, then it is assumed that exception be present, then by secondary page Starting point of the timestamp that face occurs as test case.When target histories operation is that a page is stopped more than presetting Between and do not send any operational order, starting point that can be using timestamp corresponding to the target histories operate as test case.
It should be understood that the step of generally returning is more, and the easier abnormal frame of reproduction, that is to say, that page layout switch is more, Abnormal easier reproduction, when generally there are 10 page layout switch records, abnormal frame can be reappeared.The target histories operation be have it is pre- If during the page layout switch record of quantity, using timestamp corresponding to target histories operation as the starting point of test case.
Step S302, when the target histories operation note is the preset data, by target histories operation pair Starting point of the timestamp answered as test case.
In the specific implementation, can determine whether the target histories operation is application start-up data;Or, without screen menu type Adjust operation interface;Or, stopped in a page more than preset time and do not send any operational order;Or, there is predetermined number Page layout switch record in any situation, any one of above-mentioned four kinds of situations feelings when the target histories operation note Condition, then using timestamp corresponding to target histories operation as the starting point of test case.
In the present embodiment, after the step S301, in addition to:
Step S303, when target histories operation is not the preset data, obtain the target histories operation pair The second timestamp answered;
It should be understood that when target histories operation is not the preset data, then it is assumed that the target histories behaviour Timestamp corresponding to work is not the time that problem occurs, it is impossible to as the starting point of test case, now, it should continuing to search for Historical operation in historical operation record, untill the historical operation found is the preset data.So described in acquisition Second timestamp corresponding to target histories operation, new target histories are searched forward according to second timestamp and operated.
Step S304, searched from historical operation record before being in second timestamp and with described the The immediate new target histories operation of two timestamps, then perform the step S301.
It will be appreciated that when target histories operation is not the preset data, in historical operation record Historical operation is searched forward in continuation, when the target histories operation is before the very first time stabs and with described first Between stab immediate historical operation, then need to search historical operation forward again, so obtaining corresponding to target histories operation Second timestamp, the historical operation before second timestamp is searched from the historical operation record of target device system, Operated with the immediate historical operation of the second timestamp as new target histories, then the new target histories are grasped Analyzed, determine whether preset data, gone wrong so as to position.
The present embodiment such scheme, operated by analyzing the target histories, be present count in target histories operation According to when, using the target histories operation corresponding to timestamp be used as test case starting point, the target histories operate not When being the default abnormal data, continued to search for from historical operation record second corresponding to target histories operation Operate before timestamp and with the immediate new target histories of second timestamp, grasped further according to new target histories Whether it is preset data, until when the new historical operation found is the preset data, by the new historical operation Starting point of the corresponding timestamp as test case, so as to be recorded according to the historical operation, accurately navigate to problem hair The raw time, the starting point of test case is determined, and then generate test case and solve problem, avoided problem from flowing to market, improve mesh Marking device quality, lift Consumer's Experience.
Further, as shown in figure 4, proposing that a kind of method for generating test case the 3rd of the present invention is real based on second embodiment Apply example.
In the present embodiment, before the step S10, in addition to:
Step S01, obtain the system journal of the target device;
It should be understood that generally there is log system in the operating system of target device, for the running status of target device There are record, commonly referred to as system journal, when the target device occurs abnormal, various abnormalities, in system journal Relevant information can be viewed, every daily record can all have corresponding timestamp.Then obtained from the log system of the target device Take the system journal of the target device.
Step S02, determine that the target device with the presence or absence of exception, is deposited in the target device according to the system journal When abnormal, the step S10 is performed.
It will be appreciated that by checking the system journal, it may recognize that the target device with the presence or absence of abnormal, example Such as:The target device is television set or smart mobile phone, in the system operation of the television set or smart mobile phone, standard output Running software information, as described system journal, when system occurs abnormal, abnormal mark occurs in the system journal Symbol, the abnormal identifier, includes system exception tag (label), error (mistake) and system status information field.According to The exception field, it may recognize that the system of the target device whether there is extremely, it is described according to the system in the present embodiment System daily record determines that system with the presence or absence of exception, specifically includes:Abnormal identifier is searched according to the system journal;According to finding Abnormal identifier judge the system with the presence or absence of abnormal.
It should be noted that when finding the abnormal identifier according to the system journal, according to the abnormal mark Know the 3rd timestamp corresponding to symbol, the historical operation before searching the 3rd timestamp in historical operation record, sentence Whether the disconnected historical operation found is abnormal operation, abnormal so as to further determine whether to exist, in the present embodiment, described Judge that the system with the presence or absence of exception, specifically includes according to according to the abnormal identifier found:Obtain the abnormal identifier The 3rd timestamp during appearance;The historical operation before being in the 3rd timestamp is searched from historical operation record; Judge the system with the presence or absence of abnormal according to the historical operation.
The present embodiment such scheme, abnormal identifier is searched by system journal, so as to judge whether system is abnormal, is being When system has abnormal, very first time stamp during abnormal occur, going through before further being stabbed according to the very first time are obtained History operation determines the starting point of test case, so as to can accurately orientation problem, generate test case, solve a problem promptly, Avoid problem from coming into the market, improve target device quality.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording medium On be stored with test case generator, following operation is realized when the test case generator is executed by processor:
Very first time stamp when obtaining the historical operation record of target device and occurring abnormal;
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation;
The starting point for determining test case is operated according to the target histories, generating test according to the starting point of determination uses Example.
Further, following operation is also realized when the test case generator is executed by processor:
Judge whether the target histories operation is preset data;
When the target histories operation note is the preset data, by timestamp corresponding to target histories operation Starting point as test case.
Further, following operation is also realized when the test case generator is executed by processor:
When target histories operation is not the preset data, when obtaining second corresponding to the target histories operation Between stab;
Searched from historical operation record before being in second timestamp and with second timestamp most Close new target histories operation, then perform and described judge that the target histories operate the step of whether being preset data.
Further, following operation is also realized when the test case generator is executed by processor:
Searched from historical operation record before very first time stamp and with very first time stamp most Close target histories operation and target histories page data;
The starting point of test case is determined according to target histories operation and history page data, according to the starting of determination Point generation test case.
Further, following operation is also realized when the test case generator is executed by processor:
Obtain the system journal of the target device;
Determine that the target device with the presence or absence of exception, exists abnormal in the target device according to the system journal When, the step of performing the historical operation record for obtaining target device and very first time stamp when occurring abnormal.
Further, following operation is also realized when the test case generator is executed by processor:
Abnormal identifier is searched according to the system journal;
Abnormal identifier according to finding judges the system with the presence or absence of abnormal.
Further, following operation is also realized when the test case generator is executed by processor:
Obtain the 3rd timestamp when the abnormal identifier occurs;
The historical operation before being in the 3rd timestamp is searched from historical operation record;
Judge the system with the presence or absence of abnormal according to the historical operation.
The present embodiment such scheme, operated by searching target histories in being recorded from historical operation, gone through according to the target History operation determines the starting point of test case, is accurately positioned problem, solves problem so as to generate test case, avoids problem because of difficulty Further can not solve problem with positioning and come into the market, improve product quality, lift Consumer's Experience.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Herein, the use of word first, second, and third does not indicate that any order.Can be by these word solutions It is interpreted as title.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing information is made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method for generating test case, it is characterised in that the described method comprises the following steps:
Very first time stamp when obtaining the historical operation record of target device and occurring abnormal;
Search before very first time stamp and stabbed with the very first time closest from historical operation record Target histories operation;
The starting point for determining test case is operated according to the target histories, test case is generated according to the starting point of determination.
2. method for generating test case as claimed in claim 1, it is characterised in that described to be operated really according to the target histories Determine the starting point of test case, specifically include:
Judge whether the target histories operation is preset data;
When the target histories operation note is the preset data, using the target histories operation corresponding to timestamp as The starting point of test case.
3. method for generating test case as claimed in claim 2, it is characterised in that described to judge that the target histories operation is It is no be preset data after, methods described also includes:
When target histories operation is not the preset data, the second time corresponding to the target histories operation is obtained Stamp;
Searched from historical operation record before being in second timestamp and closest with second timestamp New target histories operation, then perform and described judge that the target histories operate the step of whether being preset data.
4. method for generating test case as claimed in claim 2 or claim 3, it is characterised in that the preset data includes:Using opening Dynamic data;
Or, adjust operation interface without screen menu type;
Or, stopped in a page more than preset time and do not send any operational order;
Or, the page layout switch for having predetermined number records.
5. such as the method for generating test case described in any one of claims 1 to 3, it is characterised in that the historical operation note Record includes:Historical operation and history page data;
Correspondingly, searched in the record from the historical operation before very first time stamp and with described first The immediate target histories operation of timestamp;The starting point for determining test case is operated according to the target histories, according to determination Starting point generation test case, specifically include:
Search before very first time stamp and stabbed with the very first time closest from historical operation record Target histories operation and target histories page data;
The starting point of test case is determined according to target histories operation and history page data, is given birth to according to the starting point of determination Into test case.
6. such as the method for generating test case described in any one of claims 1 to 3, it is characterised in that the acquisition target is set Before very first time stamp when standby historical operation records and occurs abnormal, methods described also includes:
Obtain the system journal of the target device;
Determine that the target device with the presence or absence of exception, when the target device has abnormal, is held according to the system journal The step of very first time when row historical operation for obtaining target device records and occurs abnormal stabs.
7. method for generating test case as claimed in claim 6, it is characterised in that described that system is determined according to the system journal System specifically includes with the presence or absence of exception:
Abnormal identifier is searched according to the system journal;
Abnormal identifier according to finding judges the system with the presence or absence of abnormal.
8. method for generating test case as claimed in claim 7, it is characterised in that described according to according to the abnormal mark found Know symbol and judge that the system with the presence or absence of exception, specifically includes:
Obtain the 3rd timestamp when the abnormal identifier occurs;
The historical operation before being in the 3rd timestamp is searched from historical operation record;
Judge the system with the presence or absence of abnormal according to the historical operation.
9. a kind of terminal, it is characterised in that the terminal includes:Memory, processor and it is stored on the memory and can The test case generator run on the processor, the test case generator are arranged for carrying out such as claim The step of method for generating test case any one of 1 to 8.
10. a kind of computer-readable recording medium, it is characterised in that test is stored with the computer-readable recording medium and is used Example generation program, is realized as any one of claim 1 to 8 when the test case generator is executed by processor The step of method for generating test case.
CN201710848937.8A 2017-09-18 2017-09-18 Test case generation method, terminal and storage medium Active CN107678948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710848937.8A CN107678948B (en) 2017-09-18 2017-09-18 Test case generation method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710848937.8A CN107678948B (en) 2017-09-18 2017-09-18 Test case generation method, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107678948A true CN107678948A (en) 2018-02-09
CN107678948B CN107678948B (en) 2021-09-07

Family

ID=61137253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710848937.8A Active CN107678948B (en) 2017-09-18 2017-09-18 Test case generation method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107678948B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108490922A (en) * 2018-04-27 2018-09-04 北京新能源汽车股份有限公司 A kind of generation method and device of unified diagnostic service test case
CN109460349A (en) * 2018-09-19 2019-03-12 武汉达梦数据库有限公司 A kind of method for generating test case and device based on log
CN109460363A (en) * 2018-11-09 2019-03-12 贵州医渡云技术有限公司 Automated testing method, device, electronic equipment and computer-readable medium
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium
CN113221122A (en) * 2021-05-21 2021-08-06 珠海金山网络游戏科技有限公司 Vulnerability reproduction method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7661031B2 (en) * 2006-12-28 2010-02-09 International Business Machines Corporation Correlating macro and error data for debugging program error event
CN102768639A (en) * 2012-06-11 2012-11-07 北京奇虎科技有限公司 Operating system kernel-level error positioning method and device
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN105955862A (en) * 2016-04-15 2016-09-21 乐视控股(北京)有限公司 Abnormal problem monitoring positioning method and device
CN106055473A (en) * 2016-05-23 2016-10-26 乐视控股(北京)有限公司 Test method and apparatus
CN107025167A (en) * 2015-12-21 2017-08-08 英特尔公司 The method and apparatus for carrying out data-flow analysis using compiler type information in processor trace log

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7661031B2 (en) * 2006-12-28 2010-02-09 International Business Machines Corporation Correlating macro and error data for debugging program error event
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN102768639A (en) * 2012-06-11 2012-11-07 北京奇虎科技有限公司 Operating system kernel-level error positioning method and device
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN107025167A (en) * 2015-12-21 2017-08-08 英特尔公司 The method and apparatus for carrying out data-flow analysis using compiler type information in processor trace log
CN105955862A (en) * 2016-04-15 2016-09-21 乐视控股(北京)有限公司 Abnormal problem monitoring positioning method and device
CN106055473A (en) * 2016-05-23 2016-10-26 乐视控股(北京)有限公司 Test method and apparatus

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108490922A (en) * 2018-04-27 2018-09-04 北京新能源汽车股份有限公司 A kind of generation method and device of unified diagnostic service test case
CN108490922B (en) * 2018-04-27 2020-03-24 北京新能源汽车股份有限公司 Generation method and device of unified diagnostic service test case
CN109460349A (en) * 2018-09-19 2019-03-12 武汉达梦数据库有限公司 A kind of method for generating test case and device based on log
CN109460363A (en) * 2018-11-09 2019-03-12 贵州医渡云技术有限公司 Automated testing method, device, electronic equipment and computer-readable medium
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium
CN111104324B (en) * 2019-12-17 2023-08-18 广州品唯软件有限公司 Method and device for generating test cases and computer readable storage medium
CN113221122A (en) * 2021-05-21 2021-08-06 珠海金山网络游戏科技有限公司 Vulnerability reproduction method and device

Also Published As

Publication number Publication date
CN107678948B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN107678948A (en) Method for generating test case, terminal and storage medium
CN107273280B (en) Log processing method and device, electronic equipment and storage medium
CN106598868B (en) Method and system a little are buried to the application program of client dynamic
US9161238B2 (en) Mobile device monitoring and testing
US8724795B1 (en) Problem centric knowledge management tool for call center
CN106126397A (en) The processing method of program crashing message and system
US20120218396A1 (en) Method and apparatus for usability testing of a mobile device
CN108874672B (en) Application program exception positioning method, device, equipment and storage medium
CN107453978A (en) Data statistical approach, mobile terminal, server and storage medium based on group
US20210124555A1 (en) System and method for providing a response to a user query using a visual assistant
JP2007074175A (en) Telephone service inspection system and program thereof
CN108614775A (en) Automated testing method, device, terminal device and computer readable storage medium
CN110362545A (en) Log monitoring method, device, terminal and computer readable storage medium
CN108039173A (en) Voice messaging input method, mobile terminal, system and readable storage medium storing program for executing
CN112115038A (en) Application testing method and device and storage medium
US20130145217A1 (en) Testing method and testing apparatus for testing function of electronic apparatus
CN107346280A (en) A kind of data report the method, apparatus and electronic equipment with data processing
CN112286485B (en) Method and device for controlling application through voice, electronic equipment and storage medium
CN109634838A (en) Position method, apparatus, storage medium and the electronic equipment of application failure
CN109815079A (en) Problem feedback method, device, computer equipment and storage medium
CN108965613A (en) Method, storage medium and application server based on the monitoring of collection system quality
JP6047410B2 (en) Test equipment
WO2021012741A1 (en) Abnormal front-end operation reminder method based on experience library and related device
WO2021142771A1 (en) Service ticket generation method, apparatus and system
US10924611B2 (en) Voice recognition system and call evaluation setting method

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
CB02 Change of applicant information

Address after: 516000 No. 1 Qiaoguang Road, Chenjiang street, Zhongkai high tech Zone, Huizhou, Guangdong

Applicant after: Maojia Technology (Guangdong) Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. 19 district

Applicant before: TCL OVERSEAS ELECTRONICS (HUIZHOU) Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant