CN109446099A - Automatic test cases generation method, device, medium and electronic equipment - Google Patents

Automatic test cases generation method, device, medium and electronic equipment Download PDF

Info

Publication number
CN109446099A
CN109446099A CN201811332060.8A CN201811332060A CN109446099A CN 109446099 A CN109446099 A CN 109446099A CN 201811332060 A CN201811332060 A CN 201811332060A CN 109446099 A CN109446099 A CN 109446099A
Authority
CN
China
Prior art keywords
test
scene
field
tested
test case
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
CN201811332060.8A
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.)
Guizhou Medical Duyun Technology Co Ltd
Original Assignee
Guizhou Medical Duyun Technology 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 Guizhou Medical Duyun Technology Co Ltd filed Critical Guizhou Medical Duyun Technology Co Ltd
Priority to CN201811332060.8A priority Critical patent/CN109446099A/en
Publication of CN109446099A publication Critical patent/CN109446099A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a kind of automatic test cases generation method, device, media, electronic equipment, this method comprises: test case data is parsed into multiple fields;Obtain the corresponding field value of each field of scene to be tested;The field value is transferred to corresponding field in test case script, to generate the corresponding test case of the scene to be tested.The utilization rate of automatic test cases can be improved in the technical solution of the embodiment of the present invention.

Description

Automatic test cases generation method, device, medium and electronic equipment
Technical field
The present invention relates to software testing technology fields, in particular to a kind of automatic test cases generation method, dress It sets, medium, electronic equipment.
Background technique
With constantly bringing forth new ideas for software development technique, network (web) the web system framework of front and back end separation becomes mainstream wind Lattice.
Webpage and interaction logic are realized in front end, rear end by the network transmission protocol (HTTP) service interface and front end into Row interaction.It can be found the problem early by the interface testing of the interactive interface of front and rear end, developer is helped to improve system System.Currently, there are many tool that can do interface testing, for example, Postman, soap UI, JMeter etc..The test block of open source Frame is also very much, for example, unittest, robot framework, a variety of different testing tools and frame have different characteristic and Usage scenario.However, it is exactly that the test for each project that can not fit like a glove needs that these tools, which all have a common problem, It asks, for different test scenes, there is different test cases, and tester needs to write each test case one Code file, which results in the work of the written in code of test case is very time-consuming, and there are also corresponding generations to tester The requirement of code ability.
Therefore, the written in code work for how reducing test case becomes urgent problem to be solved.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of automatic test cases generation method, device, medium and electronics Equipment, and then that reduces test case at least to a certain extent writes work.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of automatic test cases generation method is provided, comprising:
Test case data is parsed into multiple fields;
Obtain the corresponding field value of each field of scene to be tested;
The field value is transferred to corresponding field in test case script, it is corresponding to generate the scene to be tested Test case.
In a kind of example embodiment of the invention, the method also includes:
The multiple field is stored in table.
In a kind of example embodiment of the invention, the corresponding field of each field for obtaining scene to be tested Value includes:
Obtain the updated table;
Each unit of the table is parsed, the corresponding each field value of each field is obtained.
In a kind of example embodiment of the invention, the multiple field includes:
Use case description, interface IP address, the network transmission protocol, previous step, postposition step, test object.
In a kind of example embodiment of the invention, the corresponding field of each field for obtaining scene to be tested Value includes:
Obtain the corresponding keyword of previous step of the scene to be tested;
Set the keywords as the corresponding field value of the previous step.
In a kind of example embodiment of the invention, the method also includes:
It is corresponding to the test object each when the corresponding field value of the test object of acquisition is multiple The field value generates the corresponding test case of the scene to be tested respectively.
In a kind of example embodiment of the invention, the method also includes:
Automatic test is carried out to corresponding test object according to the scene to be tested corresponding test case.
According to a second aspect of the embodiments of the present invention, a kind of automatic test cases generating means are provided, comprising:
Data cell is parsed, for test case data to be parsed into multiple fields;
Field unit is obtained, for obtaining the corresponding field value of each field of scene to be tested;
Test case unit is generated, for the field value to be transferred to corresponding field in test case script, with life At the corresponding test case of the scene to be tested.
According to a third aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes that the automatic test cases as described in first aspect in above-described embodiment generate when described program is executed by processor Method.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize that the automatic test cases as described in first aspect in above-described embodiment are raw At method.
Technical solution provided in an embodiment of the present invention can include the following benefits:
In the technical solution provided by some embodiments of the present invention, by the way that test case data is parsed into multiple words Section, obtains the corresponding field value of each field of scene to be tested, field value is transferred to corresponding word in test case script Duan Zhong generates the test case of each test scene, so that tester does not have to the test case code to each test scene It is write one by one, reduces the work of tester, saved manpower and material resources;It simultaneously can be according to the word of each test scene Segment value automatically generates the test case of the test scene, and the compiling procedure of test case is automated, test case is improved Formation efficiency;And test case data may be reused, and reduce data redundancy, save system resource.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the flow chart of the automatic test cases generation method of embodiment according to the present invention;
Fig. 2 diagrammatically illustrates the test frame knot of the automatic test cases generation method of embodiment according to the present invention Structure schematic diagram;
Fig. 3 diagrammatically illustrates the testing process of the automatic test cases generation method of embodiment according to the present invention Figure;
Fig. 4 diagrammatically illustrates the block diagram of the automatic test cases generating means of embodiment according to the present invention;
Fig. 5 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However, It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
For different test scenes, test case is all difference, and tester needs to be write according to each test scene The code file of test case, the test case of each test scene cannot be used for other test scenes.
In consideration of it, present invention firstly provides a kind of automatic test cases generation methods.As shown in Figure 1, this method can be with Including step S110, S120, S130.Wherein:
Test case data is parsed into multiple fields by step S110;
Step S120 obtains the corresponding field value of each field of scene to be tested;
The field value is transferred to corresponding field in test case script by step S130, described to be tested to generate The corresponding test case of scene.
It is more by the way that test case data to be parsed into according to the automatic test cases generation method in this example embodiment A field obtains the corresponding field value of each field of scene to be tested, field value is transferred in test case script corresponding Field in, generate the test case of each test scene.Tester does not have to the test case code to each test scene It is write one by one, reduces the work of tester, saved manpower and material resources;It can be with according to the field value of each test scene The compiling procedure of test case is automated, improves the generation of test case by the test case for automatically generating the test scene Efficiency;And test case data may be reused, and reduce data redundancy, save system resource.
In the following, Fig. 1 to Fig. 3 will be combined to each step of the automatic test cases generation method in this example embodiment It is described in more details.
Test case data is parsed into multiple fields by step S110.
Test case data can be the test data for carrying out using when software test, can be given birth to by test case data At test case, to obtain test result by implementation of test cases.In addition, test case data can also be by various The code file that computer speech is write, for example, Python, Java, C++ etc., there is no special restriction on this.
Test case data is divided into multiple fields, field can be the summary of a kind of data in test case data. For example, use-case number, use case description, test object, previous step, postposition step, HTTP request mode, request data, interface Address, checkpoint etc..Each field can have different field values in each test scene in multiple fields.For example, HTTP The field value of request method can be GET, PUT, POST, CONNECT etc..
Use-case number can be used to identify each test case.Number, letter, symbol or number, letter, symbol can be used Number combination come indicate use-case number.When multiple test cases, use example number can find corresponding test case.Example Such as, use-case number can for 1,2, A, 12c etc..Use case description can be used to describe the desired effect of some test case, test Scene, decision condition etc..Request data can indicate to need the data that obtain, request data can by the parameter of function or Person name variable obtains.Interface IP address can indicate address or some module, address of function of tested interface etc., example Such as ,/api/eg/log/123.cs etc..
The code that checkpoint can be the text of formatting or computer language is write.It can be corresponding by checkpoint Method module, come to checkpoint text or code parse, parse the check item for including in the text of checkpoint, ginseng Number, parameter value etc..For example, { " value ": { " condition ": " non-empty " } etc..Checkpoint can determine mould with correspondence proving point Block can determine the check item parsed whether the response results of discriminating test use-case hit.By the way that checkpoint is literary Corresponding function in the data afferent module such as check item and parameter for including in part can be to the response results of test case No hit is determined.In addition, each test case may include a checkpoint.In this example embodiment, test object Test environment different in different test scene or the same test scene can be indicated, for example, test scene is hospital Management system, hospital management system Zhong You A hospital, B hospital, C hospital, using these three hospitals as a test wrapper Border.Function to be used is needed when previous step and postposition step may include implementation of test cases, or may include at function The sequence of reason.For example, setup function, delete function etc..It is possible to further which multiple fields are stored in a tabular form.Example Table in such as Excel, database.Field can be used as gauge outfit or row name, column name of table etc..The field of each field Value can be inserted in the unit of corresponding field.When needing to carry out automatic test, the table of preservation can be supplied to test The corresponding field value of each field of scene to be tested is inserted table by personnel, tester.
Step S120 obtains the corresponding field value of each field of scene to be tested.
For example, tester inserts table simultaneously before testing, by the field value of each field of scene to be tested It saves, by obtaining the updated table of tester, obtains the corresponding field value of each field of scene to be tested.
For another example, the function that tester can be provided by testing tool inputs the corresponding field value of each field, test Each field value can be saved as test data by tool.When generating test case, generated according to the field value of each field Test case.
In addition, in this exemplary embodiment, previous step can correspond to one or more functional based method.By previous step Corresponding each functional based method is refined into each keyword, and each functional based method can correspond to a keyword.Keyword can be with It is function name or the variable name etc. in functional based method, tester can be directly corresponding using the keyword as previous step Field value.Or keyword, when needing to carry out automatic test, tester are pre-defined according to the effect of each function The corresponding keyword of the function for only needing that environment to be tested is selected to use.In implementation of test cases, the keyword can be passed through Drive corresponding function.Keyword actuation techniques are the sides that data combine that description executes test using data with keyword Method.
The field value is transferred to corresponding field in test case script by step S130, described to be tested to generate The corresponding test case of scene.
Fig. 2 diagrammatically illustrates the test frame knot of the automatic test cases generation method of embodiment according to the present invention Structure schematic diagram.With reference to shown in Fig. 2, test frame may include multiple modules, and each module is responsible for different functions, for example, Login module may be implemented to log on to the function of environment to be tested, and the identification of wildcard variable, fortune may be implemented in wildcard variable module Calculate and replace etc., check that point module may be implemented the parsing of checkpoint and matching verifying, preposition/postposition step block and may include The corresponding function of keyword in preposition/postposition step, to realize the function of calling function by keyword.It is shown in Fig. 2 Test frame can be used Python voice and write, function library and testing tool library built in bottom code use etc., for example, Os, sys, time etc..In this exemplary embodiment, test case script can be the code write by computer speech.It is logical It crosses test case script test frame and can control computer and execute operation, to realize the function of script, complete test.Each Field value can be in the corresponding position for delivery to the test case code of scene to be tested.This process can use algorithm progress Control, for example, write a function, which will search this field of HTTP request mode, and with it is received enter ginseng replacement look into The field of the HTTP request mode found can pass to the function for CONNECT as the ginseng that enters of the function.By all words After the completion of section is all replaced, the complete code of test case can be generated.
Further, the test of scene to be tested is executed according to the code of the test case of generation.It can use various surveys Trial work tool or open source test frame carry out implementation of test cases.For example, Postman, robot framework etc..
In addition, if the field value of scene to be tested be it is multiple, multiple test cases are generated to the field value, are respectively completed The test of each field value.For example, being incited somebody to action if the field value of the test object of the scene to be tested obtained is respectively a, b, c Test object replaces with a, generates test case and is tested, then test object is replaced with b, generates test case and is surveyed Then test object is replaced with c again by examination, generate test case and tested.For different system environments, test object Field value is different, can add the field value of test object to complete the test of different system environments, without tester's hand It is dynamic to generate multiple test cases repeatedly.
Fig. 3 is the test flow chart of the automatic test cases generation method of embodiment according to the present invention.Such as Fig. 3 institute Show, generate multiple test cases according to multiple field values, in test, whole test cases can be read in advance, then from First test case starts to execute.Each test case can be obtained needed for tested interface by executing previous step Data perhaps after the incoming tested interface of data or parameter of parameter acquisition, can be tested and be used with the code in implementation of test cases After the completion of the code of example executes, checkpoint is parsed by the corresponding parsing module in checkpoint, so as to previous step The result of the code of middle implementation of test cases carries out checkpoint judgement, and can export judgement result.The corresponding solution in checkpoint Analysis module can the checkpoint text to each test case parsed and execute the matching of actual interface response contents.It checks Point text is after parsing, and the function that can convert parameter for the result after parsing corresponding checkpoint is called to determine should Function can compare whether response contents can hit success.
Such as: checkpoint text are as follows: [" value ": { " condition ": " non-empty " } }, { " level ": { " list/ [0]/name ", " condition ": "==", " value ": " gastric cancer "], first be parse this checkpoint text be two Check item, check item 1 are to look into value as non-empty, and check item 2 is to look into response " this value of list/ [0]/name " is equal to gastric cancer, often A check item requires to call adaptation function when checking " match ", check item parameter (value, conditon, non-empty) and rings Answer " value " gastric cancer " of list/ [0]/name " is passed to match function, the judgement of hit is completed in match function body.Then it holds Row postposition step, postposition step can be completed to remove work, such as remove the project etc. of creation, to guarantee that test case is repeatable It executes.
The device of the invention embodiment introduced below can be used for executing the above-mentioned automatic test cases of the present invention and generate Method.As shown in figure 4, the automatic test cases generating means 400 may include
Data cell 410 is parsed, for test case data to be parsed into multiple fields;
Field unit 420 is obtained, for obtaining the corresponding field value of each field of scene to be tested;
Test case unit 430 is generated, for the field value to be transferred to corresponding field in test case script, with Generate the corresponding test case of the scene to be tested.
Due to example embodiments of the present invention automatic test cases generating means each functional module and it is above-mentioned from The step of example embodiment of dynamicization method for generating test case, is corresponding, therefore for undisclosed in apparatus of the present invention embodiment Details please refers to the embodiment of the above-mentioned automatic test cases generation method of the present invention.
Below with reference to Fig. 5, it illustrates the computer systems 500 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.The computer system 500 of electronic equipment shown in Fig. 5 is only an example, should not be to the embodiment of the present invention Function and use scope bring any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and Execute various movements appropriate and processing.In RAM 503, it is also stored with various programs and data needed for system operatio.CPU 501, ROM 502 and RAM 503 is connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to bus 504。
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.; And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon Computer program be mounted into storage section 508 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media 511 are mounted.When the computer program is executed by central processing unit (CPU) 501, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes such as above-mentioned automatic test cases generation method as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 1: step S110 parses test case data At multiple fields;Step S120 obtains the corresponding field value of each field of scene to be tested;Step S130, will be described Field value is transferred to corresponding field in test case script, to generate the corresponding test case of the scene to be tested.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of automatic test cases generation method characterized by comprising
Test case data is parsed into multiple fields;
Obtain the corresponding field value of each field of scene to be tested;
The field value is transferred to corresponding field in test case script, to generate the corresponding test of the scene to be tested Use-case.
2. automatic test cases generation method according to claim 1, which is characterized in that the method also includes:
The multiple field is stored in table.
3. automatic test cases generation method according to claim 2, which is characterized in that described to obtain scene to be tested The corresponding field value of each field include:
Obtain the updated table;
Each unit of the table is parsed, the corresponding each field value of each field is obtained.
4. automatic test cases generation method according to claim 1, which is characterized in that the multiple field includes:
Use case description, interface IP address, the request method of the network transmission protocol, previous step, postposition step, test object.
5. automatic test cases generation method according to claim 4, which is characterized in that described to obtain scene to be tested The corresponding field value of each field include:
Obtain the corresponding keyword of previous step of the scene to be tested;
Set the keywords as the corresponding field value of the previous step.
6. automatic test cases generation method according to claim 4, which is characterized in that the method also includes:
It is corresponding to the test object each described when the corresponding field value of the test object of acquisition is multiple Field value generates the corresponding test case of the scene to be tested respectively.
7. automatic test cases generation method according to claim 1-6, which is characterized in that the method is also Include:
Automatic test is carried out to corresponding test object according to the scene to be tested corresponding test case.
8. a kind of automatic test cases generating means characterized by comprising
Data cell is parsed, for test case data to be parsed into multiple fields;
Field unit is obtained, for obtaining the corresponding field value of each field of scene to be tested;
Test case unit is generated, for the field value to be transferred to corresponding field in test case script, to generate State the corresponding test case of scene to be tested.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is executed by processor Automatic test cases generation method of the Shi Shixian as described in any one of claims 1 to 7.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize that the automatic test as described in any one of claims 1 to 7 is used Example generation method.
CN201811332060.8A 2018-11-09 2018-11-09 Automatic test cases generation method, device, medium and electronic equipment Pending CN109446099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811332060.8A CN109446099A (en) 2018-11-09 2018-11-09 Automatic test cases generation method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811332060.8A CN109446099A (en) 2018-11-09 2018-11-09 Automatic test cases generation method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN109446099A true CN109446099A (en) 2019-03-08

Family

ID=65551800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811332060.8A Pending CN109446099A (en) 2018-11-09 2018-11-09 Automatic test cases generation method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109446099A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071848A (en) * 2019-03-27 2019-07-30 武汉思普崚技术有限公司 The method and apparatus of automatic test order line command
CN110147320A (en) * 2019-04-19 2019-08-20 平安普惠企业管理有限公司 Interface test method, device and electronic equipment
CN110444227A (en) * 2019-08-30 2019-11-12 惠州市德赛西威汽车电子股份有限公司 A kind of voice automated testing method
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN110597730A (en) * 2019-09-20 2019-12-20 中国工商银行股份有限公司 Scene method based automatic test case generation method and system
CN112104634A (en) * 2020-09-08 2020-12-18 中国电力科学研究院有限公司 Data message processing method, system, equipment and readable storage medium
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
WO2021016807A1 (en) * 2019-07-29 2021-02-04 西门子股份公司 Context awareness device simulation method, device, and system
CN112395182A (en) * 2019-08-14 2021-02-23 中国联合网络通信集团有限公司 Automatic testing method, device, equipment and computer readable storage medium
CN112445692A (en) * 2019-08-27 2021-03-05 腾讯科技(深圳)有限公司 Case testing method and terminal
CN112579455A (en) * 2020-12-23 2021-03-30 安徽航天信息有限公司 Interface automatic testing method and device, electronic equipment and storage medium
CN113051171A (en) * 2021-04-08 2021-06-29 平安国际智慧城市科技股份有限公司 Interface test method, device, equipment and storage medium
CN113138934A (en) * 2021-05-14 2021-07-20 杭州网易云音乐科技有限公司 Automatic test method, medium, device and computing equipment
CN113377653A (en) * 2021-06-10 2021-09-10 北京京东振世信息技术有限公司 Method and device for generating test case
CN113377667A (en) * 2021-06-29 2021-09-10 平安国际融资租赁有限公司 Scene-based testing method and device, computer equipment and storage medium
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN117251384A (en) * 2023-11-17 2023-12-19 南京掌控网络科技有限公司 Interface automation test case generation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN104182335A (en) * 2014-05-09 2014-12-03 中国光大银行 Software testing method and device
CN106681921A (en) * 2016-12-27 2017-05-17 腾讯科技(深圳)有限公司 Method and device for achieving data parameterization
CN107341102A (en) * 2017-06-12 2017-11-10 北京奇安信科技有限公司 A kind of test case file generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN104182335A (en) * 2014-05-09 2014-12-03 中国光大银行 Software testing method and device
CN106681921A (en) * 2016-12-27 2017-05-17 腾讯科技(深圳)有限公司 Method and device for achieving data parameterization
CN107341102A (en) * 2017-06-12 2017-11-10 北京奇安信科技有限公司 A kind of test case file generation method and device

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071848A (en) * 2019-03-27 2019-07-30 武汉思普崚技术有限公司 The method and apparatus of automatic test order line command
CN110147320A (en) * 2019-04-19 2019-08-20 平安普惠企业管理有限公司 Interface test method, device and electronic equipment
CN113874844A (en) * 2019-07-29 2021-12-31 西门子股份公司 Simulation method, device and system of context awareness device
WO2021016807A1 (en) * 2019-07-29 2021-02-04 西门子股份公司 Context awareness device simulation method, device, and system
CN112395182A (en) * 2019-08-14 2021-02-23 中国联合网络通信集团有限公司 Automatic testing method, device, equipment and computer readable storage medium
CN112445692A (en) * 2019-08-27 2021-03-05 腾讯科技(深圳)有限公司 Case testing method and terminal
CN112445692B (en) * 2019-08-27 2024-01-26 腾讯科技(深圳)有限公司 Case testing method and terminal
CN110444227A (en) * 2019-08-30 2019-11-12 惠州市德赛西威汽车电子股份有限公司 A kind of voice automated testing method
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN110597730A (en) * 2019-09-20 2019-12-20 中国工商银行股份有限公司 Scene method based automatic test case generation method and system
CN110597730B (en) * 2019-09-20 2023-08-22 中国工商银行股份有限公司 Automatic test case generation method and system based on scene method
CN112104634A (en) * 2020-09-08 2020-12-18 中国电力科学研究院有限公司 Data message processing method, system, equipment and readable storage medium
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN112181835B (en) * 2020-09-29 2024-04-26 中国平安人寿保险股份有限公司 Automatic test method, device, computer equipment and storage medium
CN112579455A (en) * 2020-12-23 2021-03-30 安徽航天信息有限公司 Interface automatic testing method and device, electronic equipment and storage medium
CN113051171A (en) * 2021-04-08 2021-06-29 平安国际智慧城市科技股份有限公司 Interface test method, device, equipment and storage medium
CN113051171B (en) * 2021-04-08 2024-04-02 深圳赛安特技术服务有限公司 Interface testing method, device, equipment and storage medium
CN113138934A (en) * 2021-05-14 2021-07-20 杭州网易云音乐科技有限公司 Automatic test method, medium, device and computing equipment
CN113138934B (en) * 2021-05-14 2024-01-19 杭州网易云音乐科技有限公司 Automatic test method, medium, device and computing equipment
CN113377653B (en) * 2021-06-10 2023-09-26 北京京东振世信息技术有限公司 Method and device for generating test cases
CN113377653A (en) * 2021-06-10 2021-09-10 北京京东振世信息技术有限公司 Method and device for generating test case
CN113377667A (en) * 2021-06-29 2021-09-10 平安国际融资租赁有限公司 Scene-based testing method and device, computer equipment and storage medium
CN113377667B (en) * 2021-06-29 2024-05-10 平安国际融资租赁有限公司 Scene-based testing method and device, computer equipment and storage medium
CN113434436B (en) * 2021-07-30 2022-12-16 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN117251384A (en) * 2023-11-17 2023-12-19 南京掌控网络科技有限公司 Interface automation test case generation method and system
CN117251384B (en) * 2023-11-17 2024-01-30 南京掌控网络科技有限公司 Interface automation test case generation method and system

Similar Documents

Publication Publication Date Title
CN109446099A (en) Automatic test cases generation method, device, medium and electronic equipment
CN109739478A (en) Front end project automated construction method, device, storage medium and electronic equipment
CN108984712A (en) Counting method, equipment and readable storage medium storing program for executing are made based on business scenario
CN109271403A (en) A kind of operating method of data query, device, medium and electronic equipment
CN109542445A (en) A kind of method and apparatus that Android plug-in unit melts hair
CN109359194A (en) Method and apparatus for predictive information classification
CN110059011A (en) Interface test method, device, medium and electronic equipment
CN109614312A (en) Method for generating test case, device, electronic equipment and storage medium
CN108958744A (en) Dispositions method, device, medium and the electronic equipment of big data distributed type assemblies
CN109828906A (en) UI automated testing method, device, electronic equipment and storage medium
CN107341235A (en) Report form inquiring method, device, medium and electronic equipment
CN109002385A (en) Method for testing pressure and device for data flow system
CN109002289A (en) A kind of method and apparatus constructing data model
CN109582317A (en) Method and apparatus for debugging boarding application
CN117632710A (en) Method, device, equipment and storage medium for generating test code
CN110399187A (en) A kind for the treatment of method and apparatus of language resource
CN110109983A (en) A kind of method and apparatus operating Redis database
CN109992494A (en) A kind of automatic test execution method and apparatus
CN108959294A (en) A kind of method and apparatus accessing search engine
CN116795701A (en) Method and device for generating universal test case of interface program
CN108733691A (en) Data preprocessing method and device
CN109977011A (en) Automatic generation method, device, storage medium and the electronic equipment of test script
CN110333849A (en) A kind of method, apparatus for realizing code robot based on FreeMarker template engine
CN109933727A (en) User's portrait generation method and system, user's portrait application method and system
CN109634866A (en) Data test method, apparatus, medium and electronic equipment

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