CN110347596A - A kind of test method, device, system, electronic equipment and medium - Google Patents
A kind of test method, device, system, electronic equipment and medium Download PDFInfo
- Publication number
- CN110347596A CN110347596A CN201910589684.6A CN201910589684A CN110347596A CN 110347596 A CN110347596 A CN 110347596A CN 201910589684 A CN201910589684 A CN 201910589684A CN 110347596 A CN110347596 A CN 110347596A
- Authority
- CN
- China
- Prior art keywords
- test
- case
- test case
- service
- server
- 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
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
Abstract
The invention discloses a kind of test method, device, system, electronic equipment and media, method includes: to execute allocation proportion according to the server use-case of configuration, it is extracted from test case library and obtains executing the first test use cases of test for testing service device and execute the second test use cases of test for service server, the ratio for the test case quantity that two test cases are concentrated meets server use-case and executes allocation proportion;The difference of the test response results collection and corresponding expected results that are returned according to testing service device, and service server return service response result set and corresponding expected results difference, determine test case to be modified and generate server use-case execute allocation proportion adjustment instruction.It can reduce the interference that the actual services function of service server is subject to by test, guarantee the efficient progress of test.It can help to find some exceptions or borderline cases, and then can modify to test case and perfect, improve the realization robustness of business function.
Description
Technical field
The present invention relates to Internet communication technology field more particularly to a kind of test method, device, system, electronic equipments
And medium.
Background technique
With the continuous development of Internet technology, for having carried out the interaction process of business using Internet communication technology
As main trend.In business processing, generally require by calling corresponding interface to carry out business support.To guarantee business function
Effective realization of energy needs to carry out dependence test to this.
In the prior art, the dependence test for calling corresponding interface whether to can be realized expected business function is often limited to
In test environment, for example the implementation of test cases of testing service device is used, phase is carried out according to the response that the testing service device returns
Close debugging.However, being based only on the test of testing service device, there may be testing blind zones.Especially when test case is less,
Even if test passes through, it cannot guarantee that business function can be realized effectively under some exceptions or borderline cases.
Summary of the invention
It applies to solve the prior art when carrying out functional test, the problems such as test accuracy is poor, the present invention provides
A kind of test method, device, system, electronic equipment and medium:
On the one hand, the present invention provides a kind of test methods, which comprises
Allocation proportion is executed according to the server use-case of configuration, is extracted from test case library and obtains the first test use cases
The survey that the test case quantity and second test case concentrated with the second test use cases, first test case are concentrated
The ratio of number of cases amount on probation meets the server use-case and executes allocation proportion, and first test use cases are used for testing service
Device executes test, and second test use cases execute test for service server;
The test response results collection and the difference of corresponding expected results that are returned according to the testing service device and described
The difference of service response result set and corresponding expected results that service server returns, determines test case to be modified and life
Allocation proportion adjustment instruction is executed at server use-case.
On the other hand a kind of test device is provided, described device includes:
Test use cases extraction module: for executing allocation proportion according to the server use-case of configuration, from test case library
Middle extraction obtains the first test use cases and the second test use cases, test case quantity that first test case is concentrated and
The ratio for the test case quantity that second test case is concentrated meets the server use-case and executes allocation proportion, and described the
One test use cases execute test for testing service device, and second test use cases execute test for service server;
Result difference respond module: test response results collection for being returned according to the testing service device and corresponding pre-
The difference of service response result set and corresponding expected results that the difference of phase result and the service server return, really
Fixed test case to be modified and generation server use-case execute allocation proportion adjustment instruction.
On the other hand there is provided a system comprising testing service device, service server and as above-mentioned
Test device.
On the other hand a kind of electronic equipment is provided, the electronic equipment includes processor and memory, the memory
In be stored at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, described at least one
Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize such as above-mentioned test method.
On the other hand a kind of computer readable storage medium is provided, at least one finger is stored in the storage medium
Enable, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or
Instruction set is loaded by processor and is executed to realize such as above-mentioned test method.
A kind of test method, device, system, electronic equipment and medium provided by the invention, have the following technical effect that
The present invention can reduce the interference that the actual services function of service server is subject to by test, guarantee the efficient of test
It carries out.Can help to find it is some there are the exception ignored or borderline cases, and then can modify to test case and
It is perfect, improve the realization robustness of business function.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology and advantage, below will be to implementation
Example or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, the accompanying drawings in the following description is only
It is only some embodiments of the present invention, for those of ordinary skill in the art, without creative efforts,
It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of schematic diagram of application environment provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of test method provided in an embodiment of the present invention;
Fig. 3 is the process signal provided in an embodiment of the present invention that one kind that test case is requested is sent to testing service device
Figure;
Fig. 4 is a kind of flow diagram that adjustment server use-case provided in an embodiment of the present invention executes allocation proportion;
Fig. 5 is also a kind of flow diagram provided in an embodiment of the present invention for updating test case library;
Fig. 6 is a kind of composition block diagram of test device provided in an embodiment of the present invention;
Fig. 7 is the interface schematic diagram provided in an embodiment of the present invention that test item list setting is carried out to target interface;
Fig. 8 is the interface schematic diagram of newly-built test item provided in an embodiment of the present invention;
Fig. 9 is also the interface schematic diagram of newly-built test item provided in an embodiment of the present invention;
Figure 10 is the schematic diagram of test device provided in an embodiment of the present invention;
Figure 11 is the schematic diagram that test case provided in an embodiment of the present invention executes distribution;
Figure 12 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art without making creative work it is obtained it is all its
His embodiment, shall fall within the protection scope of the present invention.
It should be noted that term " includes " and " tool in description and claims of this specification and above-mentioned attached drawing
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units
Process, method, system, product or server those of are not necessarily limited to be clearly listed step or unit, but may include not having
Other step or units being clearly listed or intrinsic for these process, methods, product or equipment.
Referring to Fig. 1, Fig. 1 is a kind of schematic diagram of application environment provided in an embodiment of the present invention, including test platform, survey
Server and service server are tried, test platform sends test case request to testing service device and service server respectively, and
Receive the corresponding response results that testing service device and service server return.Test platform server can return based on the received
Response results and the difference of corresponding test case expected results returned determine test case to be modified and adjust to two clothes
The ratio that the test case that device is sent of being engaged in is requested.It should be noted that Fig. 1 is only a kind of example.
Specifically, whether testing service device can be pre- to calling corresponding interface to can be realized in this specification embodiment
The server that certain business function of phase is tested.Testing service device can be an independently operated server, or distribution
Formula server, or the server cluster being made of multiple servers.Testing service device may include having network communication unit, place
Manage device and memory etc..
Specifically, service server can be the service of fingering row actual services function treatment in this specification embodiment
Device.Service server distributed server or can perhaps be made of for an independently operated server multiple servers
Server cluster.Service server may include having network communication unit, processor and memory etc..
In practical applications, such as business function A, when testing service device (by tune side, is handled as ISP
Request simultaneously returning response;It is opposite with service consumer) when, need the simulation of testing service device carry out the processing of business function A into
Journey.When service server is as ISP, in service server necessary being realize business function A processing into
Journey, while the treatment progress can carry out information exchange with the treatment progress of other actual services functions is realized.
A kind of specific embodiment of test method of the present invention introduced below, Fig. 2 are a kind of surveys provided in an embodiment of the present invention
The flow diagram of method for testing, present description provides the method operating procedures as described in embodiment or flow chart, but based on normal
Rule may include more or less operating procedure without creative labor.The step of enumerating in embodiment sequence is only
For one of numerous step execution sequence mode, does not represent and unique execute sequence.System or server in practice produces
When product execute, can be executed according to embodiment or the execution of method shown in the drawings sequence or parallel (such as parallel processor
Or the environment of multiple threads).It is specific as shown in Fig. 2, the method may include:
S201: allocation proportion is executed according to the server use-case of configuration, is extracted from test case library and obtains the first test
Set of uses case and the second test use cases, the test case quantity and second test use cases that first test case is concentrated
In the ratio of test case quantity meet the server use-case and execute allocation proportion, first test use cases are for surveying
Examination server executes test, and second test use cases execute test for service server;
In embodiments of the present invention, server use-case executes allocation proportion and is used to provide by the corresponding survey in test case library
Example on probation distributes to testing service device and service server executes the quantitative proportion of test.For service consumer (called side, hair
It requests out;May belong to corresponding test platform) issue test case request sequence (with regard to the target interface tune of ISP
With a business service), allocation proportion can be executed according to the server use-case sends the request of corresponding test case respectively
To testing service device and service server.For currently testing round, current server use-case, which executes allocation proportion, is
Difference feedback (the response results and be expected to tie that ISP's (especially service server) returns of round are tested according to history
The difference of fruit) and/or service server performance parameter (such as handling capacity) and configure.Server use-case executes allocation proportion
It is adjustable in testing.
Test case library can provide the test case that a certain business function is realized for the target interface of ISP
(Test Case, one group of test input, execution condition and the expected results worked out for some special objective, to test certain
Whether a Program path or verification meet some particular demands).Specifically, first test case concentrates each test case
Including the request of corresponding test case and test case expected results.Each test case is concentrated according to first test case
Corresponding test case request generates the first test case request sequence, and then sends first test to testing service device
Use-case request sequence.It includes corresponding test case request and test case that second test case, which concentrates each test case,
Expected results.The corresponding test case request of each test case is concentrated according to second test case, generates the second test
Use-case request sequence, and then the second test case request sequence is sent to service server.
In testing, for certain objects for being not easy to construct or be not easy to obtain, a virtual object can be used
It creates to test, Mock is also made to test.Correspondingly, Mock response is the analog response constructed by user.Mock service device
The server-side that (mock server) is simulated as one can return to Mock according to preset test order when there is request to arrive
Response.For example can realize that the treatment progress of a certain business function creates corresponding Mock service in testing service device, and
Corresponding pre-configuration data is prestored in testing service device.When being tested in this way, the Mock in testing service device can be passed through
Service, end equipment returns to pre-configuration data forward.
In practical applications, API (the Application Programming of ISP can be directed to
Interface, application programming interface) setting test item list (including corresponding server use-case executes allocation proportion).
When service consumer calls the API of ISP, some test item that can choose in test item list is returned.
As shown in Fig. 7,11, two test items of/echo interface are respectively " service response " (response knot that corresponding service server returns
Fruit) and " Mock response " (response results that corresponding testing service device returns), weight is respectively 30% and 70% (server use-case
Execution allocation proportion is 3:7).When the realization of a certain business function needs to call the interface, local routing SDK (Software
Development Kit, Software Development Kit) it can be according to weight come distribution request, wherein about 30% request is sent to
Service server, about 70% request are sent to mock server.The API may come from micro services.Corresponding micro services frame
Structure is a kind of style of system architecture, emphasizes loose coupling, services independent deployment, improves System Error-tolerance Property.
In a specific embodiment, as shown in figure 3, described execute allocation proportion according to the server use-case of configuration,
It is extracted from test case library and obtains the first test use cases and the second test use cases, include: later
S301: according to configuration information and first test use cases, corresponding target detection set of uses case is generated;
The configuration information includes at least one selected from the group that response time, response region, response identification form
It is a.For example the response time in configuration information can be directed toward the delay effect in test response results, the response in configuration information
Region can be directed toward test response results and carry out the effect of related display in the target area of target pages, the sound in configuration information
Should identify can be directed toward test response results carry corresponding identification marking (such as HTTP status code, JSON string;HTTP state
Code, be 3 digit numerical codes to indicate web page server hypertext transfer protocol responsive state) effect.According to confidence
Breath can concentrate the corresponding characteristic information of each test case modify to the first test case (such as can be to test case
Corresponding test input, execution condition and expected results are modified), and then obtain corresponding target detection set of uses case.
S302: it is requested according to the corresponding test case of test case each in the target detection set of uses case, generates first
Test case request sequence;
The corresponding test case request of each test case can be extracted from target detection set of uses case, it is described to obtain
First test case request sequence.
S303: Xiang Suoshu testing service device sends the first test case request sequence;
The first test case request sequence is sent to the testing service device, and then receives testing service device and returns
Test response results.Testing service device executes test target test use cases, helps to obtain with corresponding return effect
Test response results.The first test use cases holding in testing service device can be more effectively determined according to corresponding return effect
Market condition is also convenient for the service response knot returned with service server convenient for adjusting to the test case in test case library
Fruit is distinguished to improve the accuracy of subsequent statistical.
In practical applications, as shown in Figure 8,9, when creating test item, user can select at the correspondence interface of test platform
Selecting test item type is " Mock response ", and setting status code (such as HTTP status code) is 200, the JSON that setting Mock is returned
(a kind of (JavaScript Object Notation, JS object numbered musical notation, data interchange format of lightweight) string, is arranged Mock
Response time (realizes the effect in the intentional analogue delay in testing service end), and the weight of setting test item.Such as Figure 10
It is shown, such as the test item content configured on console is { " hello ": " world " }, delay time 3000ms, mock
Server can accordingly be returned according to configuration information.
S202: the difference of the test response results collection and corresponding expected results that are returned according to the testing service device, with
And the difference of service response result set and corresponding expected results that the service server returns, determine test case to be modified
And it generates server use-case and executes allocation proportion adjustment instruction.
In a specific embodiment, as shown in figure 4, the test returned according to the testing service device responds knot
The difference of service response result set and expected results that the difference and the service server of fruit collection and expected results return,
It determines test case to be modified and generates server use-case and execute allocation proportion adjustment instruction, comprising:
S401: the service response result set that the service server returns is received;
It can receive the service response result that the service server is returned according to the second test case request sequence
Collection.
S402: corresponding test case expected results are concentrated according to second test case, count the service response
The quantity for meeting the service response result of difference condition in result set, obtains value to be compared;
For example, the test case that the second test case is concentrated is { " hello ": " world " }, corresponding with service supplier
According to " hello " return " world " that service consumer issues, " world " is the test case expected results of the test case.
As no " world " that service server returns in testing, " ths is a message ", service response result with
Corresponding test case expected results meet difference condition.It can be right
The quantity for meeting the service response result of difference condition in service response result set is counted, obtain it is described to than
Compared with value.
S403: when the value to be compared is less than result difference threshold value, distribution ratio is executed to presently described server use-case
Example is adjusted.
For example, testing round in N, it includes 100 test cases that the second test case, which is concentrated, and result difference threshold value is 30
It (can also be directly correspondingly arranged in the form of probability, then by concentrating test case quantity to make product with the second test case
Obtain result difference threshold value), if value to be compared is 20, it may be said that bright service server executes the second current test of test and uses
The effect of example collection reaches expected, can increase in next test round and distribute to the test case number that service server executes test
Amount ratio (for example 6:4 is adjusted to by 3:7).Certainly, result difference threshold value can carry out in testing according to different test rounds
Adjustment.
Corresponding server use-case is configured in different test rounds and executes allocation proportion, has comprehensively considered the effect tested
Rate and the actual services function of service server are because testing the interference that may be subject to.It is connect particularly with the corresponding target of business function
The related setting of mouth is not perfect, and even without the situation of corresponding target interface, server use-case executes the tunable performance of allocation proportion
Trial and error cost is enough reduced, solves the problems, such as that limited Mock response test use-case simulation complex interface returns to the difficulty of logic.
In another specific embodiment, as shown in figure 5, the test returned according to the testing service device responds
The difference of service response result set and expected results that the difference and the service server of result set and expected results return
It is different, it determines test case to be modified and generates server use-case execution allocation proportion adjustment instruction, comprising:
S501: concentrating corresponding test case expected results according to first test case, determines the test response
Meet the test response results of the first difference condition in result set, to obtain corresponding first test case to be modified;
Receive the test response results collection that the testing service device is returned according to the first test case request sequence.Really
The fixed test response results concentrate each test response results and first test case to concentrate corresponding test case pre-
Whether the difference of phase result meets the first difference condition, to obtain corresponding first test case to be modified.Here to being
The no determination for meeting the first difference condition can be repeated no more with reference to the record in above-mentioned steps S402.
S502: corresponding test case expected results are concentrated according to second test case, determine the service response
Meet the service response of the second difference condition in result set as a result, to obtain corresponding second test case to be modified;
Receive the service response result set that the service server is returned according to the second test case request sequence.Really
Each service response result and second test case concentrate corresponding test case pre- in the fixed service response result set
Whether the difference of phase result meets the second difference condition, to obtain corresponding second test case to be modified.Here to being
The no determination for meeting the second difference condition can be repeated no more with reference to the record in above-mentioned steps S402.
S503: the described first corresponding parameter of test case to be modified and second test case to be modified is respectively modified
Corresponding parameter, and presently described test case library is updated according to modification result.
For example, being { " hello ": " world " } for test case, when what ISP returned in testing is not "
World ", but when " ths is a message ", difference feedback can be used for modifying the corresponding ginseng to be modified tested and be used for
The definition of several and correlation function.According to modification, check can determine to may be the difference as caused by following situation: service consumer needle
The length of value is verified, only processing is no more than the value of 10 character lengths.This kind of restricted information in code
It can be found everywhere, when this restricted information is not synchronized to tester, relevant test case may be omitted, cause to service
Occur exception after online, causes service robustness not strong.
Test case in test case library is distributed into testing service device and service server executes test, is on the one hand surveyed
Examination personnel can write Mock response test use-case for interface document, and the response results that one side service server returns can
To be used to supplement the test case that may do not covered.When the response that service server returns can not be handled by consumer, say
The bright exception scene may not covered by Mock response test use-case, and tester can write Mock response for this kind of response
The Mock response test use-case of test case, such corresponding A PI is enriched, after subsequent regression test and API upgrading
Test have very big help, and then enhance the robustness of service.
In another specific embodiment, the quantity of the received test case request of the testing service device can be counted
With the quantity of the received test case request of the service server, obtain receiving request ratio.When the reception request ratio
When the difference for executing allocation proportion with the server use-case is greater than proportional difference threshold value, it can be requested from the test case of transmission
Sum sets out, and (for example it is 3:7 that server use-case, which executes allocation proportion, and test case request sum determines said circumstances for 5)
Appearance reason;Test item in test platform creation whether problematic (such as weighted value, the corresponding industry of response can be checked
Business function);It can check and be sent to the test clothes either with or without by the corresponding characteristic information of first test use cases in advance
Business device.
In practical applications, service consumer calling each second/echo interface 100 times, statistics a period of time can be set
In range, the ratio of service response and Mock response.Through counting, the ratio of Mock response and service response illustrates this close to 7:3
The weight that ground routing is allocated the ratio reached according to weight and configures on console is consistent.The quantity statistics side of response results
Formula can realize that service consumer can request the IP address (Internet of monitoring service supplier according to traffic statistics
Protocol Address, Internet protocol address), it may determine that it is which kind of service by the IP address of monitoring service supplier
Device.The IP address of general Mock service device is fixed.
For the quantity statistics of response results, and the ratio of allocation proportion is executed to response results ratio and server use-case
Compared with, can assist in server use-case execute allocation proportion the situation that comes into force, and then guarantee test validity.
The technical solution provided by above this specification embodiment is as it can be seen that according to the service of configuration in this specification embodiment
Device use-case executes allocation proportion, determines the first test use cases executed for testing service device, and be used for service server
The second test use cases executed can reduce the interference that the actual services function of service server is subject to by test, guarantee to survey
The efficient progress of examination.Difference between the response results returned according to associated server and test case expected results, can be more quasi-
Really, test case to be modified is more effectively positioned.The response results that service server returns can help to find that some presence are neglected
Exception slightly or borderline cases, and then can modify to test case and perfect, improve the realization robust of business function
Property.Testing service device is stronger for the execution controllability of test case, uses convenient for modifying, checking test to be modified in testing
Example.
The embodiment of the invention also provides a kind of test devices, as shown in fig. 6, described device includes:
Test use cases extraction module 610: for executing allocation proportion according to the server use-case of configuration, from test case
It is extracted in library and obtains the first test use cases and the second test use cases, the test case quantity that first test case is concentrated
The ratio for the test case quantity concentrated with second test case meets the server use-case and executes allocation proportion, described
First test use cases execute test for testing service device, and second test use cases execute survey for service server
Examination.
Result difference respond module 620: test response results collection and correspondence for being returned according to the testing service device
Expected results difference and the service server return service response result set and corresponding expected results difference
It is different, it determines test case to be modified and generates server use-case execution allocation proportion adjustment instruction.Specifically, the result is poor
Different respond module 620 includes: service response result set receiving unit: the business returned for receiving the service server
Response results collection;Statistic unit: for concentrating corresponding test case expected results according to second test case, institute is counted
The quantity for meeting the service response result of difference condition in service response result set is stated, value to be compared is obtained;Adjustment unit: it is used for
When the value to be compared is less than result difference threshold value, allocation proportion is executed to presently described server use-case and is adjusted.
In a specific embodiment, the test use cases extraction module 610 includes: configuration unit: for being every
A target interface configures the corresponding server use-case and executes allocation proportion, and the test case library provides the corresponding target
At least one test case of interface;Characteristic information transmission unit: the corresponding feature of first test use cases is believed in advance
Breath is sent to the testing service device.Request sequence transmission unit: Xiang Suoshu testing service device sends first test case
Collect corresponding first test case request sequence, and corresponding to service server transmission second test use cases
Second test case request sequence.
In practical applications, as is seen in figs 7-10, the accessible console of user (portal) is to construct test item, user
When creating, editing on console, delete, inquire, check test item, api server (API unified management clothes can be called
Business, for external (such as console) exposure API), and the test item data of variation is finally sent to mock server and service
Registration center (such as consul).Service register center can be used for the storage service configuration information in the form of key-value, service
The weight information of the main storage service API of registration center, these information are eventually synchronized to micro services.Mock server is main
The mock of storage service API is responded.Mock server can safeguard a table, major key: Service name/API, other fields include: to survey
Try item type, Integer;Mock returns to JSON string, String;Delay time, Integer;Weight, Integer;Status code,
Integer.Certainly, service register center can not use consul, but (one mentions for Distributed Application with zookeeper
For the software of Consistency service, the function of providing include: configuring maintenance, domain name service, distributed synchronization, group service etc.) etc. its
His component.
As shown in figure 11, mock server can be a common component service.Service consumer (service
Consumer 70% request) is distributed to mock server, 30% request is distributed to service server.mock
After server receives request, " mock response " test item configured on console according to user is handled.
It should be noted that the apparatus and method embodiment in described device embodiment is based on same inventive concept.
The embodiment of the invention also provides a kind of test macro, the system comprises testing service device, service server with
And the test device as provided by above-mentioned Installation practice.
The embodiment of the invention provides a kind of electronic equipment, which includes processor and memory, the memory
In be stored at least one instruction, at least a Duan Chengxu, code set or instruction set, this at least one instruction, an at least Duan Cheng
Sequence, the code set or instruction set are loaded as the processor and are executed to realize the test side as provided by above method embodiment
Method.
Memory can be used for storing software program and module, and processor is stored in the software program of memory by operation
And module, thereby executing various function application and data processing.Memory can mainly include storing program area and storage number
According to area, wherein storing program area can application program needed for storage program area, function etc.;Storage data area can store basis
The equipment uses created data etc..In addition, memory may include high-speed random access memory, can also include
Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase
Ying Di, memory can also include Memory Controller, to provide access of the processor to memory.
The electronic equipment can be server, the embodiment of the invention also provides a kind of structural schematic diagram of server,
Figure 12 is please referred to, which is used for the test method for implementing to provide in above-described embodiment.The server 1200 can be because matching
It sets or performance is different and generate bigger difference, may include one or more central processing units (Central
Processing Units, CPU) 1210 (for example, one or more processors) and memory 1230, one or one with
The storage medium 1220 (such as one or more mass memory units) of upper storage application program 1223 or data 1222.Its
In, memory 1230 and storage medium 1220 can be of short duration storage or persistent storage.It is stored in the program of storage medium 1220
It may include one or more modules, each module may include to the series of instructions operation in server.More into one
Step ground, central processing unit 1210 can be set to communicate with storage medium 1220, execute storage medium on server 1200
Series of instructions operation in 1220.Server 1200 can also include one or more power supplys 1260, one or one
The above wired or wireless network interface 1250, one or more input/output interfaces 1240, and/or, one or one with
Upper operating system 1221, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The embodiments of the present invention also provide a kind of storage medium, the storage medium may be disposed among electronic equipment with
Save for realizing relevant at least one instruction of test method a kind of in embodiment of the method, an at least Duan Chengxu, code set or
Instruction set, at least one instruction, an at least Duan Chengxu, the code set or the instruction set are loaded by the processor and are executed with reality
The test method that existing above method embodiment provides.
Optionally, in the present embodiment, above-mentioned storage medium can be located in multiple network servers of computer network
At least one network server.Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, only
Read memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), movement
The various media that can store program code such as hard disk, magnetic or disk.
It should be understood that embodiments of the present invention sequencing is for illustration only, do not represent the advantages or disadvantages of the embodiments.
And above-mentioned this specification specific embodiment is described.Other embodiments are within the scope of the appended claims.One
In a little situations, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment and
Still desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or company
Continuous sequence is just able to achieve desired result.In some embodiments, multitasking and parallel processing it is also possible or
It may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and
For electronic equipment embodiment, since it is substantially similar to the method embodiment, so be described relatively simple, related place referring to
The part of embodiment of the method illustrates.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of test method, which is characterized in that the described method includes:
Allocation proportion is executed according to the server use-case of configuration, is extracted from test case library and obtains the first test use cases and the
Two test use cases, the test that the test case quantity and second test case that first test case is concentrated are concentrated are used
The ratio of number of cases amount meets the server use-case and executes allocation proportion, and first test use cases are held for testing service device
Row test, second test use cases execute test for service server;
The difference and the business of the test response results collection and corresponding expected results that are returned according to the testing service device
The difference of service response result set and corresponding expected results that server returns determines test case to be modified and generates clothes
Business device use-case executes allocation proportion adjustment instruction.
2. the method according to claim 1, wherein the test returned according to the testing service device responds
The difference of service response result set and expected results that the difference and the service server of result set and expected results return
It is different, it determines test case to be modified and generates server use-case execution allocation proportion adjustment instruction, comprising:
Receive the service response result set that the service server returns;
Corresponding test case expected results are concentrated according to second test case, count full in the service response result set
The quantity of the service response result of sufficient difference condition, obtains value to be compared;
When the value to be compared is less than result difference threshold value, allocation proportion is executed to presently described server use-case and is adjusted
It is whole.
3. the method according to claim 1, wherein the test returned according to the testing service device responds
The difference of service response result set and expected results that the difference and the service server of result set and expected results return
It is different, it determines test case to be modified and generates server use-case execution allocation proportion adjustment instruction, comprising:
Corresponding test case expected results are concentrated according to first test case, it is full to determine that the test response results are concentrated
The test response results of the first difference condition of foot, to obtain corresponding first test case to be modified;
Corresponding test case expected results are concentrated according to second test case, are determined full in the service response result set
The service response of the second difference condition of foot is as a result, to obtain corresponding second test case to be modified;
The corresponding parameter of the described first test case to be modified and the corresponding ginseng of second test case to be modified is respectively modified
Number, and presently described test case library is updated according to modification result.
4. the method according to claim 1, wherein described execute distribution ratio according to the server use-case of configuration
Example is extracted from test case library and obtains the first test use cases and the second test use cases, includes: later
According to configuration information and first test use cases, corresponding target detection set of uses case is generated;
According to the corresponding test case request of test case each in the target detection set of uses case, generates the first test case and ask
Seek sequence;
The first test case request sequence is sent to the testing service device;
Wherein, the configuration information includes at least one selected from the group that response time, response region, response identification form
It is a.
5. a kind of test device, which is characterized in that described device includes:
Test use cases extraction module: it for executing allocation proportion according to the server use-case of configuration, is mentioned from test case library
It obtains to the first test use cases and the second test use cases, test case quantity that first test case is concentrated and described
The ratio for the test case quantity that second test case is concentrated meets the server use-case and executes allocation proportion, and described first surveys
Examination set of uses case executes test for testing service device, and second test use cases execute test for service server;
Result difference respond module: test response results collection and corresponding expected knot for being returned according to the testing service device
The difference of service response result set and corresponding expected results that the difference of fruit and the service server return, determine to
It modifies test case and generates server use-case and execute allocation proportion adjustment instruction.
6. device according to claim 5, which is characterized in that the result difference respond module includes:
Service response result set receiving unit: the service response result set returned for receiving the service server;
Statistic unit: for concentrating corresponding test case expected results according to second test case, the business is counted
Response results concentrate the quantity for meeting the service response result of difference condition, obtain value to be compared;
Adjustment unit: for executing and dividing to presently described server use-case when the value to be compared is less than result difference threshold value
It is adjusted with ratio.
7. device according to claim 5, which is characterized in that the test use cases extraction module includes:
Configuration unit: for executing allocation proportion, the test for the corresponding server use-case of each target interface configuration
Use-case library provides at least one test case of the corresponding target interface;
Characteristic information transmission unit: the corresponding characteristic information of first test use cases is sent to the testing service in advance
Device.
Request sequence transmission unit: Xiang Suoshu testing service device sends corresponding first test case of first test use cases
Request sequence, and send corresponding second test case of second test use cases to the service server and request sequence
Column.
8. a kind of test macro, which is characterized in that the system comprises testing service device, service server and such as claim
Any test device of 5-7.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes processor and memory, is stored in the memory
Have at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu,
The code set or instruction set are loaded by the processor and are executed to realize the test side as described in claim 1-4 is any
Method.
10. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium
A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction
Collection is loaded by processor and is executed to realize the test method as described in claim 1-4 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910589684.6A CN110347596B (en) | 2019-07-02 | 2019-07-02 | Test method, device, system, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910589684.6A CN110347596B (en) | 2019-07-02 | 2019-07-02 | Test method, device, system, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110347596A true CN110347596A (en) | 2019-10-18 |
CN110347596B CN110347596B (en) | 2022-05-20 |
Family
ID=68177499
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910589684.6A Active CN110347596B (en) | 2019-07-02 | 2019-07-02 | Test method, device, system, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110347596B (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110765024A (en) * | 2019-10-29 | 2020-02-07 | 百度在线网络技术(北京)有限公司 | Simulation test method, simulation test device, electronic equipment and computer-readable storage medium |
CN111090589A (en) * | 2019-12-19 | 2020-05-01 | 广州品唯软件有限公司 | Software testing method, software testing device and readable storage medium |
CN111737109A (en) * | 2020-05-20 | 2020-10-02 | 山东鲸鲨信息技术有限公司 | Cluster file system testing method and device |
CN111770004A (en) * | 2020-06-26 | 2020-10-13 | 武汉众邦银行股份有限公司 | Fiddler-based HTTP (S) flow content automatic verification method and storage medium |
CN111858335A (en) * | 2020-07-20 | 2020-10-30 | 杭州溪塔科技有限公司 | Block chain SDK testing method and device |
CN112019558A (en) * | 2020-09-03 | 2020-12-01 | 深圳壹账通智能科技有限公司 | Universal baffle testing method, device, equipment and computer storage medium |
CN112291119A (en) * | 2020-12-28 | 2021-01-29 | 腾讯科技(深圳)有限公司 | Block chain network testing method, device, medium and electronic equipment |
CN112306785A (en) * | 2020-10-30 | 2021-02-02 | 南方电网科学研究院有限责任公司 | Method, device, system, equipment and medium for testing micro-service application interface |
CN112583721A (en) * | 2020-11-30 | 2021-03-30 | 五八到家有限公司 | Service request routing method, device and medium |
CN112882922A (en) * | 2019-11-29 | 2021-06-01 | 深圳云天励飞技术有限公司 | Test method and related device |
CN113157586A (en) * | 2021-04-30 | 2021-07-23 | 中国工商银行股份有限公司 | Financial market unit test case generation method and device |
CN113760699A (en) * | 2020-07-31 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Server performance test system and method |
CN113760722A (en) * | 2021-01-13 | 2021-12-07 | 北京京东振世信息技术有限公司 | Test system and test method |
CN113806213A (en) * | 2020-06-01 | 2021-12-17 | 达音网络科技(上海)有限公司 | High-expandability SDK automatic test system and method |
CN113946511A (en) * | 2021-10-15 | 2022-01-18 | 杭州研极微电子有限公司 | Full-function test case set acquisition method and system |
CN114124761A (en) * | 2020-08-31 | 2022-03-01 | 中国电信股份有限公司 | Electronic device, system, method, and medium for bandwidth consistency verification |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050257086A1 (en) * | 2004-04-21 | 2005-11-17 | Microsoft Corporation | Systems and methods for automated classification and analysis of large volumes of test result data |
CN106776307A (en) * | 2016-12-05 | 2017-05-31 | 广州唯品会信息科技有限公司 | Method for testing software and system |
CN106980571A (en) * | 2016-01-15 | 2017-07-25 | 阿里巴巴集团控股有限公司 | The construction method and equipment of a kind of test use cases |
-
2019
- 2019-07-02 CN CN201910589684.6A patent/CN110347596B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050257086A1 (en) * | 2004-04-21 | 2005-11-17 | Microsoft Corporation | Systems and methods for automated classification and analysis of large volumes of test result data |
CN106980571A (en) * | 2016-01-15 | 2017-07-25 | 阿里巴巴集团控股有限公司 | The construction method and equipment of a kind of test use cases |
CN106776307A (en) * | 2016-12-05 | 2017-05-31 | 广州唯品会信息科技有限公司 | Method for testing software and system |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110765024B (en) * | 2019-10-29 | 2023-08-29 | 百度在线网络技术(北京)有限公司 | Simulation test method, simulation test device, electronic equipment and computer readable storage medium |
CN110765024A (en) * | 2019-10-29 | 2020-02-07 | 百度在线网络技术(北京)有限公司 | Simulation test method, simulation test device, electronic equipment and computer-readable storage medium |
CN112882922B (en) * | 2019-11-29 | 2023-11-17 | 深圳云天励飞技术有限公司 | Test method and related device |
CN112882922A (en) * | 2019-11-29 | 2021-06-01 | 深圳云天励飞技术有限公司 | Test method and related device |
CN111090589A (en) * | 2019-12-19 | 2020-05-01 | 广州品唯软件有限公司 | Software testing method, software testing device and readable storage medium |
CN111737109A (en) * | 2020-05-20 | 2020-10-02 | 山东鲸鲨信息技术有限公司 | Cluster file system testing method and device |
CN113806213B (en) * | 2020-06-01 | 2023-07-14 | 达音网络科技(上海)有限公司 | High-expandability SDK automatic test system and method |
CN113806213A (en) * | 2020-06-01 | 2021-12-17 | 达音网络科技(上海)有限公司 | High-expandability SDK automatic test system and method |
CN111770004A (en) * | 2020-06-26 | 2020-10-13 | 武汉众邦银行股份有限公司 | Fiddler-based HTTP (S) flow content automatic verification method and storage medium |
CN111770004B (en) * | 2020-06-26 | 2021-09-07 | 武汉众邦银行股份有限公司 | HTTP (hyper text transport protocol) (S) flow content automatic verification method and storage medium |
CN111858335A (en) * | 2020-07-20 | 2020-10-30 | 杭州溪塔科技有限公司 | Block chain SDK testing method and device |
CN113760699A (en) * | 2020-07-31 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Server performance test system and method |
CN114124761B (en) * | 2020-08-31 | 2024-04-09 | 中国电信股份有限公司 | Electronic device, system, method and medium for bandwidth consistency verification |
CN114124761A (en) * | 2020-08-31 | 2022-03-01 | 中国电信股份有限公司 | Electronic device, system, method, and medium for bandwidth consistency verification |
CN112019558A (en) * | 2020-09-03 | 2020-12-01 | 深圳壹账通智能科技有限公司 | Universal baffle testing method, device, equipment and computer storage medium |
CN112306785A (en) * | 2020-10-30 | 2021-02-02 | 南方电网科学研究院有限责任公司 | Method, device, system, equipment and medium for testing micro-service application interface |
CN112583721A (en) * | 2020-11-30 | 2021-03-30 | 五八到家有限公司 | Service request routing method, device and medium |
CN112583721B (en) * | 2020-11-30 | 2023-04-18 | 五八到家有限公司 | Service request routing method, device and medium |
CN112291119A (en) * | 2020-12-28 | 2021-01-29 | 腾讯科技(深圳)有限公司 | Block chain network testing method, device, medium and electronic equipment |
CN113760722A (en) * | 2021-01-13 | 2021-12-07 | 北京京东振世信息技术有限公司 | Test system and test method |
CN113157586A (en) * | 2021-04-30 | 2021-07-23 | 中国工商银行股份有限公司 | Financial market unit test case generation method and device |
CN113157586B (en) * | 2021-04-30 | 2024-04-05 | 中国工商银行股份有限公司 | Financial market unit test case generation method and device |
CN113946511A (en) * | 2021-10-15 | 2022-01-18 | 杭州研极微电子有限公司 | Full-function test case set acquisition method and system |
Also Published As
Publication number | Publication date |
---|---|
CN110347596B (en) | 2022-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347596A (en) | A kind of test method, device, system, electronic equipment and medium | |
McChesney et al. | Defog: fog computing benchmarks | |
Ucar et al. | Simmer: discrete-event simulation for R | |
Harchol-Balter | Performance modeling and design of computer systems: queueing theory in action | |
US8356278B2 (en) | Method, system and program product for detecting deviation from software development best practice resource in a code sharing system | |
CN109902708A (en) | A kind of recommended models training method and relevant apparatus | |
CN104077212B (en) | pressure testing system and method | |
US20120060167A1 (en) | Method and system of simulating a data center | |
Zarrad et al. | Evaluating network test scenarios for network simulators systems | |
CN107735771A (en) | Distributed expandable workload is tested | |
Silva et al. | Mobile cloud performance evaluation using stochastic models | |
US9971669B2 (en) | Predicting performance of a software application over a target system | |
Zheng et al. | Probabilistic QoS aggregations for service composition | |
CN109815119A (en) | A kind of test method and device of APP link channel | |
Miao et al. | Understanding task-driven information flow in collaborative networks | |
Rak | Response time analysis of distributed web systems using QPNs | |
Rak | Performance modeling using queueing petri nets | |
CN106549827A (en) | The detection method and device of network state | |
Kitajima et al. | Inferring calling relationship based on external observation for microservice architecture | |
Sfaxi et al. | Babel: a generic benchmarking platform for Big Data architectures | |
CN103152212A (en) | Alarm correlation analysis method, alarm correlation analysis device and network management system | |
Bilel et al. | Cunetsim: A gpu based simulation testbed for large scale mobile networks | |
CN110457202A (en) | Quickly establish the TPC-E test method and actuator device of ODBC connection | |
US11775264B2 (en) | Efficient deployment of machine learning and deep learning model's pipeline for serving service level agreement | |
Ferme et al. | Performance comparison between BPMN 2.0 workflow management systems versions |
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 | ||
GR01 | Patent grant |