CN106897206B - Service testing method and device - Google Patents

Service testing method and device Download PDF

Info

Publication number
CN106897206B
CN106897206B CN201510958705.9A CN201510958705A CN106897206B CN 106897206 B CN106897206 B CN 106897206B CN 201510958705 A CN201510958705 A CN 201510958705A CN 106897206 B CN106897206 B CN 106897206B
Authority
CN
China
Prior art keywords
service
test
interaction
template
task
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.)
Active
Application number
CN201510958705.9A
Other languages
Chinese (zh)
Other versions
CN106897206A (en
Inventor
纪大松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510958705.9A priority Critical patent/CN106897206B/en
Publication of CN106897206A publication Critical patent/CN106897206A/en
Application granted granted Critical
Publication of CN106897206B publication Critical patent/CN106897206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

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 application discloses a service testing method and a device, wherein the method comprises the following steps: acquiring a test template generated according to a service log generated by real service interaction, wherein the test template reflects service information and interaction process information corresponding to the real service interaction; generating a service test task according to the test template and preset test data; and executing the service test task to obtain a service test result. By the method and the device, the service test task is generated based on the real service interaction, so that the obtained test result can reflect the service function or performance of the service server during the real service interaction by executing the service test task, and the practicability is better.

Description

Service testing method and device
Technical Field
The present application relates to the field of testing technologies, and in particular, to a method and an apparatus for testing a service.
Background
With the rapid development of the internet and computer technologies, more and more business interactions are taking place over the internet. The general business interaction process is: the user sends a service request to the service server, the service server responds to the service request, corresponding service processing is carried out, and then a service processing result is returned to the user.
In order to improve the service quality in the service interaction process, a service provider often performs a service test on a service server, and improves the service function or performance of the service server according to the test result. For example, common tests may include stress tests, load tests, functional tests, and the like. In the prior art, when performing a service test specifically, each scene is generally simulated, and the service test is performed under each simulated scene (that is, a single-scene service test is performed) to obtain a test result.
However, in practical applications, different services have different scenes, and each service itself may have more than one scene, so that a real service interaction is usually not performed only in a single scene, but may be performed in a composite scene composed of multiple scenes, and therefore, through the service testing method in the prior art, the obtained testing result is difficult to reflect the service function or performance of the service server during the real service interaction, and the practicability is poor.
Disclosure of Invention
The embodiment of the application provides a service testing method and a service testing device, which are used for solving the problems that the obtained testing result is difficult to reflect the service function or performance of a service server when real service interaction is performed through the service testing method in the prior art, and the practicability is poor.
The service testing method provided by the embodiment of the application comprises the following steps:
acquiring a test template generated according to a service log generated by real service interaction, wherein the test template reflects service information and interaction process information corresponding to the real service interaction;
generating a service test task according to the test template and preset test data;
and executing the service test task to obtain a service test result.
An embodiment of the present application provides a service testing apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test template generated according to a service log generated by real service interaction, and the test template reflects service information and interaction process information corresponding to the real service interaction;
the generating module is used for generating a service testing task according to the testing template and preset testing data;
and the test module is used for executing the service test task and obtaining a service test result.
According to the embodiment of the application, through at least one technical scheme, the service test task is generated based on the real service interaction, so that the service test task is executed, the obtained test result can reflect the service function or performance of the service server during the real service interaction, and the practicability is good.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a process of a service testing method provided in an embodiment of the present application;
FIG. 2 is a block diagram of a system that may be used to implement aspects of the present application in practice, as provided by an embodiment of the present application;
FIG. 3 is a flow chart of an embodiment of the present application, which is implemented by the system in FIG. 2;
fig. 4 is a schematic structural diagram of a service testing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this embodiment of the present application, the real service interaction may refer to: a real user or a plurality of real users interact with the service server in a period of time.
In the related art, when a service test is performed, simulation of a single scene is simple, and when a composite scene needs to be simulated, statistical analysis needs to be performed on historical service data to obtain each service and the proportion of each scene of each service, which is difficult to perform, and even if the proportion is determined, each service request for the service test is difficult to generate and send according to the process of real service interaction, so that the problems mentioned in the background art can be caused.
In order to solve the above problems, in the embodiment of the present application, various complex statistical analyses may be bypassed, and the real service interaction process may be restored directly according to the service log of the real service interaction, so that both a single scene and a composite scene may be simulated truly, and further, a service test may be performed to obtain a test result with better practicability. It should be noted that the scheme of the application is applicable to performance tests such as pressure tests and load tests, and is also applicable to functional tests. The following specifically describes the embodiments of the present application.
Fig. 1 is a process of a service testing method provided in an embodiment of the present application, where an execution subject of the process may be a general terminal or server, or may be a terminal or server dedicated to testing. The terminal includes but is not limited to: personal computers, cell phones, tablet computers, smart watches, vehicle-mounted mobile stations, and the like; the server includes but is not limited to: personal computers, mid-and large-sized computers, computer clusters, and the like. The execution body does not constitute a limitation of the present application.
The process in fig. 1 may specifically include the following steps:
s101: and acquiring a test template generated according to a service log generated by real service interaction, wherein the test template reflects service information and interaction process information corresponding to the real service interaction.
The real service interaction may be performed in any time period, and may be participated by any number of users, which is not limited in this embodiment of the present application. In practical application, a time period matched with the test requirement can be determined according to the test requirement, and then a test template generated according to a service log generated by real service interaction in the matched time period is obtained for subsequent steps.
For example, assume that a service is to be stressed according to test requirements. Historical traffic data statistics show that 8 to 9 pm is the peak period of the traffic, during which the number of users interacting with the traffic server for the traffic is the largest. It can be considered that, in practical applications, the time period when the pressure of the traffic server is the maximum is the peak time period, and therefore, the peak time period can be determined as the time period matching the test requirement.
In the embodiment of the present application, the method for generating the service log according to the real service interaction is not limited. Generally, a service server records corresponding service logs aiming at service interaction processes with users, and the service logs can be directly used for implementing the scheme of the application, so that the implementation cost of the scheme of the application can be reduced; of course, the format of the service log may also be specially predefined for the scheme of the present application, so that the service log at least includes the information field required by the scheme of the present application, which may improve the efficiency of subsequently parsing the service log.
In the embodiment of the present application, information related to the service interaction process, such as a service type, a service parameter, a service interaction time, and the like, may be recorded in the service log, where the service parameter includes, but is not limited to, a server identifier, a service request number, a user identifier, a parameter for recording a service resource, and the like.
Further, according to the service log, the real service interaction process can be restored. The restored real service interaction process can be represented in a format by using the test template generated in step S101. The restored real service interaction process mainly comprises the following two parts of information:
and the first part is that the real service interacts with the corresponding service information. The service information may reflect information of a service itself related to the real service interaction, and may be a service type, a service parameter, a dynamic service parameter generated after the service parameter is converted, and the like.
And the second part is interactive process information corresponding to real service interaction. The real service interaction may involve at least one message of the service request and/or a corresponding response message, and the interaction procedure information may reflect a logical order and a transceiving time order between the messages involved in the real service interaction.
S102: and generating a service test task according to the test template and the preset test data.
In an embodiment of the present application, the predetermined test data may include template assignment data and/or test requirement data.
The template assigned data can be used for filling a test template, and the test template can be used as an executable task after filling; further, the test requirement data may be used to indicate a particular manner of execution of the executable task, such as when execution begins, by several task executors, a number of concurrent executions of the executable task, and so forth.
S103: and executing the service test task to obtain a service test result.
In the embodiment of the present application, the executing of the service test task may specifically be: and simulating one or more users according to the service test task, and sending a specified service request to the service server at a specified time. The number of users and the number of service requests are determined by service testing tasks, and the service requests may be independent from each other or have a dependency relationship.
The service test task can be executed in a single thread or in multiple threads. Furthermore, when the multi-thread execution is performed, the single-machine multi-thread execution can be performed, the multi-machine multi-thread execution can also be performed, and the service test tasks can be distributed to the threads to be executed according to a preset distribution mode.
In this embodiment of the application, the service test result may be a service processing result returned by the service server in the process of executing the service test task, or may be an analysis result obtained after analyzing the service processing result.
By the method, the service test task is generated based on the real service interaction, so that the obtained test result can reflect the service function or performance of the service server during the real service interaction by executing the service test task, and the practicability is better.
The steps in fig. 1 are further described for ease of understanding.
In the embodiment of the present application, the test template may be generated in advance, or may be generated in real time when step S101 is executed. The device for generating the test template may be an execution subject of the steps in fig. 1, or may be other devices, such as a service server or a user terminal.
For step S101, a test template may be generated according to a service log generated by real service interaction, as follows: acquiring a service log generated according to real service interaction, wherein the service log comprises one or more log records; and generating a test template by analyzing each log record and converting parameters, wherein the test template reflects service information and interaction process information corresponding to the real service interaction.
In this embodiment of the present application, each log record may correspond to a service request sent by a certain user, and the log record may record related information of the service request, where the related information may include: service type, service parameter and service interaction time; the service interaction time may refer to a time for sending a service request, or may refer to a time for writing the log record after the service server receives the service request.
Some of the traffic parameters may be transformed during the generation of the test template. These parameters may be parameters having an association relationship with the real user, such as user identification, or parameters for identifying the real service request, such as service request number, current time, service interaction time, and so on. The reasons why the conversion is required are: if these parameters are used directly in the test template without conversion, the data of the real user may be disturbed.
According to the above analysis, generating a test template by analyzing each log record and performing parameter conversion may specifically include: analyzing each log record to obtain each log record comprising a service type, a service parameter and service interaction time; converting the appointed parameters in the obtained business parameters into dynamic business parameters, and taking the obtained business types, the parameters which are not converted in the business parameters and the converted dynamic business parameters as business information corresponding to the real business interaction; converting the obtained service interaction time into relative time, and taking the relative time and the corresponding relation between the relative time and the service information as interaction process information corresponding to the real service interaction; and generating a test template according to the service information and the interaction process information corresponding to the real service interaction.
Each dynamic service parameter can be assigned in real time (that is, a real user is replaced by a virtual user) when a service test task is generated, and in such a way, the virtual user can be used for simulating and replacing the real user according to the interaction between the real user and the service server to interact with the service server. The above parameter conversion will be described below by way of example.
For example, assuming that the service parameter includes a user identifier named "user a", the user identifier may be converted into a dynamic service parameter "$ user _ no", and it should be noted that "$ user _ no" is only one example of the name of the dynamic service parameter. In practical application, the name of the dynamic service parameter is not the same as the user identifier of any real user.
Similarly, the service request number contained in the service parameter may be converted into a dynamic service parameter "$ unique _ no", the current time may be converted into a dynamic service parameter "$ current _ time", and so on. Of course, "$ unique _ no", "$ current _ time" are also name examples of dynamic traffic parameters.
Besides the service parameters, the service interaction time can be converted into relative time, so that the service request generated by simulating each relative time can be executed according to the time sequence of each relative time. By way of example and illustration.
For example, assume that the first log record contains a business interaction time of 10:00:00.000 (the year, month, and day portion of the time is omitted here and not shown). It can be converted into a relative time of 0 millisecond (ms), and further, the service interaction time included in other log records can be converted into a relative time (i.e. a time length different from the relative time of the first log record) by taking the relative time of the first log record as a reference. Assuming that another log record contains a transaction interaction time of 10:00:02.000, this can translate to a relative time of 2000 ms.
According to the above method, according to each log record, a set of specific data corresponding to the log record may be generated, and the set of specific data may include: the log records the service type and service parameters, the dynamic service parameters obtained by conversion and the relative time obtained by conversion. The test template can be generated by correspondingly organizing each group of specific data generated according to each log record according to the sequence of each log record.
In this embodiment of the present application, for step S102, the predetermined test data may include template assignment data and test requirement data; generating a service test task according to the test template and the predetermined test parameters, which may specifically include: assigning values to the dynamic service parameters in the test template according to the template assignment parameters; and generating a service test task according to the test demand data and the assigned test template. The template assigned data and the test requirement data will be described below.
After the test template is obtained, a real service interaction process can be simulated by carrying out data assignment filling on the test template, and the part of data used for filling the test template can be template assignment data.
For example, for a dynamic service parameter "$ user _ no", a virtual user identifier may be generated as template assignment data, and the "$ user _ no" may be assigned. Specifically, "$ user _ no" in the test template may be replaced with a virtual user id. Of course, there may be a plurality of virtual user identifiers, and for each user identifier of a real user, a virtual user identifier may be generated for replacement.
In the embodiments of the present application, the mode of generating template assigned value data is not limited. In practical applications, the template assignment data may be generated by using a random number generator or a random character string generator, or may be generated according to other rules.
The test requirement data may then be used to specify the relevant requirements at the time of the subsequent test. In general, the relevant requirements may be: the time for starting the service test, the test type (which may be a pressure test, a load test, etc.) to which the service test to be performed belongs, the adjustment of the test template or the filled test template according to the test type to which the service test belongs (if the test type belongs to the pressure test or the load test, during the service test, the traffic corresponding to the simulated service interaction process may be amplified by several times, for example, the traffic may be copied to generate a plurality of copies, so that the service server may be requested to process in parallel), the requirements for the test environment (for example, the test script language type, the operating system of the test equipment, etc.), and so on.
In this embodiment of the application, for step S102, executing the service test task to obtain a service test result may specifically include: aiming at the relative time contained in the service test task, generating a corresponding service request according to the service type, the service parameter and the assigned dynamic service parameter corresponding to the relative time; sending the generated service request to a service server according to the test requirement data and the relative time contained in the service test task, and obtaining a service processing result returned by the service server in response to the service request; and determining a service test result according to the service processing result.
For service logs generated from real service interactions, each log record may correspond to a service request sent by a real user. Correspondingly, the service test task generated based on the service log also includes data of each service request for generating service test by simulating each service request sent by a real user, that is, the assigned specific data of each group. Further, the service requests for the service test corresponding to the relative times can be sent to the service server according to the sequence of the relative times included in the service test task. Therefore, the process of executing the service test task is the reduction and simulation of the real service interaction process, and therefore, the obtained service test result can be considered to reflect the function and performance of the service server in the real service interaction.
In the embodiment of the application, the real service interaction may involve a plurality of real users, and the service testing task may also involve a plurality of virtual users. The interaction between each real user and the service server is independent, so that each real user can send a service request to the service server in parallel.
Therefore, when the business test task is executed, the business test task can be split or copied and distributed to one or more task executors to be executed together. Each task executor can execute the service test task in a single thread or in multiple threads, and each thread can be respectively responsible for generating and sending a service request for one virtual user.
According to the above description, for step S103, executing the service test task may specifically include: and distributing the service test task to one or more task executors according to a preset distribution mode, so that the task executors execute the service test task according to the relative time contained in the service test task. The sub-formula is not limited in the embodiment of the application, and the sub-formula can be distributed according to the corresponding relationship between the virtual users and the counties and cities, and can also be distributed evenly, and the like.
In practical applications, in order to improve the testing efficiency, the part of the task of distributing the service test task may be performed by a special scheduling module or scheduling device.
In the embodiment of the application, the task executors can keep time synchronization with each other when executing the tasks, so that the service requests can be sent to the service server according to the sending sequence under the real service interaction.
Specifically, the task executor may calculate a difference between the current time and the time for starting the service test, which is specified by the test requirement data, for the task assigned to the task executor, and may start to execute the task when the difference is not less than the relative time corresponding to the task. The task assigned to the task executor may be a part of the service test task in step S102, or may be a copy of the service test task, and the latter case is generally applicable to a stress test or a load test, and in the latter case, when performing a service test, the stress applied to the service server may be greater than the stress applied to the service server in the real service interaction.
Further, in practical applications, there may be cases where: the generation of one service request needs to be dependent on the response result of another service request. For this case, the solution of the present application is equally applicable.
Specifically, the template assigned data may be generated according to a response result of the another service request, a new service test task may be generated and executed, and a service request depending on a response result of the another service request may be generated and sent to the service server in a process of executing the new service test task. It can be seen that in this case, in the process of executing step S103, step S102 may also be executed again.
Based on the above description of the steps in fig. 1, the embodiment of the present application further provides a structure diagram of a system that can be used to implement the solution of the present application in practical applications, as shown in fig. 2.
The system in fig. 2 mainly comprises: the device comprises a service generating device, a test template generating device and a service test task executing device. The arrow direction indicates the flow direction of the scheme of the present application, and the cylinder indicates the data generated in the flow. The implementation flow of the scheme of the present application by using the system is shown in fig. 3, and may specifically include the following steps:
s301: the service log generating device generates a service log according to real service interaction between the service server (or a corresponding application client, omitted below) and a real user.
It should be noted that, in practical applications, the service log may also be directly generated by the service server, and in this case, the service log generating device may be only used to obtain the service log.
S302: the test template generating device acquires the service log from the service log generating device (specifically executed by the service log acquiring module), and generates a test template by analyzing the service log (specifically executed by the service log analyzing module) and performing conversion (specifically executed by the service log converting module);
s303: the test execution device acquires the test template from the test template generation device, acquires template assigned data and test requirement data, generates a service test task according to the template assigned data and the test requirement data, and dispatches and distributes the generated service test task to the task executor to execute through the scheduling module;
s304: the task executors (N is total, N is not less than 1) execute the tasks, generate and send corresponding service requests to the service server, and obtain service processing results returned by the service server;
s305: and the test execution device determines a test result according to the service processing result.
It should be noted that fig. 2 is only an example of a structure diagram of a system that can be used to implement the solution of the present application, and the structure of the system that can be used to implement the solution of the present application is not limited in the embodiment of the present application.
Based on the same idea, the service testing method provided in the embodiment of the present application further provides a corresponding service testing apparatus, as shown in fig. 4.
Fig. 4 is a schematic structural diagram of a service testing apparatus provided in an embodiment of the present application, which specifically includes:
an obtaining module 401, configured to obtain a test template generated according to a service log generated by real service interaction, where the test template reflects service information and interaction process information corresponding to the real service interaction;
a generating module 402, configured to generate a service test task according to the test template and predetermined test data;
the testing module 403 is configured to execute the service testing task and obtain a service testing result.
By the device, the service test task is generated based on the real service interaction, so that the obtained test result can reflect the service function or performance of the service server during the real service interaction by executing the service test task, and the practicability is better.
The device further comprises:
a template module 404, configured to generate a test template according to a service log generated by real service interaction;
the template module 404 is specifically configured to: acquiring a service log generated according to real service interaction, wherein the service log comprises one or more log records; and generating a test template by analyzing each log record and converting parameters, wherein the test template reflects service information and interaction process information corresponding to the real service interaction.
The template module 404 is specifically configured to: analyzing each log record to obtain each log record comprising a service type, a service parameter and service interaction time; converting the appointed parameters in the obtained business parameters into dynamic business parameters, and taking the obtained business types, the parameters which are not converted in the business parameters and the converted dynamic business parameters as business information corresponding to the real business interaction; converting the obtained service interaction time into relative time, and taking the relative time and the corresponding relation between the relative time and the service information as interaction process information corresponding to the real service interaction; and generating a test template according to the service information and the interaction process information corresponding to the real service interaction.
The preset test data comprises template assigned data and test requirement data;
the generating module 402 is specifically configured to: assigning values to the dynamic service parameters in the test template according to the template assignment parameters; and generating a service test task according to the test demand data and the assigned test template.
The test module 403 is specifically configured to: aiming at the relative time contained in the service test task, generating a corresponding service request according to the service type, the service parameter and the assigned dynamic service parameter corresponding to the relative time; sending the generated service request to a service server according to the test requirement data and the relative time contained in the service test task, and obtaining a service processing result returned by the service server in response to the service request; and determining a service test result according to the service processing result.
The test module 403 is specifically configured to: and distributing the service test task to one or more task executors according to a preset distribution mode, so that the task executors execute the service test task according to the relative time contained in the service test task.
The specific device shown in fig. 4 may be located on a terminal or a server.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A method for testing a service, comprising:
acquiring a test template generated according to a service log generated by real service interaction, wherein the service log comprises log records, the log records comprise service types, service parameters and service interaction time, and the test template reflects service information and interaction process information corresponding to the real service interaction; wherein, the service type, the dynamic service parameter obtained by converting the specified parameter in the service parameter and the parameter which is not converted into the dynamic service parameter in the service parameter are used as the service information; taking the relative time obtained by converting the service interaction time and the corresponding relation between the relative time and the service information as the interaction process information;
generating a service test task according to the test template and preset test data;
and executing the service test task to obtain a service test result.
2. The method of claim 1, wherein generating a test template according to a service log generated by real service interaction specifically comprises:
acquiring a service log generated according to real service interaction, wherein the service log comprises one or more log records;
and generating a test template by analyzing each log record and converting parameters, wherein the test template reflects service information and interaction process information corresponding to the real service interaction.
3. The method of claim 1,
analyzing each log record to obtain the service type, the service parameter and the service interaction time contained in each log record;
and generating a test template according to the service information and the interaction process information corresponding to the real service interaction.
4. The method of claim 3, wherein the predetermined test data includes template assignment data and test requirement data;
generating a service test task according to the test template and the preset test parameters, which specifically comprises the following steps:
assigning values for dynamic service parameters in the test template according to the template assignment value data;
and generating a service test task according to the test demand data and the assigned test template.
5. The method of claim 4, wherein executing the service test task to obtain a service test result specifically comprises:
aiming at the relative time contained in the service test task, generating a corresponding service request according to the service type, the service parameter and the assigned dynamic service parameter corresponding to the relative time;
sending the generated service request to a service server according to the test requirement data and the relative time contained in the service test task, and obtaining a service processing result returned by the service server in response to the service request;
and determining a service test result according to the service processing result.
6. The method of claim 4, wherein executing the service test task specifically comprises:
and distributing the service test task to one or more task executors according to a preset distribution mode, so that the task executors execute the service test task according to the relative time contained in the service test task.
7. A service testing apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test template generated according to a service log generated by real service interaction, the service log comprises log records, the log records comprise service types, service parameters and service interaction time, and the test template reflects service information and interaction process information corresponding to the real service interaction; wherein, the service type, the dynamic service parameter obtained by converting the specified parameter in the service parameter and the parameter which is not converted into the dynamic service parameter in the service parameter are used as the service information; taking the relative time obtained by converting the service interaction time and the corresponding relation between the relative time and the service information as the interaction process information;
the generating module is used for generating a service testing task according to the testing template and preset testing data;
and the test module is used for executing the service test task and obtaining a service test result.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the template module is used for generating a test template according to a service log generated by real service interaction;
the template module is specifically configured to: acquiring a service log generated according to real service interaction, wherein the service log comprises one or more log records; and generating a test template by analyzing each log record and converting parameters, wherein the test template reflects service information and interaction process information corresponding to the real service interaction.
9. The apparatus of claim 8, wherein the template module is specifically configured to: analyzing each log record to obtain the service type, the service parameter and the service interaction time contained in each log record; and generating a test template according to the service information and the interaction process information corresponding to the real service interaction.
10. The apparatus of claim 9, wherein the predetermined test data comprises template assignment data and test requirement data;
the generation module is specifically configured to: assigning values for dynamic service parameters in the test template according to the template assignment value data; and generating a service test task according to the test demand data and the assigned test template.
11. The apparatus of claim 10, wherein the test module is specifically configured to: aiming at the relative time contained in the service test task, generating a corresponding service request according to the service type, the service parameter and the assigned dynamic service parameter corresponding to the relative time; sending the generated service request to a service server according to the test requirement data and the relative time contained in the service test task, and obtaining a service processing result returned by the service server in response to the service request; and determining a service test result according to the service processing result.
12. The apparatus of claim 10, wherein the test module is specifically configured to: and distributing the service test task to one or more task executors according to a preset distribution mode, so that the task executors execute the service test task according to the relative time contained in the service test task.
CN201510958705.9A 2015-12-18 2015-12-18 Service testing method and device Active CN106897206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510958705.9A CN106897206B (en) 2015-12-18 2015-12-18 Service testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510958705.9A CN106897206B (en) 2015-12-18 2015-12-18 Service testing method and device

Publications (2)

Publication Number Publication Date
CN106897206A CN106897206A (en) 2017-06-27
CN106897206B true CN106897206B (en) 2020-06-02

Family

ID=59190088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510958705.9A Active CN106897206B (en) 2015-12-18 2015-12-18 Service testing method and device

Country Status (1)

Country Link
CN (1) CN106897206B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309596B (en) * 2017-07-28 2022-10-04 阿里巴巴集团控股有限公司 Pressure testing method and device and server
CN110019498B (en) * 2017-08-14 2022-04-12 北京京东尚科信息技术有限公司 Log synchronization method and device, storage medium and electronic equipment
CN109560996B (en) * 2019-01-14 2023-11-17 上海挚极信息科技有限公司 Automatic testing system and method for terminal of Internet of things
CN109889374B (en) * 2019-01-22 2022-04-26 中国联合网络通信集团有限公司 Bearing evaluation method and device
CN110034972B (en) * 2019-03-22 2021-07-06 深圳市腾讯信息技术有限公司 Server pressure testing method and device
CN110110066B (en) * 2019-05-09 2023-01-06 腾讯科技(深圳)有限公司 Interactive data processing method and device and computer readable storage medium
CN111984519B (en) * 2019-05-23 2024-05-10 阿里巴巴集团控股有限公司 Test method and device for service system
CN110618922B (en) * 2019-08-15 2022-10-04 平安普惠企业管理有限公司 Performance test method and related equipment
CN112988552B (en) * 2019-12-12 2023-06-30 腾讯科技(深圳)有限公司 Application program testing method, device, equipment and storage medium
CN110968468A (en) * 2019-12-18 2020-04-07 广州唯品会信息科技有限公司 Pressure testing method, terminal device and computer storage medium
CN111221739B (en) * 2020-01-10 2024-09-03 中国建设银行股份有限公司 Service testing method, device and system
CN111352821A (en) * 2020-03-10 2020-06-30 深圳市宝能投资集团有限公司 Service testing method, device, electronic equipment and computer readable storage medium
CN114371866A (en) * 2020-10-14 2022-04-19 腾讯科技(深圳)有限公司 Version reconfiguration test method, device and equipment of service system
CN112148621A (en) * 2020-10-14 2020-12-29 中国农业银行股份有限公司 Test method and device and electronic equipment
CN112835792B (en) * 2021-01-27 2023-03-03 湖南快乐阳光互动娱乐传媒有限公司 Pressure testing system and method
CN112882900B (en) * 2021-02-26 2022-11-29 浪潮通用软件有限公司 Method and device for recording service data change log
CN112788640B (en) * 2021-03-04 2022-08-05 惠州Tcl移动通信有限公司 Communication equipment testing method and device, storage medium and terminal
CN113872831B (en) * 2021-09-28 2022-09-16 北京永信至诚科技股份有限公司 Network test visualization system and method
CN116107913B (en) * 2023-04-06 2023-11-14 阿里云计算有限公司 Test control method, device and system of single-node server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221502A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Case design method and device for software test
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6741967B1 (en) * 1998-11-02 2004-05-25 Vividence Corporation Full service research bureau and test center method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221502A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Case design method and device for software test
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system

Also Published As

Publication number Publication date
CN106897206A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN106897206B (en) Service testing method and device
CN106897205B (en) Test data generation method and device
CN112395196B (en) Data job development test method, device, equipment, system and storage medium
KR102553440B1 (en) Serverless development support platform
CN112346717A (en) Micro service system creating method, device, equipment, medium and micro service system
CN111367803A (en) Method and system for improving testing efficiency of client software
CN108255708A (en) Method, apparatus, storage medium and the equipment of production file are accessed in test environment
CN115544304A (en) File analysis method and device, readable storage medium and file analysis equipment
CN117539754A (en) Pressure testing method and device, storage medium and electronic equipment
CN111984519B (en) Test method and device for service system
CN116383055A (en) Financial scene testing method and device, processor and electronic equipment
TW201407503A (en) System and method for work schedule of cloud platform
Liu et al. Automatic cloud service testing and bottleneck detection system with scaling recommendation
CN115114275A (en) Data acquisition method, device and medium
CN106548331B (en) Method and device for determining release sequence
CN115220887A (en) Processing method of scheduling information, task processing system, processor and electronic equipment
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
CN114895851A (en) Data processing method, data processing device, storage medium and electronic equipment
CN112905449A (en) Target test method, device, equipment and storage medium
CN112866256A (en) Data processing method, device and storage medium
CN106844056B (en) Hadoop big data platform multi-tenant job management method and system
CN110347607A (en) A kind of data cochain test method
CN110908898B (en) Method and system for generating test scheme
CN113592436B (en) Cloud service management method and equipment based on government cloud platform
CN113220438B (en) System for executing operation, method and device for testing batch operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240228

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: 27 Hospital Road, George Town, Grand Cayman ky1-9008

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right