Simulation test method, device, equipment and readable storage medium of e-commerce system

Through simulation testing methods, analyzing API documents and generating transaction templates, the problems of large testing workload and inconvenient environment switching in e-commerce systems are solved, and the testing efficiency and convenience of environment switching are improved.

CN114595150BActive Publication Date: 2025-03-28CHINA CITIC BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210212056.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-03-28
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In cross-border e-commerce business, multi-interface series testing and regression testing of the full-link transaction link are large, test packet preparation is time-consuming and labor-intensive, test log positioning is low, and test environment switching is inconvenient.

Method used

It provides a simulation test method for e-commerce systems, which can achieve automated testing and environment switching by obtaining test data and scenario information, analyzing API documents and transaction templates, judging test types and generating corresponding transaction templates.

Benefits of technology

It improves testing efficiency, reduces manual operations and misoperation, realizes convenient switching of the test environment and full sharing of templates, and supports the generation of test templates for full-link business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595150B_ABST
    Figure CN114595150B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of system testing technology, and in particular, to a simulation test method, device, equipment and readable storage medium of an e-commerce system, wherein the method comprises obtaining test data information and test scenario information, test type information, API document information and preset transaction template information; judging whether the test type information is a scheduled task test, and obtaining a first judgment result; judging whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information, and obtaining a second judgment result; parsing and maintaining the API document information and the test scenario information, and obtaining a maintained API transaction template; sending the maintained transaction template to a test module to perform a test according to a preset scheme, and obtaining a first test result. The present invention solves the problems of large test workload, time-consuming and labor-intensive test message preparation, low test log positioning efficiency, and switching between multiple test environments by presetting transaction templates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of system testing technology, and in particular to a simulation testing method, device, equipment and readable storage medium for an e-commerce system. Background Art

[0002] In actual work, due to the rapid expansion of cross-border e-commerce business, business processes are closely linked. In order to ensure production safety, some node optimizations also require serial testing of multiple interfaces involved in the entire transaction link. The workload of regression testing is large, and transaction cases and templates are not shared sufficiently between testers and developers. In addition, the preparation of test messages is time-consuming and labor-intensive, and the efficiency of test log positioning is low. When switching the test environment, the associated system IP, merchant certificate, and deployment configuration need to be manually modified, which is not convenient enough. Summary of the invention

[0003] The purpose of the present invention is to provide a simulation test method, device, equipment and readable storage medium of an e-commerce system to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0004] On the one hand, the present application provides a simulation test method of an e-commerce system, the method comprising:

[0005] Obtain test data information, test scenario information, test type information, API document information, and preset transaction template information;

[0006] Determine whether the test type information is a scheduled task test, and obtain a first determination result;

[0007] If the first judgment result is not a scheduled task test, determining whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information to obtain a second judgment result;

[0008] If the second judgment result is that the transaction template does not exist, parsing and maintaining the API document information and the test scenario information to obtain a maintained API transaction template;

[0009] The maintenance transaction template is sent to a test module for testing according to a preset scheme to obtain a first test result.

[0010] Optionally, the determining whether the test type information is a scheduled task test, after obtaining a first determination result, further includes:

[0011] If the first judgment result is a scheduled task test, determining whether the scheduled task test is added to the monitoring list;

[0012] If the scheduled task test is not added to the monitoring list, the scheduled test task is configured with a transaction code and added to the monitoring list to obtain a scheduled test task added to the monitoring list;

[0013] Match and capture the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result;

[0014] The second test result is encoded according to the associated system information to obtain a second test result code.

[0015] Optionally, if the first judgment result is not a scheduled task test, determining whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information to obtain a second judgment result includes:

[0016] Detecting a test type in the first judgment result, and determining a transaction template corresponding to the test type according to the test type, wherein the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a business full-link regression test type;

[0017] It is determined whether the preset transaction template information contains a transaction template of the single API test type or a transaction template of the business full-link regression test type to obtain a second judgment result.

[0018] Optionally, the selecting the test environment version number information, the business category information and the transaction code information in the test scenario information to supplement the message template with data to obtain the maintained API transaction template includes:

[0019] Send the API document information to the website server to parse the field information of each API interface to obtain a message template;

[0020] The test environment version number information, business category information and transaction code information in the test scenario information are selected to supplement the message template with data to obtain a maintained API transaction template.

[0021] Optionally, the selecting the test environment version number information, the business category information and the transaction code information in the test scenario information to supplement the message template with data to obtain the maintained API transaction template further includes:

[0022] Call the test history module to perform the historical information of the single API test according to the maintained API transaction template;

[0023] Combine the execution sequence and node position of each API interface test in the historical information of the test, and store the generated business full-link regression transaction template in the database;

[0024] Adjust the test data information according to the business full-link regression transaction template to obtain adjusted test data;

[0025] Perform a full-link regression test on the adjusted test data to obtain a third test result;

[0026] The third test result is encoded according to the associated system information to obtain a third test result code.

[0027] Optionally, the sending the maintenance transaction template to a test module to perform a test according to a preset scheme to obtain a first test result further includes:

[0028] Encoding the first test result according to preset associated system information to obtain a first test result code;

[0029] Classifying the first test result code, marking the first test result code as green if the first test result code is a success code, and sending the first test result code marked as green to a communication device of a tester;

[0030] If the first test result code is an error code, the first test result code is marked in red, and the first test result code marked in red and the associated system information are sent to the communication device of the tester.

[0031] In a second aspect, an embodiment of the present application provides a simulation test device for an e-commerce system, the device comprising:

[0032] A first acquisition unit is used to acquire test data information, test scenario information, test type information, API document information and preset transaction template information;

[0033] A first judgment unit, used to judge whether the test type information is a scheduled task test, and obtain a first judgment result;

[0034] a second judgment unit, configured to, if the first judgment result is not a scheduled task test, determine whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information, to obtain a second judgment result;

[0035] A third judgment unit is configured to parse and maintain the API document information and the test scenario information to obtain a maintained API transaction template if the second judgment result is that the transaction template does not exist;

[0036] The first sending unit is used to send the maintenance transaction template to the testing module for testing according to a preset scheme to obtain a first test result.

[0037] Optionally, the device further comprises:

[0038] a fourth judgment unit, configured to judge whether the scheduled task test is added to the monitoring list if the first judgment result is a scheduled task test;

[0039] A fifth judgment unit is used for configuring a transaction code for the scheduled test task and adding the scheduled test task to the monitoring list if the scheduled task test is not added to the monitoring list, so as to obtain the scheduled test task added to the monitoring list;

[0040] A first processing unit is used to match and capture the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result;

[0041] The second processing unit is used to encode the second test result according to the associated system information to obtain a second test result code.

[0042] Optionally, the device comprises:

[0043] A first detection subunit is used to detect a test type in the first judgment result, and determine a transaction template corresponding to the test type according to the test type, where the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a business full-link regression test type;

[0044] The first judgment subunit is used to judge whether there is a transaction template of the single API test type or a transaction template of the business full-link regression test type in the preset transaction template information, and obtain a second judgment result.

[0045] Optionally, the device comprises:

[0046] The first processing subunit is used to send the API document information to the website server to parse the field information of each API interface to obtain a message template;

[0047] The second processing sub-unit is used to select the test environment version number information, business category information and transaction code information in the test scenario information to supplement the message template with data to obtain a maintained API transaction template.

[0048] Optionally, the device further comprises:

[0049] A first calling subunit is used to call the historical information of the single API test in the test history module according to the maintained API transaction template;

[0050] The third processing subunit is used to combine the execution sequence and node position of each API interface test in the historical information of the test, and store the generated business full-link regression transaction template after the combination into a database;

[0051] A fourth processing subunit is used to adjust the test data information according to the business full-link regression transaction template to obtain adjusted test data;

[0052] a fifth processing subunit, configured to perform a full-link regression test on the adjusted test data to obtain a third test result;

[0053] The sixth processing subunit is used to encode the third test result according to the associated system information to obtain a third test result code.

[0054] Optionally, the device further comprises:

[0055] A third processing unit, configured to encode the first test result according to preset associated system information to obtain a first test result code;

[0056] a fourth processing unit, configured to classify the first test result code, mark the first test result code as green if the first test result code is a success code, and send the first test result code marked as green to a communication device of the tester;

[0057] The second sending unit is used for marking the first test result code in red if the first test result code is an error code, and sending the first test result code marked in red and associated system information to the communication device of the tester.

[0058] In a third aspect, an embodiment of the present application provides a simulation test device for an e-commerce system, the device comprising a memory and a processor. The memory is used to store a computer program; the processor is used to implement the steps of the simulation test method for the e-commerce system when executing the computer program.

[0059] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the simulation test method of the above-mentioned e-commerce system are implemented.

[0060] The beneficial effects of the present invention are:

[0061] The present invention solves the problems of large workload of regression testing, time-consuming and labor-intensive test message preparation, low efficiency of test log positioning, and inflexible test environment switching in interface testing for developers and testers by presetting transaction templates. By integrating and configuring each environment address and merchant certificate, convenient switching of website test environment is realized, avoiding the manual consumption and possible misoperation of modification and deployment configuration; at the same time, the website can automatically parse the API interface to generate transaction templates, and realize full sharing of templates, so that more energy can be put on debugging and testing work, improving testing efficiency; the website supports the generation of test templates for full-link business processes, and starts the test tool for scenario testing. The system will realize one-key regression according to the interface nodes and test timing recorded in the template, which is more flexible than general test tools; for timed task tests, execution detection can be added, and users only need to configure the task name and transaction code, which greatly saves labor costs. At the same time, the present invention can be promoted to the development and testing between various systems within the bank. While improving the efficiency of test development, it can also enhance the understanding between internal systems, which is conducive to the convenience and flexibility of inter-system joint debugging.

[0062] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0064] Figure 1 This is a flow chart of a simulation test method for an e-commerce system described in an embodiment of the present invention;

[0065] Figure 2 This is a schematic diagram of the structure of a simulation test device for an e-commerce system described in an embodiment of the present invention;

[0066] Figure 3 It is a schematic diagram of the structure of a simulation test device for an e-commerce system described in an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0068] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0069] Example 1

[0070] like Figure 1 As shown, this embodiment provides a simulation test method for an e-commerce system, and the method includes step S1, step S2, step S3, step S4 and step S5.

[0071] Step S1, obtaining test data information, test scenario information, test type information, API document information and preset transaction template information;

[0072] Step S2: determine whether the test type information is a scheduled task test, and obtain a first determination result;

[0073] Step S3: If the first judgment result is not a scheduled task test, determine whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information, and obtain a second judgment result;

[0074] Step S4: If the second judgment result is that the transaction template does not exist, the API document information and the test scenario information are parsed and maintained to obtain a maintained API transaction template;

[0075] Step S5: Send the maintenance transaction template to the test module for testing according to a preset scheme to obtain a first test result.

[0076] It can be understood that the present invention solves the problems of heavy workload of regression testing, time-consuming and labor-intensive test message preparation, low efficiency of test log positioning, and inflexible test environment switching in interface testing by presetting transaction templates. At the same time, the present invention can be promoted to the development and testing of various systems within the bank. While improving the efficiency of test development, it can also enhance the understanding between internal systems, which is conducive to the convenience and flexibility of inter-system joint debugging.

[0077] It can be understood that the transaction template is a set of message samples in XML format input as the interface under test; when using the transaction template, you only need to follow the template to quickly test without repeatedly organizing the request message.

[0078] In a specific implementation of the present disclosure, step S2 further includes step S6, step S7, step S8 and step S9.

[0079] Step S6: If the first judgment result is a scheduled task test, determine whether the scheduled task test is added to the monitoring list;

[0080] Step S7: If the scheduled task test is not added to the monitoring list, configure the scheduled test task with a transaction code and add it to the monitoring list to obtain a scheduled test task added to the monitoring list;

[0081] Step S8, matching and capturing the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result;

[0082] Step S9: Encode the second test result according to the associated system information to obtain a second test result code.

[0083] It is understandable that the above steps are for scheduled task tests, and execution detection can be added. Users only need to configure the task name and transaction code to match and capture the transaction log, which greatly saves labor costs, and then quickly conduct scheduled task tests. After obtaining the test results, the test status can be queried based on the result code.

[0084] In a specific implementation of the present disclosure, step S3 includes step S31 and step S32.

[0085] Step S31: Detect the test type in the first judgment result, and determine the transaction template corresponding to the test type according to the test type, where the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a business full-link regression test type;

[0086] Step S32: determine whether there is a transaction template of the single API test type or a transaction template of the business full-link regression test type in the preset transaction template information, and obtain a second judgment result.

[0087] It can be understood that the present invention determines the transaction template by the test type of the first judgment result, and performs different tests according to different transaction templates, wherein the transaction template of the full-link regression test is a combination of multiple transaction templates of the single API test.

[0088] In a specific implementation of the present disclosure, step S4 includes step S41 and step S42.

[0089] Step S41: Send the API document information to the website server to parse the field information of each API interface to obtain a message template;

[0090] Step S42: Select the test environment version number information, business category information and transaction code information in the test scenario information to supplement the message template to obtain a maintained API transaction template.

[0091] It can be understood that the present invention realizes convenient switching of website test environment by integrating and configuring various environment addresses and merchant certificates, thereby avoiding the manual consumption and possibility of misoperation in modifying and deploying configurations; and the present invention can automatically parse the API interface to generate transaction templates, and realize full sharing of templates, so that more energy can be placed on debugging and testing work, thereby improving testing efficiency.

[0092] In a specific implementation of the present disclosure, step S42 further includes step S43, step S44, step S45, step S46 and step S47.

[0093] Step S43, calling the test history module to perform the historical information of the single API test according to the maintained API transaction template;

[0094] Step S44: Combine the execution sequence and node position of each API interface test in the historical information of the test, and store the combined generated business full-link regression transaction template into a database;

[0095] Step S45: adjusting the test data information according to the business full-link regression transaction template to obtain adjusted test data;

[0096] Step S46: Perform a full-link regression test on the adjusted test data to obtain a third test result;

[0097] Step S47: Encode the third test result according to the associated system information to obtain a third test result code.

[0098] It can be understood that the present invention can also support the generation of test templates for the entire link business process, and start the test tool to perform scenario testing. The system will implement one-click regression based on the interface nodes and test timing recorded in the template, which is more flexible than general test tools.

[0099] In a specific implementation of the present disclosure, step S5 further includes step S10, step S11 and step S12.

[0100] Step S10: Encode the first test result according to the preset associated system information to obtain a first test result code;

[0101] Step S11, classifying the first test result code, marking the first test result code as green if the first test result code is a success code, and sending the first test result code marked as green to the communication device of the tester;

[0102] Step S12: If the first test result code is an error code, the first test result code is marked in red, and the first test result code marked in red and the associated system information are sent to the communication device of the tester.

[0103] It is understandable that the present invention configures common error codes of transaction-related systems. If the transaction return result is wrong, the related system information can be searched and obtained based on the return code, which is convenient for development and testing personnel to quickly analyze and locate test problems.

[0104] Example 2

[0105] like Figure 2 As shown, this embodiment provides a simulation test device for an e-commerce system, and the device includes a first acquisition unit 701, a first judgment unit 702, a second judgment unit 703, a third judgment unit 704 and a first sending unit 705.

[0106] The first acquisition unit 701 is used to acquire test data information, test scenario information, test type information, API document information and preset transaction template information;

[0107] A first judgment unit 702 is used to judge whether the test type information is a scheduled task test, and obtain a first judgment result;

[0108] The second judgment unit 703 is configured to, if the first judgment result is not a scheduled task test, determine whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information to obtain a second judgment result;

[0109] The third judgment unit 704 is configured to parse and maintain the API document information and the test scenario information to obtain a maintained API transaction template if the second judgment result is that the transaction template does not exist;

[0110] The first sending unit 705 is used to send the maintenance transaction template to the testing module for testing according to a preset scheme to obtain a first test result.

[0111] In a specific implementation of the present disclosure, the first judgment unit 702 further includes a fourth judgment unit 706 , a fifth judgment unit 707 , a first processing unit 708 , and a second processing unit 709 .

[0112] The fourth judgment unit 706 is used to judge whether the scheduled task test is added to the monitoring list if the first judgment result is a scheduled task test;

[0113] The fifth judgment unit 707 is used for configuring the transaction code for the scheduled test task and adding it to the monitoring list if the scheduled task test is not added to the monitoring list, so as to obtain the scheduled test task added to the monitoring list;

[0114] The first processing unit 708 is used to match and capture the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result;

[0115] The second processing unit 709 is used to encode the second test result according to the associated system information to obtain a second test result code.

[0116] In a specific implementation of the present disclosure, the second judgment unit 703 includes a first detection subunit 7031 and a first judgment subunit 7032 .

[0117] A first detection subunit 7031 is used to detect the test type in the first judgment result, and determine the transaction template corresponding to the test type according to the test type, where the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a business full-link regression test type;

[0118] The first judgment subunit 7032 is used to judge whether there is a transaction template of the single API test type or a transaction template of the business full-link regression test type in the preset transaction template information, and obtain a second judgment result.

[0119] In a specific implementation of the present disclosure, the third determination unit 704 includes a first processing subunit 7041 and a second processing subunit 7042 .

[0120] The first processing subunit 7041 is used to send the API document information to the website server to parse the field information of each API interface to obtain a message template;

[0121] The second processing sub-unit 7042 is used to select the test environment version number information, the business category information and the transaction code information in the test scenario information to supplement the message template with data to obtain a maintained API transaction template.

[0122] In a specific embodiment of the present disclosure, the second processing subunit 7042 further includes a first calling subunit 7043, a third processing subunit 7044, a fourth processing subunit 7045, a fifth processing subunit 7046 and a sixth processing subunit 7047.

[0123] The first calling subunit 7043 is used to call the historical information of the single API test in the test history module according to the maintained API transaction template;

[0124] The third processing subunit 7044 is used to combine the execution sequence and node position of each API interface test in the historical information of the test, and store the generated business full-link regression transaction template after the combination into the database;

[0125] The fourth processing subunit 7045 is used to adjust the test data information according to the business full-link regression transaction template to obtain adjusted test data;

[0126] The fifth processing subunit 7046 is used to perform a full-link regression test on the adjusted test data to obtain a third test result;

[0127] The sixth processing subunit 7047 is used to encode the third test result according to the associated system information to obtain a third test result code.

[0128] In a specific implementation of the present disclosure, the first sending unit 705 further includes a third processing unit 710 , a fourth processing unit 711 and a second sending unit 712 .

[0129] The third processing unit 710 is used to encode the first test result according to the preset associated system information to obtain a first test result code;

[0130] The fourth processing unit 711 is used to classify the first test result code, mark the first test result code as green if the first test result code is a success code, and send the first test result code marked as green to the communication device of the tester;

[0131] The second sending unit 712 is used for marking the first test result code in red if the first test result code is an error code, and sending the first test result code marked in red and the associated system information to the communication device of the tester.

[0132] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0133] Example 3

[0134] Corresponding to the above method embodiment, the embodiment of the present disclosure also provides a simulation test device for an e-commerce system. The simulation test device for an e-commerce system described below and the simulation test method for an e-commerce system described above can refer to each other.

[0135] Figure 3 FIG. 8 is a block diagram of a simulation test device 800 for an e-commerce system according to an exemplary embodiment. Figure 3 As shown, the simulation test device 800 of the e-commerce system may include: a processor 801 and a memory 802. The simulation test device 800 of the e-commerce system may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.

[0136] The processor 801 is used to control the overall operation of the simulation test device 800 of the e-commerce system to complete all or part of the steps in the simulation test method of the e-commerce system. The memory 802 is used to store various types of data to support the operation of the simulation test device 800 of the e-commerce system. These data may include, for example, instructions for any application or method operating on the simulation test device 800 of the e-commerce system, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the simulation test device 800 of the e-commerce system and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.

[0137] In an exemplary embodiment, the simulation test device 800 of the e-commerce system can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processor, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components, and is used to execute the above-mentioned simulation test method of an e-commerce system.

[0138] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the simulation test method of the e-commerce system described above are implemented. For example, the computer-readable storage medium may be the memory 802 including the program instructions, and the program instructions may be executed by the processor 801 of the simulation test device 800 of the e-commerce system to complete the simulation test method of the e-commerce system described above.

[0139] Example 4

[0140] Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a readable storage medium. The readable storage medium described below and the simulation test method of the e-commerce system described above can refer to each other.

[0141] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the simulation test method for an e-commerce system of the above method embodiment.

[0142] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.

[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0144] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A simulation test method for an e-commerce system, characterized in that: include: Obtain test data information, test scenario information, test type information, API document information, and preset transaction template information; Determine whether the test type information is a scheduled task test, and obtain a first determination result; If the first judgment result is not a scheduled task test, determining whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information to obtain a second judgment result; If the second judgment result is that the transaction template does not exist, parsing and maintaining the API document information and the test scenario information to obtain a maintained API transaction template; Sending the maintenance transaction template to the test module to perform testing according to a preset plan to obtain a first test result; The API document information and the test scenario information are parsed and maintained to obtain a maintained API transaction template, including: Send the API document information to the website server to parse the field information of each API interface to obtain a message template; The test environment version number information, business category information and transaction code information in the test scenario information are selected to supplement the message template with data to obtain a maintained API transaction template; after the test environment version number information, business category information and transaction code information in the test scenario information are selected to supplement the message template with data to obtain a maintained API transaction template, the method further includes: Call the test history module to perform the historical information of the single API test according to the maintained API transaction template; Combining the execution timing and node position of each API interface test in the historical information of the test, and storing the generated business full-link regression transaction template after the combination into a database; Adjust the test data information according to the business full-link regression transaction template to obtain adjusted test data; Perform a full-link regression test on the adjusted test data to obtain a third test result; The third test result is encoded according to the associated system information to obtain a third test result code.

2. The simulation test method of the e-commerce system according to claim 1, characterized in that: The determining whether the test type information is a scheduled task test, after obtaining a first determination result, further includes: If the first judgment result is a scheduled task test, determining whether the scheduled task test is added to the monitoring list; If the scheduled task test is not added to the monitoring list, the scheduled test task is configured with a transaction code and added to the monitoring list to obtain a scheduled test task added to the monitoring list; Match and capture the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result; The second test result is encoded according to the associated system information to obtain a second test result code.

3. The simulation test method of the e-commerce system according to claim 1, characterized in that: If the first judgment result is not a scheduled task test, determining whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information to obtain a second judgment result includes: Detecting a test type in the first judgment result, and determining a transaction template corresponding to the test type according to the test type, wherein the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a service full-link regression test type; It is determined whether the preset transaction template information includes a transaction template of the single API test type or a transaction template of the service full-link regression test type to obtain a second determination result.

4. The simulation test method of the e-commerce system according to claim 1, characterized in that: The step of sending the maintenance transaction template to the test module to perform a test according to a preset scheme to obtain a first test result further includes: Encoding the first test result according to preset associated system information to obtain a first test result code; Classifying the first test result code, marking the first test result code as green if the first test result code is a success code, and sending the first test result code marked as green to a communication device of a tester; If the first test result code is an error code, the first test result code is marked in red, and the first test result code marked in red and the associated system information are sent to the communication device of the tester.

5. A simulation test device for an e-commerce system, characterized in that: include: A first acquisition unit is used to acquire test data information, test scenario information, test type information, API document information and preset transaction template information; A first judgment unit, used to judge whether the test type information is a scheduled task test, and obtain a first judgment result; a second judgment unit, configured to, if the first judgment result is not a scheduled task test, determine whether there is a transaction template corresponding to the test type information in the first judgment result in the transaction template information, to obtain a second judgment result; A third judgment unit is configured to parse and maintain the API document information and the test scenario information to obtain a maintained API transaction template if the second judgment result is that the transaction template does not exist; A first sending unit, configured to send the maintenance transaction template to the test module for testing according to a preset scheme to obtain a first test result; The device comprises: The first processing subunit is used to send the API document information to the website server to parse the field information of each API interface to obtain a message template; The second processing sub-unit is used to select the test environment version number information, the business category information and the transaction code information in the test scenario information to supplement the message template with data to obtain a maintained API transaction template; The device also includes: A first calling subunit is used to call the historical information of the single API test in the test history module according to the maintained API transaction template; The third processing subunit is used to combine the execution sequence and node position of each API interface test in the historical information of the test, and store the generated business full-link regression transaction template after the combination into a database; A fourth processing subunit is used to adjust the test data information according to the business full-link regression transaction template to obtain adjusted test data; a fifth processing subunit, configured to perform a full-link regression test on the adjusted test data to obtain a third test result; The sixth processing subunit is used to encode the third test result according to the associated system information to obtain a third test result code.

6. The simulation test device of the e-commerce system according to claim 5, characterized in that: The device also includes: a fourth judgment unit, configured to judge whether the scheduled task test is added to the monitoring list if the first judgment result is a scheduled task test; A fifth judgment unit is used for configuring a transaction code for the scheduled test task and adding it to the monitoring list if the scheduled task test is not added to the monitoring list, so as to obtain the scheduled test task added to the monitoring list; A first processing unit is used to match and capture the transaction log in the database according to the transaction code in the scheduled test task added to the monitoring list to obtain a second test result; The second processing unit is used to encode the second test result according to the associated system information to obtain a second test result code.

7. The simulation test device of the e-commerce system according to claim 5, characterized in that: The device comprises: A first detection subunit is used to detect the test type in the first judgment result, and determine the transaction template corresponding to the test type according to the test type, where the transaction template corresponding to the test type includes a transaction template of a single API test type and a transaction template of a service full-link regression test type; The first judgment subunit is used to judge whether there is a transaction template of the single API test type or a transaction template of the business full-link regression test type in the preset transaction template information, and obtain a second judgment result.

8. The simulation test device of the e-commerce system according to claim 5, characterized in that: The device also includes: A third processing unit, configured to encode the first test result according to preset associated system information to obtain a first test result code; a fourth processing unit, configured to classify the first test result code, mark the first test result code as green if the first test result code is a success code, and send the first test result code marked as green to a communication device of a tester; The second sending unit is used for marking the first test result code in red if the first test result code is an error code, and sending the first test result code marked in red and related system information to the communication device of the tester.

9. A simulation test device for an e-commerce system, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the simulation test method for an e-commerce system as claimed in any one of claims 1 to 4 when executing the computer program.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation test method of the e-commerce system according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Automatic interface test method and device, equipment and storage medium

    CN108415832A

  • Interface testing method and device, equipment and storage medium

    CN113312260A