CN109634837A - Automated testing method, device, equipment and storage medium - Google Patents
Automated testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109634837A CN109634837A CN201811238787.XA CN201811238787A CN109634837A CN 109634837 A CN109634837 A CN 109634837A CN 201811238787 A CN201811238787 A CN 201811238787A CN 109634837 A CN109634837 A CN 109634837A
- Authority
- CN
- China
- Prior art keywords
- case
- parameter
- test
- interface
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 206
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 241000208340 Araliaceae Species 0.000 claims abstract description 82
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims abstract description 82
- 235000003140 Panax quinquefolius Nutrition 0.000 claims abstract description 82
- 235000008434 ginseng Nutrition 0.000 claims abstract description 82
- 238000001514 detection method Methods 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 27
- 235000013399 edible fruits Nutrition 0.000 claims description 5
- 238000013522 software testing Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000005611 electricity Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 241001269238 Data Species 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012512 characterization method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000153 supplemental effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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
The present invention relates to automation software testing, a kind of automated testing method, device, equipment and storage medium are disclosed, this method comprises: receive automation test request, read include in automation test request enter parameter evidence;It is searched in preset electrical form and goes out to join column data and case mark according to corresponding into parameter;Corresponding target detection case is searched in test cases library according to case mark, performance objective test cases is to obtain case implementing result;Data Matching is carried out to ginseng column data is gone out according to case implementing result, and obtain matching result, since the present invention is to search corresponding ginseng column data out in preconfigured electrical form according to the parameter evidence that enters got, then Data Matching is carried out according to case implementing result of the ginseng column data out to test cases, without by open wall operation from external system obtain out parameter according to and carry out parameter matching, testing efficiency is also improved while going on smoothly ensure that automatic test.
Description
Technical field
The present invention relates to software testing technology field more particularly to a kind of automated testing method, device, equipment and storages
Medium.
Background technique
With the fast development of Internet technology and computer software technology, automatic test improves test because having
Efficiency shortens many advantages, such as regression test time, release manpower and is widely used in software service industry.Usual situation
Under, in the development cycle process of project, require to do one to the calling interface of program before application issued is online
A little comprehensive tests, including automatic test.
It, may in test process based on the reason of existing enterprise-level project or program are essentially all distributed collaborative
Having each interconnected system, there are firewalls with exploitation environment in test, carry out out the operation of wall, otherwise current system
Can not access and test between interconnected system, but open wall operation implementation procedure it is more complicated, test can not be effectively ensured
Efficiency.Therefore, in automatic test course, how to avoid out wall operation, guaranteeing that going on smoothly for automatic test is same
Shi Tigao testing efficiency just becomes a urgent problem to be solved.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of automated testing method, device, equipment and storage mediums, it is intended to
The technical issues of solving that existing automatization testing technique testing process is complicated, testing efficiency can not be effectively ensured.
To achieve the above object, it the present invention provides a kind of automated testing method, the described method comprises the following steps:
Receive automation test request, read include in automatic test request enter parameter evidence;
Enter parameter described in searching in preset electrical form to go out to join column data and case mark according to corresponding;
Corresponding target detection case is searched in test cases library according to case mark, executes the target detection
Case is to obtain case implementing result;
Go out to join column data progress Data Matching to described according to the case implementing result, and obtains matching result.
Preferably, the reception automates test request, read include in the automatic test request enter parameter evidence
The step of before, which comprises
Parameter configuration instruction is received, corresponding electronic watch is obtained according to the template identification for including in parameter configuration instruction
Grid template;
Receive the list item to be configured inputted based on the electronic form template and the corresponding configuration of the list item to be configured
Parameter, the list item to be configured include case mark, enter ginseng column, go out ginseng column and interface message;
The list item to be configured is associated with the configuration parameter, and association results are saved to the electrical form
Template is to obtain preset electrical form.
Preferably, the reception automates test request, read include in the automatic test request enter parameter evidence
The step of, comprising:
Automation test request is received, the required parameter for including in the automatic test request is read;
According in the preset electrical form enter ginseng column it is corresponding enter to join column configuration parameter, detecting in the required parameter is
It is no to exist to enter to join the identical target component of column configuration parameter with described;
If it exists, then the target component is obtained, and the parameter of selection preset quantity is used as from the target component
Parameter evidence.
Preferably, described to enter parameter described in lookup in preset electrical form according to corresponding ginseng column data and case mark out
The step of knowledge, comprising:
The target that lookup enters parameter evidence comprising described in the preset electrical form enters to join column configuration parameter;
According to the target enter to join column configuration parameter determine described in enter parameter and identified according to corresponding case and target interface
Information, and corresponding ginseng column data out is inquired in the preset electrical form according to the target interface information.
Preferably, described that corresponding target detection case is searched in test cases library according to case mark, it executes
The step of target detection case is to obtain case implementing result, comprising:
Corresponding target detection case, the target detection case are searched in test cases library according to case mark
In include several interface codes to be tested;
The case is read from the preset electrical form and identifies corresponding interface message, is believed according to the interface read
Breath determines the testing sequence of the interface code to be tested;
The interface code to be tested is tested according to the testing sequence, and is executed test result as case
As a result.
Preferably, described that the corresponding interface message of the case mark is read from the preset electrical form, according to reading
The interface message got determines the step of testing sequence of the interface code to be tested, comprising:
The case is read from the preset electrical form and identifies corresponding interface message, is obtained in the interface message
The interface identifier for including;
The interface identifier is ranked up to obtain interface identifier according to the character code carried in the interface identifier
Sequence;
The testing sequence of the corresponding interface code to be tested of each interface identifier is determined according to the interface identifier sequence.
Preferably, described to go out to join column data progress Data Matching to described according to the case implementing result, and acquisition
The step of with result, comprising:
The corresponding test data of the case implementing result is obtained, whether is the data for including in the detection column data of ginseng out
It is present in the test data;
If the test data and the ginseng column data successful match out are then determined, if otherwise determining the test data
It fails to match with the column data of ginseng out.
In addition, to achieve the above object, the present invention also proposes a kind of automatic test device, described device includes:
Ask respond module reads entering of including in automatic test request for receiving automation test request
Parameter evidence;
Data inquiry module, in preset electrical form search described in enter parameter according to it is corresponding go out ginseng column data and
Case mark;
Case execution module, for searching corresponding target detection case in test cases library according to case mark
Example, executes the target detection case to obtain case implementing result;
As a result matching module, for going out to join column data progress Data Matching to described according to the case implementing result, and
Obtain matching result.
In addition, to achieve the above object, the present invention also proposes a kind of automated test device, the equipment includes: storage
Device, processor and it is stored in the automatic test program that can be run on the memory and on the processor, it is described automatic
Change the step of test program is arranged for carrying out automated testing method as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, it is stored on the storage medium automatic
Change test program, the automatic test program realizes the step of automated testing method as described above when being executed by processor
Suddenly.
For example of the present invention by receiving automation test request, include in reading automation test request enters parameter evidence;?
It is searched in preset electrical form and goes out to join column data and case mark according to corresponding into parameter;It is identified according to case in test cases
Corresponding target detection case is searched in library, performance objective test cases is to obtain case implementing result;Knot is executed according to case
Fruit carries out Data Matching to ginseng column data is gone out, and obtains matching result, due to the present invention be basis get enter parameter it is investigated that
Look for what is stored in preset electrical form to go out ginseng column data, then according to go out ginseng column data to the case implementing result of test cases into
Row Data Matching, without by open wall operation from external system obtain out parameter according to and matched, it is automatic ensure that
That changes test also improves testing efficiency while going on smoothly.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the automated test device for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of automated testing method first embodiment of the present invention;
Fig. 3 is the flow diagram of automated testing method second embodiment of the present invention;
Fig. 4 is the flow diagram of automated testing method 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of automatic test device first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is that the automated test device structure for the hardware running environment that the embodiment of the present invention is related to is shown
It is intended to.
As shown in Figure 1, the automated test device may include: processor 1001, such as central processing unit (Central
Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein,
Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen
(Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include that the wired of standard connects
Mouth, wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (such as Wireless Fidelity
(WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random access memory (Random of high speed
Access Memory, RAM) memory, be also possible to stable nonvolatile memory (Non-Volatile Memory,
), such as magnetic disk storage NVM.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to automated test device,
It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, as may include operating system, data storage mould in a kind of memory 1005 of storage medium
Block, network communication module, Subscriber Interface Module SIM and automatic test program.
In automated test device shown in Fig. 1, network interface 1004 is mainly used for carrying out data with network server
Communication;User interface 1003 is mainly used for carrying out data interaction with user;Processor in automated test device of the present invention
1001, memory 1005 can be set in automated test device, and the automated test device is adjusted by processor 1001
With the automatic test program stored in memory 1005, and execute automated testing method provided in an embodiment of the present invention.
The embodiment of the invention provides a kind of automated testing methods, are automatic test side of the present invention referring to Fig. 2, Fig. 2
The flow diagram of method first embodiment.
In the present embodiment, the automated testing method the following steps are included:
Step S10: receiving automation test request, read include in automatic test request enter parameter evidence;
It is constructed it should be noted that the executing subject of the present embodiment method can be developer according to actual test demand
Virtual test system (hereinafter referred to as mock system), which is used to simulate interconnected system and interface in actual test
Calling system carries out data interaction.
It should be understood that mock system can receive interface calling system (such as client or shifting in automatic test course
Dynamic terminal) the automatic test request that sends, then to request carry out it is including in parsing read requests, by interface calling system
The input parameter (being commonly referred to as in software test into ginseng) of transmitting, i.e., it is described enter parameter evidence.
Step S20: enter parameter described in searching in preset electrical form and go out to join column data and case mark according to corresponding;
It should be noted that developer can construct one in advance and deposit in the form of a spreadsheet before executing this step
Store up the automatic test database of the corresponding field data of different test cases, i.e., the described preset electrical form;The preset electricity
Sub-table can be the electrical form of different document format, in the present embodiment and following each embodiments, the preset electrical form
Preferably Excel table, the corresponding field data of each case at least should include: case coding, interface message in Excel table
(such as description of interface IP address, interface, interface type) enters ginseng column, goes out ginseng column list item, and developer can configure phase for each list item
The parameter answered, for example, be into ginseng column configuration it is corresponding enter join column data " " entering ginseng 1 ": " value1 ", " entering ginseng 2 ": "
Value2 " " go out ginseng column configuration it is corresponding go out ginseng column data " [{ " key1 ": " value1 ", { " key2 ": " value2 " }] ".
Specifically, developer is when constructing the automatic test database, it can be according to test cases application scenarios
Difference identifies to set case, to distinguish mutually independent test cases.Wherein, case mark can pass through Case No or label
Form embody, the format of the Case No can be according to " interface number+scene number " Lai Dingyi, such as Case No
In " 101001000000 ", interface number is " 10100 ", and scene number is " 1000000 ", and the scene number is to characterization test case
For specific test scene.
In the concrete realization, what mock system carried in getting automatic test request enters parameter after, can basis
In preset electrical form it is preconfigured it is all enter join column data to it is described enter parameter according to carry out comprising matching, to detect preset electricity
Enter to join column data with the presence or absence of successful match in sub-table, and if it exists, then search in electrical form and to enter with successful match
Join the corresponding ginseng column data out of column data and case mark.
It should be understood that described comprising matching, i.e., enter described in detection parameter according to comprising data in whether at least one
Data packet contained in Excel table it is any enter ginseng column in configure enter to join column data, then show successful match if it exists, such as enter ginseng
Data include tri- item data of a, b, c, if it includes [a, e, f] that z row, which enters the column data that enters to join configured in ginseng column, in Excel table,
Then entering parameter, there are data a to be contained in into ginseng column data [a, e, f] in, can determine that successful match at this time.
Step S30: identifying according to the case and search corresponding target detection case in test cases library, described in execution
Target detection case is to obtain case implementing result;
It should be understood that the test cases library can be the data space for storing all kinds of test cases.It opens
Hair personnel when constructing the test cases library, can by the store path of each test cases corresponding case mark and test cases into
Row association, in order to which mock system is when getting case mark, according to the store path of case mark and test cases
Between incidence relation quick obtaining target detection case store path, then obtained and executed described according to the store path
Target detection case obtains case implementing result.
It will be appreciated that the test cases, i.e. test case, refer to that carrying out test to a specific software product appoints
The description of business embodies testing scheme, method, technology and strategy, includes that several are to be measured in test cases described in the present embodiment
The interface code of examination.
Step S40: go out to join column data progress Data Matching to described according to the case implementing result, and obtain matching knot
Fruit.
In the concrete realization, mock system obtains the corresponding test data of the case implementing result, then described in detection
Join whether the data for including in column data are present in the test data out;If then determine the test data with it is described
Join column data successful match (being successfully tested) out, it fails to match if otherwise determining the test data and the column data of ginseng out
(i.e. test crash).
Further, the present embodiment automated testing method is before the step S10, further includes:
Step: receiving parameter configuration instruction, is obtained according to the template identification for including in parameter configuration instruction corresponding
Electronic form template;
It will be appreciated that the electronic form template can be " blank " electrical form (example for carrying out parameter configuration
Such as Excel table), the template identification, which can be, can distinguish different document format (Word, Excel, TXT) electronic stencil
Character information.
In the concrete realization, mock system is instructed in response to the parameter configuration received, and parsing obtains the parameter configuration and refers to
Then the template identification for including in order obtains corresponding electronic form template according to the template identification from template database.
Step: the list item to be configured inputted based on the electronic form template and the list item correspondence to be configured are received
Configuration parameter, the list item to be configured include case mark, enter ginseng column, go out ginseng column and interface message;
After getting electronic form template, mock system can be inputted by receiving developer based on electronic form template
List item to be configured and the corresponding configuration parameter of each list item to be configured.The list item to be configured of this in the present embodiment includes at least case
Example mark enters ginseng column, goes out the four class list items such as ginseng column and interface message, and certainly, interface message described in the present embodiment can also divide
For sublists items such as interface IP address, interface description, interface types.Correspondingly, the configuration parameter, that is, each list item to be configured is corresponding
Supplemental characteristic, such as " case mark " the corresponding configuration parameter of list item are " 10100100,101002000,101003000 ";" enter
Ginseng column " the corresponding configuration parameter of list item is " { " entering ginseng 1 ": " value1 ", " entering ginseng 2 ": " value2 " }, { " entering ginseng 3 ": "
Value3 ", " entering ginseng 4 ": " value4 " } " etc..
Step: the list item to be configured is associated with the configuration parameter, and association results are saved to the electricity
Sublist grid template is to obtain preset electrical form.
It should be noted that described be associated list item to be configured with configuration parameter, and association results are saved to institute
Electronic form template is stated, i.e., by mock system after corresponding each list item to be configured configuration parameter corresponding with the list item to be configured
To obtain the preset electrical form in system write-in electronic form template.
For the present embodiment by receiving automation test request, include in reading automation test request enters parameter evidence;?
It is searched in preset electrical form and goes out to join column data and case mark according to corresponding into parameter;It is identified according to case in test cases
Corresponding target detection case is searched in library, performance objective test cases is to obtain case implementing result;Knot is executed according to case
Fruit carries out Data Matching to ginseng column data is gone out, and obtains matching result, by thus according to get enter to join data search it is preset
What is stored in electrical form goes out ginseng column data, then carries out data according to case implementing result of the ginseng column data out to test cases
Matching, without by open wall operation from external system obtain out parameter according to and matched, ensure that automatic test
Testing efficiency is also improved while going on smoothly.
With reference to Fig. 3, Fig. 3 is the flow diagram of automated testing method second embodiment of the present invention.
Based on above-mentioned first embodiment, in the present embodiment, the step S10 can include:
Step S101: receiving automation test request, reads the required parameter for including in the automatic test request;
It should be understood that the required parameter can be similar to " input parameter " carried in automatic test request
Field data, by taking the automatic test of " user's login " as an example, may include in the required parameter that mock system is got "
Name ": " zhangsan ", " gender ": " man ", " age ": 18, " addr ": " Ch ina " } etc. 4 field datas.
It further, is the building and updating maintenance convenient for automatic test database (the i.e. described preset electrical form),
Mock system can't be an actually-received by the present embodiment when constructing the automatic test case library based on Excel table
Required parameter is all configured to Excel table and enters that ginseng column are corresponding to enter to join in column configuration parameter, but from the required parameter received
The middle a certain number of parameters of selection are used as to enter to join column configuration parameter and be written to the Excel table.
Step S102: according in the preset electrical form enter ginseng column it is corresponding enter to join column configuration parameter, asked described in detection
It asks in parameter to enter to join the identical target component of column configuration parameter with the presence or absence of with described;
In the concrete realization, mock system, can be in the preset electrical form after getting the required parameter
Enter that ginseng column are corresponding to enter to join that go to search in column configuration parameter include that the required parameter enters to join column configuration parameter, to detect
It states in required parameter with the presence or absence of target component identical with entering to join column configuration parameter.For example, in the required parameter of user's input
Including six parameters of A, B, C, D, E, F, in Excel table xth row enter ginseng column it is corresponding enter join column configuration parameter include [M, N, R,
X, Y], y row enter ginseng column it is corresponding enter join column configuration parameter include [B, C, R, D, Y], then can be detected required parameter in exist
Entering ginseng with y row, column are corresponding enters to join the identical target component of column configuration parameter " B, C, D ".
Step S103: if it exists, then obtaining the target component, and the ginseng of preset quantity is chosen from the target component
Number is used as parameter evidence.
It should be understood that in order to reduce mock system according to enter to join data search it is corresponding go out ginseng column data when workload,
Testing efficiency is improved, exists to enter to join column configuration parameter with described into the required parameter when mock system detection in the present embodiment
When identical target component, the target component is obtained, and the parameter of selection preset quantity is used as from the target component
Parameter evidence, such as it is used as parameter evidence from target component " B, C, D " Selecting All Parameters B, C.
Further, in this embodiment the step S20, it may include:
Step S201: the target that lookup enters parameter evidence comprising described in the preset electrical form enters ginseng column and configures ginseng
Number;
In the concrete realization, mock system from target component choose preset quantity enter parameter according to after, can be in institute
It states the target that lookup enters parameter evidence comprising described in preset electrical form and enters to join column configuration parameter, certainly, the target enters ginseng column
Configuration parameter can also be determined according to testing result and be obtained by mock system when executing above-mentioned steps S102.
Step S202: according to the target enter to join column configuration parameter determine described in enter parameter identified according to corresponding case and
Target interface information, and corresponding ginseng column data out is inquired in the preset electrical form according to the target interface information.
It should be understood that being generally correspondingly configured under " case mark " list item in the preset electrical form multiple and different
Case No, and each Case No is expert at and is corresponding with other list items (such as enter ginseng column, go out ginseng column, interface message) and matches
The parameter set, such as case column are identified as " 101001000000 ", corresponding to enter to join column configuration parameter as " { " entering ginseng 1 ": "
Value1 ", " entering ginseng 2 ": " value2 " } ", it is corresponding go out ginseng column configuration parameter be " [{ " key1 ": " value1 " }, { "
Key2 ": " value2 " }] ", corresponding interface message be configured to interface IP address " case entry address ", interface description " interface-is just
Often obtain out ginseng ", interface type " first kind " etc..
In the concrete realization, mock system enters to join column configuration parameter according to the target found from preset electrical form,
Determine that the target enters to join column configuration parameter corresponding case mark and target interface information in the preset electrical form, so
Corresponding ginseng column data out is inquired from the preset electrical form according to interface message (such as interface description) afterwards.
It should be noted that same case mark may be corresponding with multiple ginseng column datas out in actual conditions, therefore
Ginseng column data is inquired from preset electrical form using interface message in the present embodiment, to guarantee to the accurate of ginseng column data out
It obtains.
The present embodiment reads the required parameter for including in automation test request, root by receiving automation test request
According in preset electrical form enter ginseng column it is corresponding enter to join column configuration parameter, detect required parameter in whether there is and enter ginseng column configuration
The identical target component of parameter, and if it exists, then obtain target component, and choose the parameter conduct of preset quantity from target component
Enter parameter evidence;Then search in preset electrical form includes to enter to join column configuration parameter into the target of parameter evidence;Further according to target
Enter to join column configuration parameter and determine that parameter identifies and target interface information according to corresponding case, and is existed according to target interface information
The corresponding column data of ginseng out is inquired in preset electrical form to also ensure out and join while reducing mock system workload
The accurate acquisition of column data.
With reference to Fig. 4, Fig. 4 is the flow diagram of automated testing method 3rd embodiment of the present invention.
Based on the various embodiments described above, in the present embodiment, the step S30 is specifically included:
Step S301: corresponding target detection case, the mesh are searched in test cases library according to case mark
Marking includes several interface codes to be tested in test cases;
In the concrete realization, mock system is according between the case mark pre-established and the store path of test cases
Incidence relation obtains the store path of target detection case, then obtains target detection case according to the store path.Wherein, institute
Stating includes several interface codes to be tested in target detection case, and all carries and can incite somebody to action in every section of interface code to be tested
The interface identifier that this section of code and other codes distinguish.
Step S302: the case is read from the preset electrical form and identifies corresponding interface message, according to reading
To interface message determine the testing sequence of the interface code to be tested;
It should be noted that developer can be pre- according to code tester sequence to guarantee that the automation of code tester carries out
The character code for capableing of characterization test sequence is first written in the interface identifier that interface message includes, so that subsequent mock system
The testing sequence of each section of interface code to be tested can be determined according to the character code carried in interface identifier.
In the concrete realization, mock system can read the case from the preset electrical form and identify corresponding interface
Information obtains the interface identifier for including in the interface message;According to the character code carried in the interface identifier to described
Interface identifier is ranked up to obtain interface identifier sequence;According to the interface identifier sequence determine each interface identifier it is corresponding to
The testing sequence of test interface code.Such as include tri- sections of interface codes to be tested of a, b and c in target detection case, and it is to be measured
The corresponding interface identifier of examination interface code a, b and c is respectively jk-0a01, jk-0b02 and jk-0c03, then can be according to interface identifier
The character code " 0a01,0b02,0c03 " of middle carrying is ranked up interface identifier " jk-0a01, jk-0b02 and jk-0c03 "
To obtain interface identifier sequence jk-0a01*jk-0b02*jk-0c03, a, b and c tri- is then determined according to the interface identifier sequence
The testing sequence of section interface code to be tested.
Step S303: the interface code to be tested is tested according to the testing sequence, and test result is made
For case implementing result.
In the concrete realization, mock system, can be according to described after the testing sequence for determining each interface code to be tested
Testing sequence tests the interface code to be tested, obtains test result and using test result as entire target detection
The implementing result of case.
The present embodiment in test cases library by searching corresponding target detection case according to case mark, from preset electricity
Case is read in sub-table and identifies corresponding interface message, and the survey of interface code to be tested is determined according to the interface message read
Examination sequence;Then test interface code is treated according to testing sequence to be tested, ensure that the smooth execution of test cases, avoid
The test data of final acquisition does not conform to the actual conditions.
In addition, the embodiment of the present invention also proposes a kind of storage medium, automatic test journey is stored on the storage medium
The step of sequence, the automatic test program realizes automated testing method as described above when being executed by processor.
It is the structural block diagram of automatic test device first embodiment of the present invention referring to Fig. 5, Fig. 5.
As shown in figure 5, the automatic test device that the embodiment of the present invention proposes includes:
Ask respond module 501 reads in automatic test request for receiving automation test request and includes
Enter parameter evidence;
Data inquiry module 502 goes out to join column data for entering parameter described in the lookup in preset electrical form according to corresponding
And case mark;
Case execution module 503, for searching corresponding target detection in test cases library according to case mark
Case executes the target detection case to obtain case implementing result;
As a result matching module 504, for going out to join column data progress Data Matching to described according to the case implementing result,
And obtain matching result.
For the present embodiment by receiving automation test request, include in reading automation test request enters parameter evidence;?
It is searched in preset electrical form and goes out to join column data and case mark according to corresponding into parameter;It is identified according to case in test cases
Corresponding target detection case is searched in library, performance objective test cases is to obtain case implementing result;Knot is executed according to case
Fruit carries out Data Matching to ginseng column data is gone out, and obtains matching result, by thus according to get enter to join data search it is preset
What is stored in electrical form goes out ginseng column data, then carries out data according to case implementing result of the ginseng column data out to test cases
Matching, without by open wall operation from external system obtain out parameter according to and matched, ensure that automatic test
Testing efficiency is also improved while going on smoothly.
Based on the above-mentioned automatic test device first embodiment of the present invention, the second of automatic test device of the present invention is proposed
Embodiment.
In the present embodiment, the automatic test device further include: table configuration module refers to for receiving parameter configuration
It enables, corresponding electronic form template is obtained according to the template identification for including in parameter configuration instruction;It receives and is based on the electricity
Sublist grid template input list item to be configured and the corresponding configuration parameter of the list item to be configured, the list item to be configured include
Case mark enters ginseng column, goes out ginseng column and interface message;The list item to be configured is associated with the configuration parameter, and
Association results are saved to the electronic form template to obtain preset electrical form.
Further, the ask respond module 501, is also used to receive automation test request, reads the automation
The required parameter for including in test request;According in the preset electrical form enter ginseng column it is corresponding enter to join column configuration parameter, examine
It surveys in the required parameter to enter to join the identical target component of column configuration parameter with the presence or absence of with described;If it exists, then described in obtaining
Target component, and the parameter of selection preset quantity is used as parameter evidence from the target component.
Further, the data inquiry module 502 is also used to search to enter comprising described in the preset electrical form
The target of parameter evidence enters to join column configuration parameter;According to the target enter to join column configuration parameter determine described in enter parameter according to corresponding case
Example mark and target interface information, and inquired in the preset electrical form according to the target interface information it is corresponding go out
Join column data.
Further, the case execution module 503 is also used to be identified according to the case and search in test cases library
Corresponding target detection case includes several interface codes to be tested in the target detection case;From the preset electronics
The case is read in table and identifies corresponding interface message, and the interface generation to be tested is determined according to the interface message read
The testing sequence of code;The interface code to be tested is tested according to the testing sequence, and using test result as case
Example implementing result.
Further, the case execution module 503 is also used to read the case mark from the preset electrical form
Know corresponding interface message, obtains the interface identifier for including in the interface message;According to the word carried in the interface identifier
Symbol coding is ranked up the interface identifier to obtain interface identifier sequence;Each interface is determined according to the interface identifier sequence
Identify the testing sequence of corresponding interface code to be tested.
Further, the result matching module 504 is also used to obtain the corresponding test number of the case implementing result
According to detection is described to be gone out to join whether the data for including in column data are present in the test data;If then determining the survey
Data and the ginseng column data successful match out are tried, the test data matches mistake with the column data of ginseng out if otherwise determining
It loses.
The other embodiments or specific implementation of automatic test device of the present invention can refer to above-mentioned each method embodiment,
Details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as read-only memory/random access memory, magnetic disk, CD), including some instructions are used so that a terminal device (can
To be mobile phone, computer, server, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of automated testing method, which is characterized in that the described method includes:
Receive automation test request, read include in automatic test request enter parameter evidence;
Enter parameter described in searching in preset electrical form to go out to join column data and case mark according to corresponding;
Corresponding target detection case is searched in test cases library according to case mark, executes the target detection case
To obtain case implementing result;
Go out to join column data progress Data Matching to described according to the case implementing result, and obtains matching result.
2. the method as described in claim 1, which is characterized in that the reception automates test request, reads the automation
Include in test request enter parameter according to the step of before, which comprises
Parameter configuration instruction is received, corresponding electrical form mould is obtained according to the template identification for including in parameter configuration instruction
Plate;
The list item to be configured inputted based on the electronic form template and the corresponding configuration parameter of the list item to be configured are received,
The list item to be configured includes case mark, enters ginseng column, goes out ginseng column and interface message;
The list item to be configured is associated with the configuration parameter, and association results are saved to the electronic form template
To obtain preset electrical form.
3. method according to claim 2, which is characterized in that the reception automates test request, reads the automation
Include in test request enter parameter according to the step of, comprising:
Automation test request is received, the required parameter for including in the automatic test request is read;
According in the preset electrical form enter ginseng column it is corresponding enter to join column configuration parameter, detect in the required parameter and whether deposit
Enter to join the identical target component of column configuration parameter with described;
If it exists, then the target component is obtained, and the parameter of selection preset quantity is used as parameter from the target component
According to.
4. method as described in any one of claims 1 to 3, which is characterized in that it is described in preset electrical form search described in
Enter the step of parameter is identified according to corresponding ginseng column data out and case, comprising:
The target that lookup enters parameter evidence comprising described in the preset electrical form enters to join column configuration parameter;
According to the target enter to join column configuration parameter determine described in enter parameter and identified according to corresponding case and target interface information,
And corresponding ginseng column data out is inquired in the preset electrical form according to the target interface information.
5. method as claimed in claim 4, which is characterized in that described to be searched in test cases library according to case mark
Corresponding target detection case executes the step of target detection case is to obtain case implementing result, comprising:
Corresponding target detection case is searched in test cases library according to case mark, is wrapped in the target detection case
Include several interface codes to be tested;
The case is read from the preset electrical form identifies corresponding interface message, it is true according to the interface message read
The testing sequence of the fixed interface code to be tested;
The interface code to be tested is tested according to the testing sequence, and executes knot for test result as case
Fruit.
6. method as claimed in claim 5, which is characterized in that described to read the case mark from the preset electrical form
The step of knowing corresponding interface message, the testing sequence of the interface code to be tested determined according to the interface message read,
Include:
The case is read from the preset electrical form and identifies corresponding interface message, is obtained in the interface message and is included
Interface identifier;
The interface identifier is ranked up according to the character code carried in the interface identifier to obtain interface identifier sequence;
The testing sequence of the corresponding interface code to be tested of each interface identifier is determined according to the interface identifier sequence.
7. such as method as claimed in any one of claims 1 to 6, which is characterized in that it is described according to the case implementing result to institute
It states out ginseng column data and carries out Data Matching, and the step of obtaining matching result, comprising:
The corresponding test data of the case implementing result is obtained, detection is described to be gone out to join whether the data for including in column data deposit
It is in the test data;
If the test data and the ginseng column data successful match out are then determined, if otherwise determining the test data and institute
Stating out ginseng column data, it fails to match.
8. a kind of automatic test device, which is characterized in that described device includes:
Ask respond module, for receiving automation test request, read include in automatic test request enter parameter
According to;
Data inquiry module goes out to join column data and case for entering parameter described in the lookup in preset electrical form according to corresponding
Mark;
Case execution module is held for searching corresponding target detection case in test cases library according to case mark
The row target detection case is to obtain case implementing result;
As a result matching module for going out to join column data progress Data Matching to described according to the case implementing result, and obtains
Matching result.
9. a kind of automated test device, which is characterized in that the equipment includes: memory, processor and is stored in described deposit
On reservoir and the automatic test program that can run on the processor, the automatic test program are arranged for carrying out such as power
Benefit require any one of 1 to 7 described in automated testing method the step of.
10. a kind of storage medium, which is characterized in that be stored with automatic test program, the automation on the storage medium
The step of automated testing method as described in any one of claim 1 to 7 is realized when test program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811238787.XA CN109634837B (en) | 2018-10-23 | Automatic test method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811238787.XA CN109634837B (en) | 2018-10-23 | Automatic test method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109634837A true CN109634837A (en) | 2019-04-16 |
CN109634837B CN109634837B (en) | 2024-05-28 |
Family
ID=
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061637A (en) * | 2019-12-13 | 2020-04-24 | 广州品唯软件有限公司 | Interface test method, interface test device and storage medium |
CN111190093A (en) * | 2020-01-10 | 2020-05-22 | 上海知白智能科技有限公司 | Chip testing method and device |
CN111382081A (en) * | 2020-03-27 | 2020-07-07 | 中国建设银行股份有限公司 | Entry verification test method and device |
CN111427778A (en) * | 2020-03-18 | 2020-07-17 | 中国平安人寿保险股份有限公司 | Test method, test device, terminal equipment and storage medium |
CN111581083A (en) * | 2020-04-26 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN112000582A (en) * | 2020-08-31 | 2020-11-27 | 深圳市奇虎智能科技有限公司 | Server-side automatic test early warning method, device, equipment and storage medium |
CN112052182A (en) * | 2020-09-27 | 2020-12-08 | 平安信托有限责任公司 | Interface automation test method and device, computer equipment and storage medium |
CN112100079A (en) * | 2020-11-02 | 2020-12-18 | 北京淇瑀信息科技有限公司 | Test method and system based on simulation data calling and electronic equipment |
CN112711538A (en) * | 2020-12-30 | 2021-04-27 | 招商局金融科技有限公司 | Test system simulation method and device, computer equipment and storage medium |
CN113535538A (en) * | 2020-04-21 | 2021-10-22 | 网联清算有限公司 | Application full-link automatic testing method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9111030B1 (en) * | 2008-10-03 | 2015-08-18 | Federal Home Loan Mortgage Corporation | Systems and methods for testing a software application |
CN106528393A (en) * | 2015-09-09 | 2017-03-22 | 北京京东尚科信息技术有限公司 | Method and device for Mock testing of WebService |
CN107665171A (en) * | 2017-10-11 | 2018-02-06 | 中国民生银行股份有限公司 | Automatic regression test method and device |
CN107861870A (en) * | 2017-11-02 | 2018-03-30 | 平安科技(深圳)有限公司 | Interface testing and test data generating method, device, terminal and storage medium |
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9111030B1 (en) * | 2008-10-03 | 2015-08-18 | Federal Home Loan Mortgage Corporation | Systems and methods for testing a software application |
CN106528393A (en) * | 2015-09-09 | 2017-03-22 | 北京京东尚科信息技术有限公司 | Method and device for Mock testing of WebService |
CN107665171A (en) * | 2017-10-11 | 2018-02-06 | 中国民生银行股份有限公司 | Automatic regression test method and device |
CN107861870A (en) * | 2017-11-02 | 2018-03-30 | 平安科技(深圳)有限公司 | Interface testing and test data generating method, device, terminal and storage medium |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061637A (en) * | 2019-12-13 | 2020-04-24 | 广州品唯软件有限公司 | Interface test method, interface test device and storage medium |
CN111061637B (en) * | 2019-12-13 | 2023-08-18 | 广州品唯软件有限公司 | Interface testing method, interface testing device and storage medium |
CN111190093A (en) * | 2020-01-10 | 2020-05-22 | 上海知白智能科技有限公司 | Chip testing method and device |
CN111427778A (en) * | 2020-03-18 | 2020-07-17 | 中国平安人寿保险股份有限公司 | Test method, test device, terminal equipment and storage medium |
CN111382081A (en) * | 2020-03-27 | 2020-07-07 | 中国建设银行股份有限公司 | Entry verification test method and device |
CN113535538A (en) * | 2020-04-21 | 2021-10-22 | 网联清算有限公司 | Application full-link automatic testing method and device, electronic equipment and storage medium |
CN113535538B (en) * | 2020-04-21 | 2023-06-16 | 网联清算有限公司 | Method, device, electronic equipment and storage medium for automatically testing application full link |
CN111581083A (en) * | 2020-04-26 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN111581083B (en) * | 2020-04-26 | 2024-02-09 | 抖音视界有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN112000582A (en) * | 2020-08-31 | 2020-11-27 | 深圳市奇虎智能科技有限公司 | Server-side automatic test early warning method, device, equipment and storage medium |
CN112052182A (en) * | 2020-09-27 | 2020-12-08 | 平安信托有限责任公司 | Interface automation test method and device, computer equipment and storage medium |
CN112100079A (en) * | 2020-11-02 | 2020-12-18 | 北京淇瑀信息科技有限公司 | Test method and system based on simulation data calling and electronic equipment |
CN112711538A (en) * | 2020-12-30 | 2021-04-27 | 招商局金融科技有限公司 | Test system simulation method and device, computer equipment and storage medium |
CN112711538B (en) * | 2020-12-30 | 2024-03-19 | 招商局金融科技有限公司 | Test system simulation method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9483385B2 (en) | Method, program, and system for generating test cases | |
CN108959059B (en) | Test method and test platform | |
CN105787364B (en) | Automatic testing method, device and system for tasks | |
CN107608874A (en) | Method of testing and device | |
CN112711526B (en) | UI test method, device, equipment and storage medium | |
CN106294094A (en) | The method of testing of game server, client, server and system | |
CN110833693B (en) | Game running method and device, storage medium and electronic device | |
CN114692169B (en) | Page vulnerability processing method applying big data and AI analysis and page service system | |
CN111736951A (en) | Simulation method for automatic driving, computer device, and storage medium | |
CN110908907A (en) | Web page testing method, device, equipment and storage medium | |
CN107992424A (en) | Automatic test analysis method, application server and computer-readable recording medium | |
CN112988578A (en) | Automatic testing method and device | |
CN115297024B (en) | Performance test method and device of network security equipment and electronic equipment | |
CN116719736A (en) | Test case generation method and device for testing software interface | |
CN109634837A (en) | Automated testing method, device, equipment and storage medium | |
CN110968511A (en) | Recommendation engine testing method, device, computing equipment and system | |
CN106294146B (en) | Parameter replacement test method and device | |
CN114416596A (en) | Application testing method and device, computer equipment and storage medium | |
CN112307379B (en) | Page generation method, device and equipment | |
CN112579426B (en) | Method and device for testing object to be tested | |
CN112765041A (en) | Game automatic testing method and device and electronic equipment | |
CN109634837B (en) | Automatic test method, device, equipment and storage medium | |
CN109446103A (en) | A kind of CIM Provider test method and device | |
CN112765040B (en) | Page test method, system, computer equipment and storage medium | |
JPH06265598A (en) | Test specification generating system |
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 | ||
GR01 | Patent grant |