CN109299009A - Data test method, apparatus, computer equipment and storage medium - Google Patents

Data test method, apparatus, computer equipment and storage medium Download PDF

Info

Publication number
CN109299009A
CN109299009A CN201811116085.4A CN201811116085A CN109299009A CN 109299009 A CN109299009 A CN 109299009A CN 201811116085 A CN201811116085 A CN 201811116085A CN 109299009 A CN109299009 A CN 109299009A
Authority
CN
China
Prior art keywords
parameter
test
script file
candidate
undetermined
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
CN201811116085.4A
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201811116085.4A priority Critical patent/CN109299009A/en
Publication of CN109299009A publication Critical patent/CN109299009A/en
Pending legal-status Critical Current

Links

Classifications

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

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

This application involves a kind of data test method, system, computer equipment and storage mediums.The described method includes: obtaining test script file;Determine that undetermined parameter identifies in the test script file;Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;According to each candidate parameter and the test script file, the corresponding test case of each candidate parameter is generated;The corresponding test case of each candidate parameter is executed parallel, obtains test result.During the test, using the undetermined parameter in each candidate parameter replacement test script file in data source, testing efficiency can be improved with the multiple candidate parameters of concurrent testing in primary test.

Description

Data test method, apparatus, computer equipment and storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of data test method, apparatus, computer equipment and Storage medium.
Background technique
With the development of computer technology, there is software testing technology, along with the continuous growth of software development demand, Software testing technology has also obtained extensive utilization.
However, traditional data test method, needs tester to write test script file before each test, when When the parameter for needing to detect in test script file is more, needs tester to repeat setup test script file, reduce survey Speed is tried, causes testing efficiency low.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of data test method that can be improved testing efficiency, Device, computer equipment and storage medium.
A kind of data test method, which comprises
Obtain test script file;
Determine that undetermined parameter identifies in the test script file;
Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;
According to each candidate parameter and the test script file, the corresponding test of each candidate parameter is generated Use-case;
The corresponding test case of each candidate parameter is executed parallel, obtains test result.
Obtaining test script file in one of the embodiments, includes:
Obtain script file selection instruction;
Extract the script file mark in the script file selection instruction;
Test script file corresponding with script file mark is extracted from script file library.
Determine that undetermined parameter mark includes: in the test script file in one of the embodiments,
Obtain the undetermined parameter mark in the test script file;
The undetermined parameter mark is inquired in data source list;
Each candidate parameter corresponding with the undetermined parameter mark inquired is extracted from the data source list.
In one of the embodiments, according to each candidate parameter and the test script file, each time is generated The corresponding test case of parameter is selected to include:
Determine that the undetermined parameter identifies the undetermined parameter position in the test script file;
The test script file is written into each candidate parameter respectively according to the undetermined parameter position;
According to the test script file of write-in candidate parameter, the corresponding test case of each candidate parameter is sequentially generated.
It executes the corresponding test case of each candidate parameter parallel in one of the embodiments, is tested Result includes:
The corresponding test case of each candidate parameter is executed parallel, and it is corresponding to obtain each candidate parameter Execution state information;
Obtain preset state detection information;
The execution state information is detected according to the preset state detection information, obtains each candidate parameter Corresponding test result.
A kind of data test device, described device include:
Script obtains module, for obtaining test script file;
Determining module is identified, undetermined parameter identifies in the test script file for determining;
Parameter query module, for inquiring each candidate ginseng corresponding with undetermined parameter mark in data source list Number;
Use-case generation module, for generating each candidate according to each candidate parameter and the test script file The corresponding test case of parameter;
Use-case execution module obtains test knot for executing the corresponding test case of each candidate parameter parallel Fruit.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage Computer program, the processor perform the steps of when executing the computer program
Obtain test script file;
Determine that undetermined parameter identifies in the test script file;
Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;
According to each candidate parameter and the test script file, the corresponding test of each candidate parameter is generated Use-case;
The corresponding test case of each candidate parameter is executed parallel, obtains test result.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain test script file;
Determine that undetermined parameter identifies in the test script file;
Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;
According to each candidate parameter and the test script file, the corresponding test of each candidate parameter is generated Use-case;
The corresponding test case of each candidate parameter is executed parallel, obtains test result.
Above-mentioned data test method, apparatus, computer equipment and storage medium, after obtaining test script file, according to Undetermined parameter mark in test script file obtains each candidate ginseng corresponding with undetermined parameter mark from data source list Number, without rewriting test script file for each candidate parameter, directly according to each candidate parameter and test script file The corresponding test case of each candidate parameter is generated, the formation efficiency of test case is improved, it is parallel to execute each survey generated Example on probation obtains test result, substantially increases testing efficiency.
Detailed description of the invention
Fig. 1 is the applied environment figure of data test method in one embodiment;
Fig. 2 is the flow diagram of data test method in one embodiment;
Fig. 3 is flow diagram the step of obtaining test script file in one embodiment;
Fig. 4 is flow diagram the step of inquiring each candidate parameter in one embodiment;
Fig. 5 is flow diagram the step of generating test case in one embodiment;
Fig. 6 is flow diagram the step of generating test result in one embodiment;
Fig. 7 is the structural block diagram of data test device in one embodiment;
Fig. 8 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Data test method provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, terminal 102 It is communicated with server 104 by network by network.Wherein, terminal 102 can be, but not limited to be various personal computers, Laptop, server 104 can be realized with the server cluster of the either multiple server compositions of independent server.
In one embodiment, as shown in Fig. 2, providing a kind of data test method, this method both can be applied to Fig. 1 In terminal 102, can also apply in server 104.The present embodiment is applied to carry out for the server in Fig. 1 in this way Illustrate, specifically includes the following steps:
Step 202, test script file is obtained.
Wherein, script file corresponding to the test program that test script file is run by test process.
Specifically, terminal to server sends script file selection instruction, and server is selected from the script file got Script file mark is extracted in instruction, and test script file corresponding with script file mark is inquired from script file library, from Script file extracts test script file in library.
In one embodiment, terminal is equipped with script and records program, and terminal receives to be touched in the script recording program page When the record command of hair, calls script to record program and start to obtain the script data that the page is write, write number according to what is got According to generation test script file.The script file that terminal obtains triggering sends instruction, and sending instruction according to script file will test Script file is sent to server.
For example, receiving the script file triggered in the domain model page after terminal records test script file Instruction is sent, obtained test script file will be recorded and be sent to server.Domain model is one kind with visual page shape Formula describes the model of data test process.
Step 204, determine that undetermined parameter identifies in test script file.
Wherein, undetermined parameter mark is mark corresponding to the parameter that needs to be written during the test in test script file Know.
Specifically, server obtains default undetermined parameter mark, default undetermined parameter mark is inquired in test script file Know, is identified using the default undetermined parameter inquired as undetermined parameter in test script file and identified.
In one embodiment, it is obtained in server identification test script file for demarcating the unifying identifier of undetermined parameter Position of the unifying identifier recognized respectively in test script file is taken, it is every in test script file according to unifying identifier A position generates undetermined parameter mark.
Step 206, each candidate parameter corresponding with undetermined parameter mark is inquired in data source list.
Wherein, candidate parameter is the parameter in test script file to be written during the test.Data source list is to use The data list of corresponding candidate parameter is identified in storage undetermined parameter, data source list can be Excel form document.
Specifically, server determines that the undetermined parameter in test script file identifies, and inquires and determines in data source list Undetermined parameter mark, extract each candidate parameter corresponding with the undetermined parameter mark inquired.
In one embodiment, server extracts data source list according to determining undetermined parameter mark from database, The data source list extracted is corresponding with the undetermined parameter mark determined, obtains all candidate parameters in data source list, with Each candidate parameter got is as candidate parameter corresponding with determining undetermined parameter mark.
Step 208, it according to each candidate parameter and test script file, generates the corresponding test of each candidate parameter and uses Example.
Wherein, test with arrange be when whether being worked normally for the function in test target program or target pages it is used Test file.
Specifically, server determines the position that undetermined parameter identifies in test script file, extracts and identifies with undetermined parameter Each candidate parameter is sequentially written in undetermined parameter position corresponding with undetermined parameter mark by corresponding each candidate parameter.Server Test case corresponding with the candidate parameter of write-in is generated according to the test script file of each write-in candidate parameter, obtains each time Select parameter to the test case of drink.
In one embodiment, server determines test script text by the undetermined parameter mark in test script file Undetermined parameter in part extracts each candidate parameter corresponding with undetermined parameter mark in data source list.Server will be tested Undetermined parameter in script file resolves to character string with each candidate parameter extracted, and character string obtained after parsing is saved In the database.Character string can be the tree-like JSON character string with upper and lower level structure.Server can be mentioned from database Character string corresponding with each candidate parameter is taken, test script file is written into character string, generates test case.If server does not have Have and inquires each candidate parameter corresponding with undetermined parameter mark in data source list, extraction and test script from database The corresponding character string of undetermined parameter in file generates test case.
Step 210, the corresponding test case of each candidate parameter is executed parallel, obtains test result.
Specifically, server executes each test case of generation parallel.Server implementation of test cases, obtains test case The corresponding execution state information of middle candidate parameter.Server obtains preset state detection information corresponding with candidate parameter, according to Preset state detection information detects execution state information, obtains test result.Parallel execute is distinguished with each candidate parameter After corresponding test case, obtained test result is sent to terminal and shown by server.It is parallel to execute each survey generated Example on probation is to be performed simultaneously each test case.
In the present embodiment, after obtaining test script file, identified according to the undetermined parameter in test script file, from number According to each candidate parameter corresponding with undetermined parameter mark is obtained in the list of source, without rewriting test for each candidate parameter Script file directly generates the corresponding test case of each candidate parameter according to each candidate parameter and test script file, mentions The high formation efficiency of test case, the parallel each test case generated that executes obtain test result, substantially increase test effect Rate.
If Fig. 3 shows, in one embodiment, step 202 specifically further includes the steps that obtaining test script file, the step Specifically comprise the following steps:
Step 302, script file selection instruction is obtained.
Wherein, script file selection instruction is used to indicate the instruction that server obtains specified script file.
Specifically, terminal obtains the script file selection instruction of user's triggering, the script file selection instruction that will acquire It is sent to server.It include that script file identifies in script file selection instruction.
In one embodiment, the script file that terminal obtains triggering checks instruction, checks that instruction obtains according to script file The script file in script file library is taken to identify, the script file mark that will acquire is shown in displayed page.Terminal The script file mark selected in displayed page is obtained, is identified according to the script file of selection and generates script file selection instruction, Script file selection instruction is sent to server.
Step 304, the script file mark in script file selection instruction is extracted.
Specifically, server obtains script file selection instruction, is parsed to obtain file to script file selection instruction Selection instruction information extracts script file mark from file selection instruction information.Script file is identified as generating test Unique identification corresponding to test script file used in use-case.
Step 306, test script file corresponding with script file mark is extracted from script file library.
Wherein, script file library is stored in the set of multiple test script files in server.
Specifically, it is provided with script file library in server, multiple test script files are store in script file library.Clothes Business device inquires test foot corresponding with script file mark according to after the script file mark extracted in script file library This document extracts the test script file inquired from script file library.
In the present embodiment, by obtaining script file selection instruction, the script file in script file selection instruction is extracted Mark extracts test script file corresponding with script file mark from script file library, improves and obtains test script text The efficiency of part.
As shown in figure 4, in one embodiment, step 206 specifically further includes the steps that inquiring each candidate parameter, the step Specifically comprise the following steps:
Step 402, the undetermined parameter mark in test script file is obtained.
Specifically, the undetermined parameter mark in test script file, undetermined parameter mark and script are store in server The corresponding storage of file identification.Server extracts the script file mark of test script file, in the undetermined parameter mark of storage Inquire undetermined parameter mark corresponding with the script file mark extracted.
In one embodiment, it is provided with undetermined parameter table in server, stores in undetermined parameter table and each test foot The script file of this document identifies corresponding undetermined parameter mark.Server is after the script file mark extracted, undetermined Undetermined parameter mark corresponding with the script file mark extracted is inquired in parameter list.
Step 404, undetermined parameter mark is inquired in data source list.
Specifically, each candidate parameter corresponding with undetermined parameter mark is store in data source list.Server is obtaining After undetermined parameter mark into test script file, the undetermined parameter mark got is inquired in data source list.
In one embodiment, after the undetermined parameter mark in the test script file that server is got, according to acquisition Sequence is ranked up parameter identification undetermined, inquires undetermined parameter mark in data source list according to acquisition sequence.
Step 406, each candidate parameter corresponding with the undetermined parameter mark inquired is extracted from data source list.
Specifically, server is identified according to the undetermined parameter inquired in data source list, is extracted in data source list Each candidate parameter corresponding with undetermined parameter mark, using each candidate parameter extracted as with it is undetermined in test script file The corresponding candidate parameter of parameter identification.
In one embodiment, server identifies according to undetermined parameter and inquires data source set in data source list, from number According to source gather in extract candidate parameter, obtain each candidate parameter corresponding with undetermined parameter mark.Data source collection is combined into including extremely The set of a few candidate parameter.
In the present embodiment, the undetermined parameter mark in test script file is obtained, ginseng undetermined is inquired in data source list Number mark whether there is candidate parameter corresponding with undetermined parameter mark so as to determine, from data source in data source list Each candidate parameter corresponding with undetermined parameter mark is extracted in list, is identified by the centrally stored each undetermined parameter of data source list Corresponding candidate parameter, directly can in data source list query candidate parameter, thus improve obtain candidate parameter standard True property.
If Fig. 5 shows, in one embodiment, step 208 specifically further includes the steps that generating test case, and the step is specific Include the following steps:
Step 502, determine that undetermined parameter identifies the position in test script file.
Specifically, server is identified according to determining undetermined parameter, and undetermined parameter is inquired in test script file, is determined Undetermined parameter position.In one embodiment, server inquires determining undetermined parameter mark in test script file, determines The undetermined parameter inquired identifies the position in test script file.Server is according to undetermined parameter mark and undetermined parameter mark The position known in test script file generates home position list, and the list of undetermined parameter home position is sent to database In.
Step 504, each candidate parameter is written respectively by test script file according to undetermined parameter position.
Specifically, server inquires undetermined parameter mark corresponding with each candidate parameter obtained in test script file Know, determines that undetermined parameter identifies the position in test script file, corresponding undetermined parameter is written into each candidate parameter respectively Position.
In one embodiment, server obtains home position list from database, inquires in the list of home position The corresponding undetermined parameter mark of each candidate parameter, identifies according to the undetermined parameter inquired and determines undetermined parameter mark in test foot The undetermined parameter position in test script file is written in each candidate parameter by the position in this document.
Step 506, it according to the test script file of write-in candidate parameter, sequentially generates the corresponding test of each candidate parameter and uses Example.
Specifically, after the undetermined parameter position in test script file is written in candidate parameter by server, according to test foot This document generates test case corresponding with the candidate parameter of write-in.
For example, server determines that undetermined parameter is identified as var in test script file, in Excel Data source table Inquire undetermined parameter mark var, extract in Excel Data source table with the corresponding candidate parameter of undetermined parameter mark var 1,2, 3,4,5, the undetermined parameter in 1,2,3,4,5 replacement test script files is successively identified into var, generates 5 test cases.
In the present embodiment, by determining that undetermined parameter identifies the undetermined parameter position in test script file, respectively will Test script file is written in each candidate parameter, and according to the test script file of write-in candidate parameter, sequentially generates each candidate The corresponding test case of parameter, improves the formation efficiency of test case.
As shown in fig. 6, in one embodiment, step 210 specifically further includes the steps that generating test result, step tool Body includes the following steps:
Step 602, the corresponding test case of each candidate parameter is executed parallel, and it is corresponding to obtain each candidate parameter Execution state information.
Wherein, execution state information is the execution result information that each candidate parameter generates in test case implementation procedure.
Specifically, server executes the corresponding test case of each candidate parameter parallel, in holding for test script file During row, the candidate parameter in test case generates execution state information, and it is corresponding that server obtains each candidate parameter Execution state information.
Step 604, preset state detection information is obtained.
Wherein, preset state detection information is the status information detected for the implementing result to test case.
Specifically, server extracts preset state information corresponding with test case.Server is executing test with arranging Cheng Zhong extracts preset state information from test case.
In one embodiment, terminal obtains the preset state detection information of input, the preset state detection that will acquire Information is sent to server and is stored.Server obtains test case mark, mentions from the preset state detection information of storage Take preset state detection information corresponding with test case mark.
Step 606, the execution state information is detected according to preset state detection information, obtains each candidate parameter Corresponding test result.
Specifically, server determines the corresponding candidate parameter of preset state detection information, the test of inquiry and candidate parameter Preset state detection information is compared with the execution state information inquired, obtains by execution state information corresponding to use-case To the corresponding test result of candidate parameter, until to test result corresponding to the corresponding test case of each candidate parameter Detection is completed, the corresponding test result of each candidate parameter is obtained.
In one embodiment, server generates test report according to the corresponding test result of each candidate parameter, will test Report is sent to terminal.Terminal receives the test report that server is sent, and the test report received is shown.
In one embodiment, server obtains test and monitors instruction, monitors instruction to each test column according to test Execution in implementation procedure is monitored extremely, and when listening to execution exception in implementation procedure, it is abnormal corresponding to obtain execution Exception information is sent to terminal by exception information, passes through terminal display exception information.
In the present embodiment, the corresponding test case of each candidate parameter is executed parallel, it is right respectively to obtain each candidate parameter The execution state information answered obtains preset state detection information, detects to execution state information, obtain each candidate parameter pair The test result answered.All test cases are executed parallel, have saved the testing time, improve testing efficiency.
It should be understood that although each step in the flow chart of Fig. 2-6 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-6 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in fig. 7, providing a kind of data test device 700, comprising: script obtains module 702, determining module 704, parameter query module 706, use-case generation module 708, use-case execution module 710 are identified, in which:
Script obtains module 702, for obtaining test script file.
Determining module 704 is identified, undetermined parameter identifies in test script file for determining.
Parameter query module 706, for inquiring each candidate parameter corresponding with undetermined parameter mark in data source list.
Use-case generation module 708, for it is right respectively to generate each candidate parameter according to each candidate parameter and test script file The test case answered.
Use-case execution module 710 obtains test knot for executing the corresponding test case of each candidate parameter parallel Fruit.
In the present embodiment, after obtaining test script file, identified according to the undetermined parameter in test script file, from number According to each candidate parameter corresponding with undetermined parameter mark is obtained in the list of source, without rewriting test for each candidate parameter Script file directly generates the corresponding test case of each candidate parameter according to each candidate parameter and test script file, mentions The high formation efficiency of test case, the parallel each test case generated that executes obtain test result, substantially increase test effect Rate.
In one embodiment, script obtains module 702 and is also used to obtain script file selection instruction;Extract script file Script file mark in selection instruction;Test script file corresponding with script file mark is extracted from script file library.
In the present embodiment, by obtaining script file selection instruction, the script file in script file selection instruction is extracted Mark extracts test script file corresponding with script file mark from script file library, improves and obtains test script text The efficiency of part.
In one embodiment, parameter query module 706 is also used to obtain the mark of the undetermined parameter in test script file; Undetermined parameter mark is inquired in data source list;It is extracted from data source list corresponding with the undetermined parameter mark inquired Each candidate parameter.
In the present embodiment, the undetermined parameter mark in test script file is obtained, ginseng undetermined is inquired in data source list Number mark whether there is candidate parameter corresponding with undetermined parameter mark so as to determine, from data source in data source list Each candidate parameter corresponding with undetermined parameter mark is extracted in list, is identified by the centrally stored each undetermined parameter of data source list Corresponding candidate parameter, directly can in data source list query candidate parameter, thus improve obtain candidate parameter standard True property.In one embodiment, use-case generation module 708 is also used to determine that undetermined parameter identifies the position in test script file It sets;Test script file is written into each candidate parameter respectively according to undetermined parameter position;According to the test of write-in candidate parameter Script file sequentially generates the corresponding test case of each candidate parameter.
In the present embodiment, by determining that undetermined parameter identifies the undetermined parameter position in test script file, respectively will Test script file is written in each candidate parameter, and according to the test script file of write-in candidate parameter, sequentially generates each candidate The corresponding test case of parameter, improves the formation efficiency of test case.
In one embodiment, use-case execution module 710 is also used to execute the corresponding test of each candidate parameter parallel Use-case obtains the corresponding execution state information of each candidate parameter;Obtain preset state detection information;It is examined according to preset state Measurement information detects the execution state information, obtains the corresponding test result of each candidate parameter.
In the present embodiment, the corresponding test case of each candidate parameter is executed parallel, it is right respectively to obtain each candidate parameter The execution state information answered obtains preset state detection information, detects to execution state information, obtain each candidate parameter pair The test result answered.All test cases are executed parallel, have saved the testing time, improve testing efficiency.
Specific about data test device limits the restriction that may refer to above for data test method, herein not It repeats again.Modules in above-mentioned data test device can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 8.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is used to store the data for carrying out data test.The network interface of the computer equipment is used for and outside Terminal by network connection communication.To realize a kind of data test method when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 8, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of acquisition test foot when executing computer program This document;Determine that undetermined parameter identifies in test script file;It is inquired in data source list corresponding with undetermined parameter mark Each candidate parameter;According to each candidate parameter and test script file, the corresponding test case of each candidate parameter is generated;Parallel The corresponding test case of each candidate parameter is executed, test result is obtained.
In one embodiment, obtaining test script file includes: to obtain script file selection instruction;Extract script file Script file mark in selection instruction;Test script file corresponding with script file mark is extracted from script file library.
In one embodiment, each candidate parameter corresponding with undetermined parameter mark is inquired in data source list includes: Obtain the undetermined parameter mark in test script file;Undetermined parameter mark is inquired in data source list;From data source list It is middle to extract each candidate parameter corresponding with the undetermined parameter mark inquired.
In one embodiment, according to each candidate parameter and test script file, it is corresponding to generate each candidate parameter Test case comprises determining that undetermined parameter identifies the position in test script file;It respectively will be every according to undetermined parameter position Test script file is written in a candidate parameter;According to the test script file of write-in candidate parameter, each candidate parameter is sequentially generated Corresponding test case.
In one embodiment, the corresponding test case of each candidate parameter is executed parallel, and obtaining test result includes: The corresponding test case of each candidate parameter is executed parallel, obtains the corresponding execution state information of each candidate parameter;It obtains Take preset state detection information;Execution state information is detected according to preset state detection information, obtains each candidate parameter Corresponding test result.
In the present embodiment, after obtaining test script file, identified according to the undetermined parameter in test script file, from number According to each candidate parameter corresponding with undetermined parameter mark is obtained in the list of source, without rewriting test for each candidate parameter Script file directly generates the corresponding test case of each candidate parameter according to each candidate parameter and test script file, mentions The high formation efficiency of test case, the parallel each test case generated that executes obtain test result, substantially increase test effect Rate.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of acquisition test script file when being executed by processor;Determine undetermined parameter in test script file Mark;Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;According to each candidate parameter and test foot This document generates the corresponding test case of each candidate parameter;The corresponding test case of each candidate parameter is executed parallel, Obtain test result.
In one embodiment, obtaining test script file includes: to obtain script file selection instruction;Extract script file Script file mark in selection instruction;Test script file corresponding with script file mark is extracted from script file library.
In one embodiment, each candidate parameter corresponding with undetermined parameter mark is inquired in data source list includes: Obtain the undetermined parameter mark in test script file;Undetermined parameter mark is inquired in data source list;From data source list It is middle to extract each candidate parameter corresponding with the undetermined parameter mark inquired.
In one embodiment, according to each candidate parameter and test script file, it is corresponding to generate each candidate parameter Test case comprises determining that undetermined parameter identifies the position in test script file;It respectively will be every according to undetermined parameter position Test script file is written in a candidate parameter;According to the test script file of write-in candidate parameter, each candidate parameter is sequentially generated Corresponding test case.
In one embodiment, the corresponding test case of each candidate parameter is executed parallel, and obtaining test result includes: The corresponding test case of each candidate parameter is executed parallel, obtains the corresponding execution state information of each candidate parameter;It obtains Take preset state detection information;Execution state information is detected according to preset state detection information, obtains each candidate parameter Corresponding test result.
In the present embodiment, after obtaining test script file, identified according to the undetermined parameter in test script file, from number According to each candidate parameter corresponding with undetermined parameter mark is obtained in the list of source, without rewriting test for each candidate parameter Script file directly generates the corresponding test case of each candidate parameter according to each candidate parameter and test script file, mentions The high formation efficiency of test case, the parallel each test case generated that executes obtain test result, substantially increase test effect Rate.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of data test method, which comprises
Obtain test script file;
Determine that undetermined parameter identifies in the test script file;
Each candidate parameter corresponding with undetermined parameter mark is inquired in data source list;
According to each candidate parameter and the test script file, generates the corresponding test of each candidate parameter and use Example;
The corresponding test case of each candidate parameter is executed parallel, obtains test result.
2. the method according to claim 1, wherein the acquisition test script file includes:
Obtain script file selection instruction;
Extract the script file mark in the script file selection instruction;
Test script file corresponding with script file mark is extracted from script file library.
3. the method according to claim 1, wherein the inquiry in data source list and the undetermined parameter Identifying corresponding each candidate parameter includes:
Obtain the undetermined parameter mark in the test script file;
The undetermined parameter mark is inquired in data source list;
Each candidate parameter corresponding with the undetermined parameter mark inquired is extracted from the data source list.
4. the method according to claim 1, wherein described according to each candidate parameter and the test script File, generating the corresponding test case of each candidate parameter includes:
Determine that the undetermined parameter identifies the position in the test script file;
The test script file is written into each candidate parameter respectively according to the undetermined parameter position;
According to the test script file of write-in candidate parameter, the corresponding test case of each candidate parameter is sequentially generated.
5. the method according to claim 1, wherein described, to execute each candidate parameter parallel corresponding Test case, obtaining test result includes:
The corresponding test case of each candidate parameter is executed parallel, obtains the corresponding execution of each candidate parameter Status information;
Obtain preset state detection information;
The execution state information is detected according to the preset state detection information, it is corresponding to obtain each candidate parameter Test result.
6. a kind of data test device, which is characterized in that described device includes:
Script obtains module, for obtaining test script file;
Determining module is identified, undetermined parameter identifies in the test script file for determining;
Parameter query module, for inquiring each candidate parameter corresponding with undetermined parameter mark in data source list;
Use-case generation module, for generating each candidate parameter according to each candidate parameter and the test script file Corresponding test case;
Use-case execution module obtains test result for executing the corresponding test case of each candidate parameter parallel.
7. device according to claim 6, which is characterized in that the parameter query module is specific further include:
Identifier acquisition module, for obtaining the mark of the undetermined parameter in the test script file;
Enquiry module is identified, for inquiring the undetermined parameter mark in data source list;
Parameter extraction module, the corresponding each candidate of undetermined parameter mark for extracting with inquiring from the data source list Parameter.
8. device according to claim 6, which is characterized in that the use-case generation module is specific further include:
Position determination module, for determining that the undetermined parameter identifies the undetermined parameter position in the test script file;
Parameter writing module, for the test script text to be written in each candidate parameter respectively according to the undetermined parameter position Part;
Generation module sequentially generates the corresponding test of each candidate parameter for the test script file according to write-in candidate parameter Use-case.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any one of claims 1 to 5 institute when executing the computer program The step of stating method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 5 is realized when being executed by processor.
CN201811116085.4A 2018-09-25 2018-09-25 Data test method, apparatus, computer equipment and storage medium Pending CN109299009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811116085.4A CN109299009A (en) 2018-09-25 2018-09-25 Data test method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811116085.4A CN109299009A (en) 2018-09-25 2018-09-25 Data test method, apparatus, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109299009A true CN109299009A (en) 2019-02-01

Family

ID=65164174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811116085.4A Pending CN109299009A (en) 2018-09-25 2018-09-25 Data test method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109299009A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008204A (en) * 2019-03-12 2019-07-12 平安信托有限责任公司 Detection method, device, computer equipment and the storage medium of the quality of data
CN111726818A (en) * 2019-03-19 2020-09-29 深圳市广和通无线股份有限公司 Wireless chip testing method and device, computer equipment and storage medium
CN112180898A (en) * 2020-09-27 2021-01-05 深圳市元征科技股份有限公司 Parameter position determining method, device, equipment and storage medium
CN112597014A (en) * 2020-12-16 2021-04-02 软通动力信息技术(集团)股份有限公司 Automatic testing method, device, medium and electronic equipment based on data driving

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527509A (en) * 2003-03-06 2004-09-08 华为技术有限公司 Test method
CN101043543A (en) * 2006-03-24 2007-09-26 中兴通讯股份有限公司 Automatized test tool and method for program controlled exchanger
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
CN102402430A (en) * 2010-09-14 2012-04-04 无锡中星微电子有限公司 Method and system for generating random test case by using script
CN102609352A (en) * 2011-01-19 2012-07-25 阿里巴巴集团控股有限公司 Parallel testing method and parallel testing server
CN103631708A (en) * 2012-08-28 2014-03-12 深圳市世纪光速信息技术有限公司 Program testing method and program testing device
US20140095933A1 (en) * 2012-09-28 2014-04-03 Regina Griesinger Testing mobile applications
CN104503900A (en) * 2014-11-21 2015-04-08 北京奇虎科技有限公司 Test case generation method and device
US20150106791A1 (en) * 2013-10-14 2015-04-16 Cognizant Technology Solutions India Pvt. Ltd. System and method for automating build deployment and testing processes
CN105512036A (en) * 2015-12-12 2016-04-20 天津南大通用数据技术股份有限公司 Test template for automatically generating test case according to preset rules and test method
CN107729234A (en) * 2017-09-29 2018-02-23 郑州云海信息技术有限公司 The scheduling of test case performs method, apparatus, equipment and computer-readable storage medium
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527509A (en) * 2003-03-06 2004-09-08 华为技术有限公司 Test method
CN101043543A (en) * 2006-03-24 2007-09-26 中兴通讯股份有限公司 Automatized test tool and method for program controlled exchanger
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN102402430A (en) * 2010-09-14 2012-04-04 无锡中星微电子有限公司 Method and system for generating random test case by using script
CN102609352A (en) * 2011-01-19 2012-07-25 阿里巴巴集团控股有限公司 Parallel testing method and parallel testing server
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
CN103631708A (en) * 2012-08-28 2014-03-12 深圳市世纪光速信息技术有限公司 Program testing method and program testing device
US20140095933A1 (en) * 2012-09-28 2014-04-03 Regina Griesinger Testing mobile applications
US20150106791A1 (en) * 2013-10-14 2015-04-16 Cognizant Technology Solutions India Pvt. Ltd. System and method for automating build deployment and testing processes
CN104503900A (en) * 2014-11-21 2015-04-08 北京奇虎科技有限公司 Test case generation method and device
CN105512036A (en) * 2015-12-12 2016-04-20 天津南大通用数据技术股份有限公司 Test template for automatically generating test case according to preset rules and test method
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN107729234A (en) * 2017-09-29 2018-02-23 郑州云海信息技术有限公司 The scheduling of test case performs method, apparatus, equipment and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐彩霞等: "面向CLI的自动化测试方法的研究与实现", 《计算机与数字工程》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008204A (en) * 2019-03-12 2019-07-12 平安信托有限责任公司 Detection method, device, computer equipment and the storage medium of the quality of data
CN111726818A (en) * 2019-03-19 2020-09-29 深圳市广和通无线股份有限公司 Wireless chip testing method and device, computer equipment and storage medium
CN112180898A (en) * 2020-09-27 2021-01-05 深圳市元征科技股份有限公司 Parameter position determining method, device, equipment and storage medium
CN112180898B (en) * 2020-09-27 2022-04-19 深圳市元征科技股份有限公司 Parameter position determining method, device, equipment and storage medium
CN112597014A (en) * 2020-12-16 2021-04-02 软通动力信息技术(集团)股份有限公司 Automatic testing method, device, medium and electronic equipment based on data driving
CN112597014B (en) * 2020-12-16 2023-11-28 软通动力信息技术(集团)股份有限公司 Automatic test method and device based on data driving, medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110399293B (en) System test method, device, computer equipment and storage medium
CN109299009A (en) Data test method, apparatus, computer equipment and storage medium
CN108268375A (en) Applied program testing method, device, computer equipment and storage medium
CN108804548B (en) Test data query method, device, computer equipment and storage medium
CN108377240A (en) Exceptional interface detection method, device, computer equipment and storage medium
CN108256334B (en) Loophole test method, device, computer equipment and storage medium
CN108848000B (en) Network request testing method and device, computer equipment and storage medium
CN110209652A (en) Tables of data moving method, device, computer equipment and storage medium
CN107832206A (en) Method of testing, device, computer-readable recording medium and computer equipment
CN109542712A (en) Server stress test method, device, computer equipment and storage medium
CN108446221A (en) System detection method, device, computer equipment and storage medium
CN111475324B (en) Log information analysis method, device, computer equipment and storage medium
CN106603296A (en) Log processing method and device
CN109726134B (en) Interface test method and system
CN109144799A (en) Integrated testing method, apparatus, computer equipment and storage medium
CN110213357A (en) Business datum backing method, device, computer equipment and storage medium
CN109408370A (en) Interface testing document generating method, device, computer equipment and storage medium
CN110109897A (en) Database script generation method, device, computer equipment and storage medium
CN110321284B (en) Test data entry method, device, computer equipment and storage medium
CN110134795A (en) Generate method, apparatus, computer equipment and the storage medium of validation problem group
CN109710520A (en) Using the time-consuming test method of starting, device, computer equipment and storage medium
CN108399124A (en) Application testing method, device, computer equipment and storage medium
CN109408372A (en) Common component test method, device, computer equipment and storage medium
WO2018177205A1 (en) Regression testing method, device, computer apparatus, and storage medium
CN109815139A (en) Interface test method, device, computer equipment and storage medium

Legal Events

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

Application publication date: 20190201