Test case information generation method and device, equipment, medium and program product
By obtaining and filtering business log information and generating a test case information collection, the problem of insufficient demand coverage in the existing technology is solved, and the functional integrity and performance of the business system are improved.
Patent Information
- Application Number
- CN202310627426.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
When generating test cases in the prior art, the requirements of product personnel design are difficult to fully cover all user usage scenarios, resulting in omissions when testing personnel design test cases, resulting in omissions in the function and poor performance of the business system, and unable to meet business requirements.
By obtaining a collection of business log information, filtering and processing and escaping business parameter information, a collection of test case information is generated to cover more business scenarios and reduce duplicate tests.
It reduces functional omissions in the business system, improves the performance of the business system, ensures that test cases can effectively cover various business scenarios, and improves user experience.
Smart Images

Figure CN119065948A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a test case information generation method, apparatus, device, medium, and program product. Background Art
[0002] A test case is a description of a test task for a specific software product, which can be used to verify whether a specific software requirement is met. For a business system, a large number of test cases are usually required to test it before and after it goes online, so as to adjust the business system so that it meets business requirements. At present, when generating test cases, the usual method is: product personnel first design the requirements document, and test personnel then design test cases based on the requirements document.
[0003] However, the inventors have found that when the above method is used to generate test cases, the following technical problems often occur:
[0004] The requirements designed by product personnel are difficult to fully cover the usage scenarios of all users, which leads to omissions when testers design test cases, resulting in functional omissions in the business system, poor performance of the business system, and inability to meet business requirements well, affecting users' use of the business system.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a test case information generation method, apparatus, electronic device, computer-readable medium, and computer program product to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a test case information generation method, the method comprising: obtaining a business log information set, wherein the business log information in the above-mentioned business log information set includes a business identifier and business parameters; filtering the above-mentioned business log information set according to the business identifier and business parameters included in each business log information in the above-mentioned business log information set, and obtaining the filtered business log information set as a business parameter information set; escaping each business parameter information in the above-mentioned business parameter information set to obtain a business test case information set.
[0009] Optionally, the above-mentioned acquisition of the business log information set includes: in response to receiving at least one user request information, writing each user request information in the above-mentioned at least one user request information into the receiving log information to obtain a receiving log information set; in response to having sent a request processing information corresponding to any user request information in the above-mentioned at least one user request information to a corresponding terminal, for each request processing information that has been sent, writing the above-mentioned request processing information into the sending log information to obtain a sending log information set; determining the receiving log information in the above-mentioned receiving log information set and the sending log information in the above-mentioned sending log information set as business log information to obtain a business log information set.
[0010] Optionally, the above-mentioned writing each of the at least one user request information into the receiving log information includes: in response to receiving at least one user request information, writing the web page address, processing class name, processing method name and calling parameters corresponding to the above processing method name included in each of the at least one user request information into the receiving log information to obtain a receiving log information set.
[0011] Optionally, the above-mentioned screening processing of the above-mentioned business log information set includes: grouping processing of the above-mentioned business log information set to obtain a business log information group set; for each business log information group in the above-mentioned business log information group set, deduplicating the above-mentioned business log information group to obtain a deduplicated business log information group; determining the deduplicated business log information in each obtained deduplicated business log information group as business parameter information to obtain a business parameter information set.
[0012] Optionally, the above-mentioned grouping processing of the above-mentioned business log information set includes: grouping the above-mentioned business log information set according to the business identifier included in each business log information in the above-mentioned business log information set to obtain a business log information group set, wherein the business identifiers included in each business log information in each business log information group in the above-mentioned business log information group set are the same.
[0013] Optionally, the deduplication processing of the above-mentioned business log information group includes: deduplication processing of the above-mentioned business log information group according to the business parameters included in each business log information in the above-mentioned business log information group to obtain a deduplication business log information group, wherein the business parameters included in each deduplication business log information in the above-mentioned deduplication business log information group are different.
[0014] Optionally, the above-mentioned escaping each business parameter information in the above-mentioned business parameter information set to obtain a business test case information set includes: escaping each business parameter information in the above-mentioned business parameter information set according to a business dictionary to obtain a business test case information set.
[0015] In a second aspect, some embodiments of the present disclosure provide a test case information generating device, the device comprising: an acquisition unit, configured to acquire a business log information set, wherein the business log information in the above-mentioned business log information set includes a business identifier and business parameters; a screening unit, configured to screen the above-mentioned business log information set according to the business identifier and business parameters included in each business log information in the above-mentioned business log information set, and obtain the filtered business log information set as a business parameter information set; an escape unit, configured to escape each business parameter information in the above-mentioned business parameter information set, and obtain a business test case information set.
[0016] Optionally, the acquisition unit is further configured to: in response to receiving at least one user request information, write each user request information in the at least one user request information into the receiving log information to obtain a receiving log information set; in response to having sent a request processing information corresponding to any user request information in the at least one user request information to the corresponding terminal, for each request processing information that has been sent, write the request processing information into the sending log information to obtain a sending log information set; determine the receiving log information in the receiving log information set and the sending log information in the sending log information set as business log information to obtain a business log information set.
[0017] Optionally, the acquisition unit is further configured to: in response to receiving at least one user request information, write the web page address, processing class name, processing method name and calling parameters corresponding to the above processing method name included in each user request information in the above at least one user request information into the receiving log information to obtain a receiving log information set.
[0018] Optionally, the screening unit is further configured to: perform grouping processing on the above-mentioned business log information set to obtain a business log information group set; perform deduplication processing on each business log information group in the above-mentioned business log information group set to obtain a deduplicated business log information group; determine the deduplicated business log information in each obtained deduplicated business log information group as business parameter information to obtain a business parameter information set.
[0019] Optionally, the screening unit is further configured to: group the above-mentioned business log information set according to the business identifier included in each business log information in the above-mentioned business log information set to obtain a business log information group set, wherein the business identifiers included in each business log information in each business log information group in the above-mentioned business log information group set are the same.
[0020] Optionally, the screening unit is further configured to: perform deduplication processing on the above-mentioned business log information group according to the business parameters included in each business log information in the above-mentioned business log information group to obtain a deduplication business log information group, wherein the business parameters included in each deduplication business log information in the above-mentioned deduplication business log information group are different.
[0021] Optionally, the escaping unit is further configured to: according to the business dictionary, escape each business parameter information in the above business parameter information set to obtain a business test case information set.
[0022] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0023] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0024] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner of the above-mentioned first aspect when executed by a processor.
[0025] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the test case information generation method of some embodiments of the present disclosure, the function omission of the business system is reduced and the performance of the business system is improved. Specifically, the reason for the function omission of the business system and the poor performance of the business system is that the requirements designed by the product personnel are difficult to fully cover the usage scenarios of all users, which leads to omissions when the testers design the test cases, resulting in the function omission of the business system, the poor performance of the business system, and the inability to meet the business requirements well, affecting the user's use of the business system. Based on this, the test case information generation method of some embodiments of the present disclosure, first, obtains a business log information set. Then, according to the business identifier and business parameters included in each business log information in the business log information set, the business log information set is screened and processed to obtain the business log information set after the screening and processing as the business parameter information set. Thus, repeated business log information can be reduced, and when the business parameter information set is used to design test cases later, it can avoid generating repeated test cases, reduce invalid tests performed by repeated test cases, and thus improve the efficiency of testing by test cases. Finally, each business parameter information in the business parameter information set is escaped to obtain a business test case information set. Therefore, each business parameter information in the business parameter information set can be translated into a test case that is easy to understand in business. Because the test case is designed through the business log information set, each business log information can effectively cover various business scenarios, thereby reducing omissions when designing test cases, and the business system can be tested more effectively through test cases, thereby reducing functional omissions in the business system and improving the performance of the business system, which can better meet business requirements and improve the user experience of the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0027] Figure 1 is a schematic diagram of an application scenario of the test case information generation method of some embodiments of the present disclosure;
[0028] Figure 2 is a flow chart of some embodiments of the test case information generating method according to the present disclosure;
[0029] Figure 3 is a flowchart of other embodiments of the test case information generating method according to the present disclosure;
[0030] Figure 4It is a structural schematic diagram of some embodiments of the test case information generating device according to the present disclosure;
[0031] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0032] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0033] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] With regard to the collection, storage, and use of user personal information (such as business log information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0038] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0039] Figure 1 It is a schematic diagram of an application scenario of the test case information generation method of some embodiments of the present disclosure.
[0040] exist Figure 1In the application scenario, first, the computing device 101 can obtain a business log information set 102. The business log information in the business log information set 102 includes a business identifier and a business parameter. Then, the computing device 101 can filter the business log information set 102 according to the business identifier and business parameter included in each business log information in the business log information set 102, and obtain the filtered business log information set as the business parameter information set 103. Finally, the computing device 101 can interpret each business parameter information in the business parameter information set 103 to obtain a business test case information set 104.
[0041] As an example, the business log information in the above-mentioned business log information set 102 may include: findPageByCondition, ProductNo=ab-c-0001 (business log information 1021), findPageByCondition, ProductNo=ab-c-1234 (business log information 1022), findPageByCondition, ProductNo=ab-c-1234 (business log information 1023). The business parameter information in the above-mentioned business parameter information set 103 may include: findPageByCondition, ProductNo=ab-c-0001 (business log information 1031), findPageByCondition, ProductNo=ab-c-1234 (business log information 1032). The business test case information in the above-mentioned business test case information set 104 may include: discount query, product code is value reduction (business test case information 1041), discount query, product code is express delivery (business test case information 1042).
[0042] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.
[0043] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0044] Continue to refer Figure 2, shows a process 200 of some embodiments of the test case information generation method according to the present disclosure. The test case information generation method comprises the following steps:
[0045] Step 201: Obtain a business log information set.
[0046] In some embodiments, the execution subject of the test case information generation method (such as Figure 1 The computing device 101 shown in the figure can obtain a business log information set from a terminal storing a business log information set through a wired connection method or a wireless connection method. Among them, the business log information in the above-mentioned business log information set may include a business identifier and a business parameter. The business log information in the above-mentioned business log information set may be information obtained after the system or some software records a certain completed processing. The above-mentioned certain processing may be some processing run by the computing device during the execution process. For example, the above-mentioned certain processing may be obtaining a URL (uniform resource locator) address. The above-mentioned business log information may be a log. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0047] In some optional implementations of some embodiments, first, in response to receiving at least one user request information, each user request information in the at least one user request information can be written into the receiving log information to obtain a receiving log information set. Among them, the user request information in the at least one user request information can represent the request initiated by the user to the system when using the system. The receiving log information can be information recording the request sent by the user received by the system. For example, the receiving log information can be: request.getRequestURL():http: / / localhost:1234 / system / login. In practice, in response to receiving at least one user request information, the execution entity can record each user request information in the at least one user request information through the front-end technology, and write it into the receiving log information to obtain a receiving log information set.
[0048] Optionally, in response to receiving at least one user request information, the execution subject may write the webpage address, processing class name, processing method name and call parameters corresponding to the processing method name included in each user request information in the at least one user request information into the receiving log information to obtain a receiving log information set. Wherein, the webpage address may be a URL address. The processing method name may be the name of the method used in the execution of the code. The processing class name may be the class name of the class to which the method belongs in the execution of the code. The call parameters corresponding to the processing method name may be the parameters called when the method is run in the execution of the code. In practice, in response to receiving at least one user request information, the execution subject may write the webpage address, processing class name, processing method name and call parameters corresponding to the processing method name included in each user request information in the at least one user request information into the receiving log information based on the SpringAOP aspect technology to obtain a receiving log information set. Thus, the part required for designing a test case (webpage address, processing class name, processing method name and call parameters corresponding to the processing method name) can be extracted from the user request, so that computing resources and operating resources can be saved in subsequent processing.
[0049] As an example, in response to receiving at least one user request information, for each user request information in the at least one user request information, first, the execution subject can obtain the webpage address from the user request information through "request.getRequestURL().toString()". Then, the processing class name can be obtained from the user request information through "joinPoint.getSignature().getDeclaringTypeName()". Secondly, the processing method name can be obtained from the user request information through "joinPoint.getSignature().getName()". After that, the calling parameters corresponding to the processing method name can be obtained from the user request information through "Arrays.toString(joinPoint.getArgs())". Finally, the obtained webpage address, processing class name, processing method name and calling parameters can be written into the empty information, and the written empty information is used as the receiving log information to obtain the receiving log information set corresponding to the at least one user request information. Among them, the empty information can be blank information for the specific content to be recorded.
[0050] Second, in response to request processing information corresponding to any one of the at least one user request information being sent to a corresponding terminal, for each request processing information being sent, the request processing information can be written into the sending log information to obtain a sending log information set. Among them, the corresponding terminal can be a terminal that sends the user request information corresponding to the request processing information. The request processing information can be information that characterizes the processing result obtained after the system processes the user request. For example, the request processing information can be an HTTP message. In practice, in response to request processing information corresponding to any one of the at least one user request information being sent to a corresponding terminal, for each request processing information being sent, the request processing information can be written into empty information, and the written empty information can be used as the sending log information to obtain a sending log information set.
[0051] Third, the receiving log information in the receiving log information set and the sending log information in the sending log information set can be determined as business log information to obtain a business log information set. Thus, the received user request can be converted into a receiving log information set, so that when designing test cases through the receiving log information set in the future, the application scenarios corresponding to the user requests can be effectively covered, which helps to improve the coverage of test cases for various application scenarios.
[0052] Step 202: Filter the service log information set according to the service identifier and service parameter included in each service log information in the service log information set, and obtain the filtered service log information set as the service parameter information set.
[0053] In some embodiments, the execution subject may filter the business log information set according to the business identifier and business parameters included in each business log information in the business log information set, and obtain the filtered business log information set as the business parameter information set. Among them, the business identifier may uniquely identify the business content. For example, the business identifier may be a URL address. Here, the specific setting of the business content may be set by relevant staff. As an example, at least one business module may be provided under the system, at least one business function may be provided under each business module, and at least one business method may be provided under each business function. The business method may characterize the function of the specific business to be tested. For example, the business method may be a discount information query. At this time, the business content may be a business method. The business parameters may be various parameters involved in executing the business content. For example, the business parameters may include: a processing class name, a processing method name, and a call parameter corresponding to the processing method name. In practice, first, for the business log information with the same business parameters included in the business log information set, it may be determined whether the business identifiers included in the business log information with the same business parameters are the same. Then, for the business log information including the same business parameters and the same business identifier, deduplication processing can be performed, and one business log information is retained as business parameter information after deduplication processing. In this way, repeated business log information can be reduced, and when designing test cases using the business parameter information set later, it is possible to avoid generating repeated test cases, reduce invalid tests performed by repeated test cases, and thus improve the efficiency of testing by test cases.
[0054] Step 203: interpret each business parameter information in the business parameter information set to obtain a business test case information set.
[0055] In some embodiments, the execution subject may interpret each business parameter information in the business parameter information set to obtain a business test case information set.
[0056] The above-mentioned translation can be to convert the business parameter information whose content is a code or a string into business test case information that describes the meaning of the code or the string through text. For example, the business parameter information can be: findPageByCondition, ProductNo=ab-c-1234. The business test case information obtained after the translation of the business parameter information can be: discount query, product code is express delivery. In this way, each business parameter information in the business parameter information set can be translated into a test case that is easy to understand in business.
[0057] In some optional implementations of some embodiments, the execution subject may perform escape on each business parameter information in the business parameter information set according to a business dictionary to obtain a business test case information set. The business dictionary may be a comparison table pre-set to characterize the correspondence between program identifiers and business names. The program identifier may be a character string included in the business parameter information. The business name may be a text describing the meaning of the program identifier. As an example, the business dictionary may be as shown in the following table. Thus, the escape processing may be further standardized.
[0058]
[0059] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the test case information generation method of some embodiments of the present disclosure, the function omission of the business system is reduced and the performance of the business system is improved. Specifically, the reason for the function omission of the business system and the poor performance of the business system is that the requirements designed by the product personnel are difficult to fully cover the usage scenarios of all users, which leads to omissions when the testers design the test cases, resulting in the function omission of the business system, the poor performance of the business system, and the inability to meet the business requirements well, affecting the user's use of the business system. Based on this, the test case information generation method of some embodiments of the present disclosure, first, obtains a business log information set. Then, according to the business identifier and business parameters included in each business log information in the business log information set, the business log information set is screened and processed to obtain the business log information set after the screening and processing as the business parameter information set. Thus, repeated business log information can be reduced, and when the business parameter information set is used to design test cases later, it can avoid generating repeated test cases, reduce invalid tests performed by repeated test cases, and thus improve the efficiency of testing by test cases. Finally, each business parameter information in the business parameter information set is escaped to obtain a business test case information set. Therefore, each business parameter information in the business parameter information set can be translated into a test case that is easy to understand in business. Because the test case is designed through the business log information set, each business log information can effectively cover various business scenarios, thereby reducing omissions when designing test cases, and the business system can be tested more effectively through test cases, thereby reducing functional omissions in the business system and improving the performance of the business system, which can better meet business requirements and improve the user experience of the business system.
[0060] Further references Figure 3 , which shows a process 300 of another embodiment of a test case information generation method. The process 300 of the test case information generation method includes the following steps:
[0061] Step 301: Obtain a business log information set.
[0062] In some embodiments, the specific implementation of step 301 and the technical effects thereof can be referred to in Figure 2 The corresponding step 201 in the embodiments will not be described in detail here.
[0063] Step 302: group the service log information set to obtain a service log information set.
[0064] In some embodiments, the execution subject may perform group processing on the service log information set to obtain a service log information set. Here, the specific method of group processing is not limited.
[0065] Optionally, the execution subject may group the business log information set according to the business identifier included in each business log information in the business log information set to obtain a business log information group set. Wherein, the business identifiers included in each business log information in each business log information group in the business log information group set are the same. In practice, the execution subject may group the business log information with the same business identifier included in the business log information set to obtain a business log information group set. Thus, each business log information group in the business log information group set may represent various business parameters called by the same business content.
[0066] Step 303: For each business log information group in the business log information group set, deduplication processing is performed on the business log information group to obtain a deduplication business log information group.
[0067] In some embodiments, the execution entity may perform deduplication processing on each business log information group in the business log information group set to obtain a deduplicated business log information group.
[0068] Optionally, the above-mentioned execution subject can perform deduplication processing on the above-mentioned business log information group according to the business parameters included in each business log information in the above-mentioned business log information group to obtain a deduplication business log information group. Among them, the business parameters included in each deduplication business log information in the above-mentioned deduplication business log information group are different. In practice, for each business log information group in the above-mentioned business log information group set, the above-mentioned execution subject can perform deduplication processing on the business log information with the same business parameters included in the above-mentioned business log information group to obtain a deduplication business log information group corresponding to the above-mentioned business log information group. Thereby, the proportion of test cases containing duplicates in the subsequently generated test cases can be reduced, thereby reducing the number of invalid tests caused by repeated tests, and further saving computing resources and operating resources.
[0069] Step 304: Determine the deduplicated business log information in each deduplicated business log information group as business parameter information to obtain a business parameter information set.
[0070] In some embodiments, the execution subject can determine the deduplication business log information in each deduplication business log information group as business parameter information to obtain a business parameter information set. Thus, each business log information group can be checked one by one by grouping, thereby improving the efficiency and accuracy of the screening process.
[0071] Step 305: interpret each business parameter information in the business parameter information set to obtain a business test case information set.
[0072] In some embodiments, the specific implementation of step 305 and the technical effects thereof can be referred to in Figure 2 The corresponding step 203 in the embodiments will not be described in detail here.
[0073] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 The process 300 of the test case information generation method in some corresponding embodiments embodies the steps of expanding the grouping and screening. Therefore, the schemes described in these embodiments can check each business log information group one by one by grouping, thereby improving the efficiency and accuracy of the screening process.
[0074] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a test case information generating device, and these device embodiments are Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0075] like Figure 4 As shown, the test case information generating device 400 of some embodiments includes: an acquisition unit 401, a screening unit 402 and an escape unit 403. The acquisition unit 401 is configured to acquire a business log information set, wherein the business log information in the business log information set includes a business identifier and a business parameter; the screening unit 402 is configured to screen the business log information set according to the business identifier and business parameter included in each business log information in the business log information set, and obtain the filtered business log information set as the business parameter information set; the escape unit 403 is configured to escape each business parameter information in the business parameter information set to obtain a business test case information set.
[0076] Optionally, the acquisition unit 401 can be further configured to: in response to receiving at least one user request information, write each user request information in the at least one user request information into the receiving log information to obtain a receiving log information set; in response to having sent a request processing information corresponding to any user request information in the at least one user request information to the corresponding terminal, for each request processing information that has been sent, write the request processing information into the sending log information to obtain a sending log information set; determine the receiving log information in the receiving log information set and the sending log information in the sending log information set as business log information to obtain a business log information set.
[0077] Optionally, the acquisition unit 401 can be further configured to: in response to receiving at least one user request information, write the web page address, processing class name, processing method name and calling parameters corresponding to the above processing method name included in each user request information in the above at least one user request information into the receiving log information to obtain a receiving log information set.
[0078] Optionally, the screening unit 402 can be further configured to: group the above-mentioned business log information set to obtain a business log information group set; for each business log information group in the above-mentioned business log information group set, deduplicate the above-mentioned business log information group to obtain a deduplicated business log information group; determine the deduplicated business log information in each obtained deduplicated business log information group as business parameter information to obtain a business parameter information set.
[0079] Optionally, the screening unit 402 can be further configured to: group the above-mentioned business log information set according to the business identifier included in each business log information in the above-mentioned business log information set to obtain a business log information group set, wherein the business identifiers included in each business log information in each business log information group in the above-mentioned business log information group set are the same.
[0080] Optionally, the screening unit 402 can be further configured to: perform deduplication processing on the above-mentioned business log information group according to the business parameters included in each business log information in the above-mentioned business log information group, to obtain a deduplication business log information group, wherein the business parameters included in each deduplication business log information in the above-mentioned deduplication business log information group are different.
[0081] Optionally, the escaping unit 403 may be further configured to: according to the business dictionary, escape each business parameter information in the above business parameter information set to obtain a business test case information set.
[0082] It can be understood that the units recorded in the test case information generating device 400 and the reference Figure 2Therefore, the operations, features and beneficial effects described above for the method are also applicable to the test case information generating device 400 and the units included therein, and will not be described in detail here.
[0083] Reference below Figure 5 , which shows an electronic device 500 (such as Figure 1 A schematic diagram of the structure of the computing device 101 shown in FIG. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0084] like Figure 5 As shown, the electronic device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0085] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0086] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0087] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0088] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0089] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a business log information set, wherein the business log information in the business log information set includes a business identifier and a business parameter; filters the business log information set according to the business identifier and business parameter included in each business log information in the business log information set, and obtains the filtered business log information set as a business parameter information set; and escapes each business parameter information in the business parameter information set to obtain a business test case information set.
[0090] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0091] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0092] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a screening unit, and an escape unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the acquisition unit may also be described as a "unit for acquiring a collection of business log information".
[0093] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0094] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned test case information generating methods when executed by a processor.
[0095] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for generating test case information, comprising: Acquire a service log information set, wherein the service log information in the service log information set includes a service identifier and a service parameter; According to the service identifier and service parameter included in each service log information in the service log information set, the service log information set is screened to obtain the screened service log information set as the service parameter information set; Each piece of business parameter information in the business parameter information set is escaped to obtain a business test case information set.
2. The method according to claim 1, wherein: The obtaining of a business log information set includes: In response to receiving at least one user request information, writing each user request information in the at least one user request information into receiving log information to obtain a receiving log information set; In response to sending request processing information corresponding to any one of the at least one user request information to the corresponding terminal, for each request processing information that has been sent, write the request processing information into sending log information to obtain a sending log information set; The receiving log information in the receiving log information set and the sending log information in the sending log information set are determined as business log information to obtain a business log information set.
3. The method according to claim 2, wherein: The step of writing each user request information in the at least one user request information into the receiving log information comprises: In response to receiving at least one user request information, the web page address, processing class name, processing method name and calling parameters corresponding to the processing method name included in each user request information in the at least one user request information are written into the receiving log information to obtain a receiving log information set.
4. The method according to claim 1, wherein: The screening process of the business log information set includes: Grouping the business log information set to obtain a business log information group set; For each business log information group in the business log information group set, performing deduplication processing on the business log information group to obtain a deduplicated business log information group; The deduplicated business log information in each deduplicated business log information group is determined as business parameter information to obtain a business parameter information set.
5. The method according to claim 4, wherein: The grouping process of the business log information set includes: According to the service identifier included in each service log information in the service log information set, the service log information set is grouped to obtain a service log information group set, wherein the service identifiers included in each service log information in each service log information group in the service log information group set are the same.
6. The method according to claim 4, wherein: The deduplication processing of the business log information group includes: According to the business parameters included in each business log information in the business log information group, the business log information group is deduplicated to obtain a deduplicated business log information group, wherein the business parameters included in each deduplicated business log information in the deduplicated business log information group are different.
7. The method according to claim 1, wherein: The step of translating each business parameter information in the business parameter information set to obtain a business test case information set includes: According to the business dictionary, each business parameter information in the business parameter information set is escaped to obtain a business test case information set.
8. A test case information generating device, comprising: An acquiring unit is configured to acquire a service log information set, wherein the service log information in the service log information set includes a service identifier and a service parameter; A screening unit is configured to screen the business log information set according to the business identifier and business parameter included in each business log information in the business log information set, and obtain the screened business log information set as the business parameter information set; The escaping unit is configured to escape each business parameter information in the business parameter information set to obtain a business test case information set.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 7.
