CN111104328A - Use case generation method and device, computer equipment and readable storage medium - Google Patents

Use case generation method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN111104328A
CN111104328A CN201911324969.3A CN201911324969A CN111104328A CN 111104328 A CN111104328 A CN 111104328A CN 201911324969 A CN201911324969 A CN 201911324969A CN 111104328 A CN111104328 A CN 111104328A
Authority
CN
China
Prior art keywords
request
data
processed
target
request data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911324969.3A
Other languages
Chinese (zh)
Other versions
CN111104328B (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.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911324969.3A priority Critical patent/CN111104328B/en
Publication of CN111104328A publication Critical patent/CN111104328A/en
Application granted granted Critical
Publication of CN111104328B publication Critical patent/CN111104328B/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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the application provides a use case generation method, a use case generation device, computer equipment and a readable storage medium, and relates to the field of software testing, wherein the method comprises the following steps: acquiring a log file of a proxy server; analyzing a log file of a proxy server, and acquiring a plurality of request data from analyzed data, wherein each request data comprises an identification character, and the identification characters are acquired by pre-configuring the proxy server; integrating the request data with the same identification character in the plurality of request data to obtain a data set to be processed; and inputting the data set to be processed into a preset table to obtain a target case, so that the target case can be conveniently obtained.

Description

Use case generation method and device, computer equipment and readable storage medium
Technical Field
The application relates to the field of software testing, in particular to a use case generation method, a use case generation device, computer equipment and a readable storage medium.
Background
In recent years, more and more attention has been paid to automatic testing in software testing, and through the automatic testing, the process of software online can be accelerated, and software bugs can be predicted in advance to be repaired. In the prior art, the automatic case is generally compiled by testers, different software needs to be compiled again, the reuse rate is low, and the software automation test is inconvenient to realize in practical application.
In view of this, a need exists in the art for a convenient use case generation scheme.
Disclosure of Invention
The embodiment of the application provides a use case generation method, a use case generation device, computer equipment and a readable storage medium.
The embodiment of the application can be realized as follows:
in a first aspect, an embodiment provides a use case generation method, including:
acquiring a log file of a proxy server;
analyzing the log file of the proxy server, and acquiring a plurality of request data from analyzed data, wherein each request data comprises an identification character, and the identification character is acquired by pre-configuring the proxy server;
integrating the request data with the same identification characters in the plurality of request data to obtain a data set to be processed;
and inputting the data set to be processed into a preset table to obtain a target use case.
In an optional implementation manner, the step of integrating the request data with the same identifier character in the plurality of request data to obtain a to-be-processed data set includes:
extracting any request data in the plurality of request data as target request data, and taking the plurality of request data after the target request data is extracted as a first request data set;
taking the identification character of the target request data as a target identification character, and generating a target identification character request head according to the target identification character, wherein the target identification character request head corresponds to a storage space;
when at least one identification character which is the same as the target identification character exists in the first request data set, storing the request data corresponding to the at least one identification character into a storage space corresponding to a request head of the target identification character;
and taking the first request data set except the request data stored in the storage space corresponding to the target identification character request header as a second request data set, replacing the plurality of request data with the second request data set, and executing the steps until the plurality of request data are completely stored to obtain a data set to be processed.
In an optional embodiment, the request data further includes a request time, a request address, a request parameter, and a request type, and the preset table packet step item, the request address item, the request parameter item, and the request type item;
the step of inputting the data set to be processed into a preset table to obtain a target use case comprises the following steps:
acquiring data to be processed, wherein the data to be processed is composed of at least one request data in a storage space corresponding to any one target identification character request header;
sequencing each request data according to the request time of each request data in the data to be processed to obtain the step sequence number of the request data corresponding to each request time;
and according to the sequence of the step sequence numbers, sequentially filling the step sequence number, the request address, the request parameter and the request type of each request datum into the positions of the corresponding step item, request address item, request parameter item and request type item in the preset table to obtain the target case.
In an optional implementation manner, before the step of integrating the request data with the same identifier character in the plurality of request data to obtain a to-be-processed data set, the method further includes:
and carrying out format conversion on the identification characters, the request time, the request address, the request parameters and the request type to obtain the identification characters, the request time, the request address, the request parameters and the request type which are converted into a data exchange format.
In an optional embodiment, the to-be-processed data set is multiple, and the step of inputting the to-be-processed data set into a preset table to obtain a target use case includes:
acquiring the data volume of each data set to be processed, and arranging each data set to be processed in a descending order according to the data volume;
and sequentially inputting each data set to be processed into a target table according to the arrangement sequence of each data set to be processed to obtain a plurality of target use cases.
In an alternative embodiment, the method further comprises:
and converting the target case into test case data, and sending the test case data to an automatic test tool so that the automatic test tool tests a target system according to the test case data.
In an optional embodiment, before the step of obtaining the log file of the proxy server, the method further includes:
and configuring a request header field to the proxy server so as to acquire the identification information of each request datum according to the request header field when analyzing the log file of the proxy server.
In a second aspect, an embodiment provides a use case generating apparatus, including:
the acquisition module is used for acquiring the log file of the proxy server;
the analysis module is used for analyzing the log file of the proxy server and acquiring a plurality of request data from the analyzed analysis data, wherein each request data comprises an identification character, and the identification character is acquired by pre-configuring the proxy server;
the integration module is used for integrating the request data with the same identification characters in the plurality of request data to obtain a data set to be processed;
and the input module is used for inputting the data set to be processed into a preset table to obtain a target use case.
In a third aspect, an embodiment provides a computer device, where the computer device includes a processor and a non-volatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device executes the use case generation method described in any one of the foregoing embodiments.
In a fourth aspect, an embodiment provides a readable storage medium, where the readable storage medium includes a computer program, and the computer program controls, when running, a computer device in the readable storage medium to execute the use case generation method in any one of the foregoing embodiments.
The beneficial effects of the embodiment of the application include, for example:
by adopting the use case generation method, the device, the computer equipment and the readable storage medium provided by the embodiment of the application, the log file of the proxy server is obtained, the analysis data in the log file is obtained through analysis, then the request data are obtained from the analysis data, the request data with the same identification characters in the request data are skillfully integrated to obtain the data set to be processed, the data set to be processed is input into the preset table to obtain the target use case, and the target use case can be conveniently generated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart illustrating steps of a use case generation method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating the sub-steps of step S203 in FIG. 1;
fig. 3 is a schematic block diagram of an application scenario for requesting parameters according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a structure of a use case generation apparatus according to an embodiment of the present application;
fig. 5 is a block diagram schematically illustrating a structure of a computer device according to an embodiment of the present disclosure.
Icon: 100-a computer device; 110-use case generating means; 1101-an acquisition module; 1102-an analysis module; 1103-an integration module; 1104-an input module; 1105-a conversion module; 1106-test module; 111-a memory; 112-a processor; 113-communication unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. 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.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. are used for indicating the orientation or positional relationship based on the orientation or positional relationship shown in the drawings or the orientation or positional relationship which the present invention product is usually put into use, it is only for convenience of describing the present application and simplifying the description, but it is not intended to indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation and be operated, and thus, should not be construed as limiting the present application.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
At present, various software is tested through automatic testing, and the process is to input a case for testing into an automatic testing tool, so that the situation of a user during executing the operation of the case can be simulated, the software can be tested before being on line, and hidden dangers are eliminated. For example, during the development of a website platform, the website platform may include functions such as login, search, and presentation. In the prior art, a tester needs to write data related to operations of a user using these functions in a use case manner, so as to simulate a situation when the user performs each operation, and achieve the purposes of vulnerability detection, and the like. However, for different functions of different software, a tester needs to write the cases one by one, the reuse rate is low, and the tester needs to advance for a long time. However, the idea of the same tester is relatively single, and all operations possibly executed by all users cannot be considered and written into a use case, which may cause a bug to still exist after software is online. Based on this, the embodiment of the present application provides a use case generation method, as shown in fig. 1, the method includes steps S201 to S204.
Step S201, a log file of the proxy server is acquired.
Step S202, analyzing the log file of the proxy server, and acquiring a plurality of request data from analyzed data, wherein each request data comprises an identification character, and the identification character is acquired by configuring the proxy server in advance.
Step S203, integrating the request data with the same identifier character in the plurality of request data to obtain a to-be-processed data set.
And step S204, inputting the data set to be processed into a preset table to obtain a target case.
The proxy server can be a Nginx server, when a user operates on a developed webpage platform, the Nginx server serves as a high-performance HTTP server and a reverse proxy server, and all operations of the user on the webpage platform can be recorded in log files, so that a plurality of request data acquired from analysis data analyzed from the log files of the Nginx server serve as production basis of use cases, the actual operation process of the user can be truly reflected, and finally obtained test results are more accurate. Before the step of obtaining the log file of the proxy server, an example is further provided in the embodiments of the present application, in which a request header field is configured to the proxy server, so that when the log file of the proxy server is parsed, identification information of each piece of request data is obtained according to the request header field. The request header field "http _ x _ forwarded _ for" may be configured in the Nginx server, and specifically may be:
location/{
...
proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;
proxy_pass http://1xx.xxx.xxx.xxx;
}
after the above configuration, when the log file of the proxy server is parsed, the identification information of each request data may be obtained according to "http _ x _ forwarded _ for".
On this basis, the embodiment of the present application provides an example of obtaining a to-be-processed data set by integrating request data with the same identifier in the plurality of request data, which can be implemented through step S2031 to step S2034, as shown in fig. 2.
Step S2031, extracting any request data in the plurality of request data as target request data, and using the plurality of request data after extracting the target request data as a first request data set.
Step S2032, using the identification character of the target request data as a target identification character, and generating a target identification character request head according to the target identification character, wherein the target identification character request head corresponds to a storage space.
Step S2033, when at least one identifier character identical to the target identifier character exists in the first request data set, storing the request data corresponding to the at least one identifier character in a storage space corresponding to the target identifier character request header.
Step S2034, using the first request data set excluding the request data stored in the storage space corresponding to the target identifier character request header as a second request data set, and replacing the plurality of request data with the second request data set, and executing the above steps until the plurality of request data are completely stored, thereby obtaining a to-be-processed data set.
The identification character of each request data may be regarded as an identification of a user to which the request data corresponds, for example, the plurality of request data may be: { "123", "x _ forward": 62.32.0.1"}, {"456"," x _ forward ": 62.32.0.2" }, { "789", "x _ forward": 62.32.0.1"}, {"101112"," x _ forward ": 62.32.0.1" } and { "131415", "x _ forward": 62.32.0.3 "}. Any request data is fetched as target request data, e.g., { "123", "x _ forwarded": 62.32.0.1"} is fetched as target request data, and the remaining {"456"," x _ forwarded ": 62.32.0.2" }, { "789", "x _ forwarded": 62.32.0.1"}, {"101112"," x _ forwarded ": 62.32.0.1" } and { "131415", "x _ forwarded": 62.32.0.3"} may be fetched as first request data set. By taking the identification characters "x _ forwarded": 62.32.0.1 "of the target request data {"123"," x _ forwarded ": 62.32.0.1" } as target identification characters, a target identification character request header can be generated according to the target identification characters, and the target identification character request header corresponds to a storage space. In the first request data set, identification characters of { "789", "x _ forward": 62.32.0.1"} and {"101112"," x _ forward ": 62.32.0.1" } are both "x _ forward": 62.32.0.1", and are the same as target identification characters" x _ forward ": 62.32.0.1", so that the request data { "789", "x _ forward": 62.32.0.1"} and {"101112"," x _ forward ": 62.32.0.1" } are stored in a storage space corresponding to the target identification character request header, which may be represented as { "x _ forward": 62.32.0.1"," req { "123" }, { "789" }, { "101112" }. The above steps can be performed by taking { "456", "x _ forwarded": 62.32.0.2"} and {"131415"," x _ forwarded ": 62.32.0.3" } as the second request data set and replacing the plurality of request data with the second request data set until the plurality of request data sets are stored, resulting in a pending data set: "{" x _ forward ": 62.32.0.1", "req": { "123" }, { "789" }, { "101112" }; { "x _ forward": 62.32.0.2"," req ": {"456 "}; { "x _ forward": "62.32.0.3", "req": { "131415" }.
On the basis, the request data further comprises request time, a request address, request parameters and a request type, and the preset table packet step item, the request address item, the request parameter item and the request type item. The embodiment of the present application further provides an example of inputting the data set to be processed into a preset table to obtain a target use case, and the example can be implemented through the following steps.
And acquiring data to be processed, wherein the data to be processed is composed of at least one request data in a storage space corresponding to any one target identification character request header.
And sequencing each request data according to the request time of each request data in the data to be processed to obtain the step sequence number of the request data corresponding to each request time.
And according to the sequence of the step sequence numbers, sequentially filling the step sequence number, the request address, the request parameter and the request type of each request datum into the positions of the corresponding step item, request address item, request parameter item and request type item in the preset table to obtain the target case.
The data to be processed may be extracted from the data set to be processed, where the data to be processed is composed of at least one request data in a storage space corresponding to any one of the target identification character request headers, for example:
Figure BDA0002328141200000101
referring to fig. 3, the data to be processed may indicate a process of entering a web platform after a user enters a user name "admin" and a password "111111" when the user logs in the web platform, and displaying the user name at a corresponding position of the web platform. The request addresses are http:// 10.1.1.1/logic and http://10.1.1.1/info respectively, the request types are post, and the request parameters are user admin, pwd:111111 and user admin. The whole operation process is necessarily to log in (login) first and then display (info) the user name in the corresponding position. Therefore, the request time of the two aforementioned request data obtained from the log file is inevitably earlier than the request time of "display", so that the step number of the "login" request parameter is "1", and the step number of the "display" request parameter is "2", and the step number, the request address, the request parameter and the request type of each request data are sequentially filled in the position of the corresponding step item, request address item, request parameter item and request type item in the preset table according to the order of the obtained step numbers, so as to obtain the target use case, as shown in table one.
Watch 1
Figure BDA0002328141200000111
On the basis, before the step of integrating the request data with the same identifier characters in the multiple requests and data to obtain the to-be-processed data set, the embodiment of the present application further provides an example of performing format conversion on the identifier characters, the request time, the request address, the request parameters, and the request type to obtain the identifier characters, the request time, the request address, the request parameters, and the request type converted into the data exchange format.
The identifier, the request time, the request address, the request parameter, and the request type of each request parameter may be converted into a format, and the format is converted into a data exchange format (for example, JavaScript Object notification, Json for short) so as to perform integration processing operation in the following, which is applicable to all systems of the b/s architecture.
On this basis, the data set to be processed is multiple, and the step of inputting the data set to be processed into a preset table to obtain the target use case comprises the following steps:
acquiring the data volume of each data set to be processed, and arranging each data set to be processed in a descending order according to the data volume;
and sequentially inputting each data set to be processed into a target table according to the arrangement sequence of each data set to be processed to obtain a plurality of target use cases.
The data sets to be processed may be multiple, and the multiple data sets to be processed may include multiple data sets to be processed, and since the request parameter matching the target identification character request header may be stored in the storage space corresponding to the target identification character request header in the foregoing steps, when the data to be processed is filled into the preset form according to the foregoing rule, the multiple request parameters in the data to be processed may obtain the step sequence number according to the request time of the multiple request parameters in the log file, that is, when each data to be processed is input into the preset form, each data to be processed may start with the step sequence number "1". Therefore, even if a plurality of data sets to be processed are input, the serial number of the initial step of each data set to be processed is 1, and the serial number is taken as a dividing point, so that a large amount of data is not disordered, a large amount of target cases can be quickly obtained, and the testing efficiency is improved.
On this basis, the embodiment of the present application further provides an example that the target case is converted into the test case data, and the test case data is sent to the automated testing tool, so that the automated testing tool tests the target system according to the test case data.
After the target case is obtained, the target case can be converted into test case data, the test case data can be combined according to the identification characters, the target system can be tested according to the test case data through an automatic test tool, the target case can be efficiently produced, and testers are released and can be put into more valuable work.
An embodiment of the present application provides a use case generating apparatus 110, as shown in fig. 4, the apparatus includes:
an obtaining module 1101 is configured to obtain a log file of the proxy server.
The analysis module 1102 is configured to analyze the log file of the proxy server, and obtain a plurality of request data from analyzed data, where each request data includes an identifier character, and the identifier character is obtained by configuring the proxy server in advance.
An integrating module 1103, configured to integrate the request data with the same identifier character in the multiple request data to obtain a to-be-processed data set.
And the input module 1104 is configured to input the data set to be processed into a preset table to obtain a target use case.
Further, the integration module 1103 is specifically configured to:
extracting any request data in the plurality of request data as target request data, and taking the plurality of request data after the target request data is extracted as a first request data set; taking the identification character of the target request data as a target identification character, and generating a target identification character request head according to the target identification character, wherein the target identification character request head corresponds to a storage space; when at least one identification character which is the same as the target identification character exists in the first request data set, storing the request data corresponding to the at least one identification character into a storage space corresponding to a request head of the target identification character; and taking the first request data set except the request data stored in the storage space corresponding to the target identification character request header as a second request data set, replacing the plurality of request data with the second request data set, and executing the steps until the plurality of request data are completely stored to obtain a data set to be processed.
Further, the request data further includes a request time, a request address, a request parameter and a request type, and the preset table packet step item, the request address item, the request parameter item and the request type item. The input module 1104 is specifically configured to:
acquiring data to be processed, wherein the data to be processed is composed of at least one request data in a storage space corresponding to any one target identification character request header; sequencing each request data according to the request time of each request data in the data to be processed to obtain the step sequence number of the request data corresponding to each request time; and according to the sequence of the step sequence numbers, sequentially filling the step sequence number, the request address, the request parameter and the request type of each request datum into the positions of the corresponding step item, request address item, request parameter item and request type item in the preset table to obtain the target case.
Further, the apparatus further includes a conversion module 1105, configured to perform format conversion on the identifier character, the request time, the request address, the request parameter, and the request type, so as to obtain the identifier character, the request time, the request address, the request parameter, and the request type converted into the data exchange format.
Further, the to-be-processed data set is multiple, and the input module 1104 is further specifically configured to:
acquiring the data volume of each data set to be processed, and arranging each data set to be processed in a descending order according to the data volume; and sequentially inputting each data set to be processed into a target table according to the arrangement sequence of each data set to be processed to obtain a plurality of target use cases.
Further, the apparatus further includes a test module 1106, configured to convert the target case into test case data, and send the test case data to an automation test tool, so that the automation test tool tests a target system according to the test case data.
Further, the method further includes configuring a request header field to the proxy server, so that when the log file of the proxy server is analyzed, the identification information of each request data is obtained according to the request header field.
The embodiment of the present application provides a computer device 100, where the computer device 100 includes a processor and a non-volatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device 100 executes the aforementioned use case generation method. As shown in fig. 5, fig. 5 is a block diagram of a computer device 100 according to an embodiment of the present disclosure. The computer device 100 includes a use case generation apparatus 110, a memory 111, a processor 112, and a communication unit 113.
To achieve data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The use case generating apparatus 110 includes at least one software function module which may be stored in the memory 111 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the computer device 100. The processor 112 is configured to execute executable modules stored in the memory 111, such as software functional modules and computer programs included in the used case generating apparatus 110.
An embodiment of the present application provides a readable storage medium, where the readable storage medium includes a computer program, and the computer program controls, when running, a computer device where the readable storage medium is located to execute the foregoing use case generation method.
To sum up, the embodiment of the present application provides a use case generation method, an apparatus, a computer device, and a readable storage medium, where the method includes obtaining a log file of a proxy server, obtaining analysis data in the log file by analysis, further obtaining a plurality of request data from the analysis data, skillfully integrating the request data with the same identifier in the plurality of request data to obtain a to-be-processed data set, and inputting the to-be-processed data set into a preset table to obtain a target use case, so that the target use case can be generated conveniently.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for generating a use case, comprising:
acquiring a log file of a proxy server;
analyzing the log file of the proxy server, and acquiring a plurality of request data from analyzed data, wherein each request data comprises an identification character, and the identification character is acquired by pre-configuring the proxy server;
integrating the request data with the same identification characters in the plurality of request data to obtain a data set to be processed;
and inputting the data set to be processed into a preset table to obtain a target use case.
2. The method according to claim 1, wherein the step of integrating the request data with the same identifier character in the plurality of request data to obtain a to-be-processed data set comprises:
extracting any request data in the plurality of request data as target request data, and taking the plurality of request data after the target request data is extracted as a first request data set;
taking the identification character of the target request data as a target identification character, and generating a target identification character request head according to the target identification character, wherein the target identification character request head corresponds to a storage space;
when at least one identification character which is the same as the target identification character exists in the first request data set, storing the request data corresponding to the at least one identification character into a storage space corresponding to a request head of the target identification character;
and taking the first request data set except the request data stored in the storage space corresponding to the target identification character request header as a second request data set, replacing the plurality of request data with the second request data set, and executing the steps until the plurality of request data are completely stored to obtain a data set to be processed.
3. The method according to claim 2, wherein the request data further includes a request time, a request address, a request parameter and a request type, and the preset table packet includes a step item, a request address item, a request parameter item and a request type item;
the step of inputting the data set to be processed into a preset table to obtain a target use case comprises the following steps:
acquiring data to be processed, wherein the data to be processed is composed of at least one request data in a storage space corresponding to any one target identification character request header;
sequencing each request data according to the request time of each request data in the data to be processed to obtain the step sequence number of the request data corresponding to each request time;
and according to the sequence of the step sequence numbers, sequentially filling the step sequence number, the request address, the request parameter and the request type of each request datum into the positions of the corresponding step item, request address item, request parameter item and request type item in the preset table to obtain the target case.
4. The method according to claim 3, wherein before the step of integrating the request data with the same identification character in the plurality of request data to obtain the data set to be processed, the method further comprises:
and carrying out format conversion on the identification characters, the request time, the request address, the request parameters and the request type to obtain the identification characters, the request time, the request address, the request parameters and the request type which are converted into a data exchange format.
5. The method according to claim 2, wherein the data set to be processed is multiple, and the step of inputting the data set to be processed into a preset table to obtain the target use case comprises:
acquiring the data volume of each data set to be processed, and arranging each data set to be processed in a descending order according to the data volume;
and sequentially inputting each data set to be processed into a target table according to the arrangement sequence of each data set to be processed to obtain a plurality of target use cases.
6. The method of claim 1, further comprising:
and converting the target case into test case data, and sending the test case data to an automatic test tool so that the automatic test tool tests a target system according to the test case data.
7. The method of claim 1, wherein prior to the step of obtaining the log file of the proxy server, the method further comprises:
and configuring a request header field to the proxy server so as to acquire the identification information of each request datum according to the request header field when analyzing the log file of the proxy server.
8. A use case generation apparatus, comprising:
the acquisition module is used for acquiring the log file of the proxy server;
the analysis module is used for analyzing the log file of the proxy server and acquiring a plurality of request data from the analyzed analysis data, wherein each request data comprises an identification character, and the identification character is acquired by pre-configuring the proxy server;
the integration module is used for integrating the request data with the same identification characters in the plurality of request data to obtain a data set to be processed;
and the input module is used for inputting the data set to be processed into a preset table to obtain a target use case.
9. A computer device comprising a processor and a non-volatile memory having computer instructions stored thereon, wherein the computer instructions, when executed by the processor, cause the computer device to perform the use case generation method of any of claims 1-7.
10. A readable storage medium, comprising a computer program, wherein the computer program controls a computer device in which the readable storage medium is located to execute the use case generation method according to any one of claims 1 to 7 when the computer program runs.
CN201911324969.3A 2019-12-20 2019-12-20 Use case generation method and device, computer equipment and readable storage medium Active CN111104328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911324969.3A CN111104328B (en) 2019-12-20 2019-12-20 Use case generation method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911324969.3A CN111104328B (en) 2019-12-20 2019-12-20 Use case generation method and device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111104328A true CN111104328A (en) 2020-05-05
CN111104328B CN111104328B (en) 2023-03-21

Family

ID=70422429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911324969.3A Active CN111104328B (en) 2019-12-20 2019-12-20 Use case generation method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111104328B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468187A (en) * 2021-09-02 2021-10-01 太平金融科技服务(上海)有限公司深圳分公司 Multi-party data integration method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319547A (en) * 2017-01-17 2018-07-24 阿里巴巴集团控股有限公司 Method for generating test case, device and system
CN108365971A (en) * 2018-01-10 2018-08-03 深圳市金立通信设备有限公司 Daily record analytic method, equipment and computer-readable medium
EP3522042A1 (en) * 2018-02-05 2019-08-07 Beijing Elex Technology Co. Ltd. Method and apparatus for information processing, server and computer readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319547A (en) * 2017-01-17 2018-07-24 阿里巴巴集团控股有限公司 Method for generating test case, device and system
CN108365971A (en) * 2018-01-10 2018-08-03 深圳市金立通信设备有限公司 Daily record analytic method, equipment and computer-readable medium
EP3522042A1 (en) * 2018-02-05 2019-08-07 Beijing Elex Technology Co. Ltd. Method and apparatus for information processing, server and computer readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468187A (en) * 2021-09-02 2021-10-01 太平金融科技服务(上海)有限公司深圳分公司 Multi-party data integration method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111104328B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN107844421B (en) Interface testing method and device, computer equipment and storage medium
CN107783899B (en) Method and device for testing H5 page in application program and computer equipment
CN109302522B (en) Test method, test device, computer system, and computer medium
CN107122297B (en) Method and equipment for generating request message of test interface
US9734005B2 (en) Log analytics for problem diagnosis
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN111522922A (en) Log information query method and device, storage medium and computer equipment
CN107145440B (en) Application program testing method and device and computer equipment
CN109815119B (en) APP link channel testing method and device
CN111459495B (en) Unit test code file generation method, electronic device and storage medium
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
JP2012133721A (en) Device and method for evaluating exhaustivity of a test
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN108459850B (en) Method, device and system for generating test script
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN108074033A (en) Processing method, system, electronic equipment and the storage medium of achievement data
CN109426611A (en) A kind of method for testing software and device
CN110647471A (en) Interface test case generation method, electronic device and storage medium
CN114116496A (en) Automatic testing method, device, equipment and medium
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
US10241957B2 (en) Workload patterns for realistic load recreation in performance testing
CN111831542A (en) API application debugging method and device and storage medium
US9563541B2 (en) Software defect detection identifying location of diverging paths
CN111104328B (en) Use case generation method and device, computer equipment and readable storage medium
CN109067605B (en) Storage subsystem fault diagnosis method and device, terminal and storage medium

Legal Events

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