Check code simulation system used in test environment
By designing a verification code simulation system for testing environments, the problem of insufficient user serial number resources in the registration/login server functional test is solved, and the use of virtual user serial number is realized for testing, reducing the difficulty of testing and improving efficiency.
Patent Information
- Application Number
- CN202411793474.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
When developing the registration/login server, it is necessary to perform functional tests on the SMS verification code login function, but due to the need for a large number of real user numbers (such as mobile phone numbers and email addresses), it is difficult to implement actual testing.
Design a verification code simulation system for testing environments, which includes a verification code sending simulation interface, a verification code verification simulation interface, a verification code query simulation interface, a simulation control module and a verification code cache queue. Through these interfaces and modules, the real verification code sending and verification process can be simulated in the test environment.
By using the verification code simulation system, a large number of virtual user serial numbers can be used for testing in the test environment, solving the problem of insufficient resource for real user serial numbers, reducing the difficulty of testing and improving the testing efficiency.
Smart Images

Figure CN119718923A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a verification code simulation system used in a test environment. Background Art
[0002] Conventional registration / login servers, such as registration / login services, registration / login servers, registration / login systems, registration / login platforms, etc., are mostly required to support SMS verification code login. The so-called SMS verification code login method actually means that the registration / login server is connected to an independent SMS verification code server, and when the user registers / logs in, the SMS verification code server is called to send a real SMS verification code to the current registered / logged in user serial number (such as the mobile phone number used for registration / login, the email address used for registration / login, etc.), and after receiving the verification code submitted by the user, the SMS verification code server is called to verify the verification code submitted by the current registered / logged in user.
[0003] When developing this type of registration / login server, it is necessary to perform functional testing on the SMS verification code login function of the server. From the above functional implementation description, it can be seen that if the registration / login server is still connected to the SMS verification code server, then a large number of real user serial numbers (such as a large number of real mobile phone numbers and a large number of real email addresses) need to be prepared during this functional testing process. However, in the actual testing process, everyone will find that this is difficult to achieve.
[0004] To solve this problem, we provide a simulation system solution, that is, designing a verification code simulation system for use in a test environment to replace the SMS verification code server that must have a real serial number, and connect it to the test end. On the registration / login server side, the simulation system has no difference in processing interface from a regular SMS verification code server; but on the test end, the simulation system will additionally provide a verification code query interface to simulate the verification code receiving action in a real environment. Based on this simulation system solution, a large number of virtual user serial numbers can be used for testing, solving the problem of insufficient user serial number resources under conventional test conditions. The specific implementation scheme of this simulation system is also the technical implementation scheme provided by the present invention. Summary of the invention
[0005] The purpose of the present invention is to address the defects of the prior art and provide a verification code simulation system for use in a test environment. The system includes: a verification code sending simulation interface, a verification code verification simulation interface, a verification code query simulation interface, a simulation control module and a verification code cache queue. Among them, the verification code sending simulation interface is used to forward the first verification code sending request sent by the registration / login server to the simulation control module, and send the first sending status sent back by the simulation control module to the registration / login server; the verification code verification simulation interface is used to forward the first verification code verification request sent by the registration / login server to the simulation control module, and send the first verification status sent back by the simulation control module to the registration / login server; the verification code query simulation interface is used to forward the first verification code query request sent by the test end to the simulation control module, and send the first query verification code sent back by the simulation control module to the test end; the simulation control module is used to perform verification code generation processing according to the first verification code sending request and the verification code cache queue and send the corresponding first sending status to the verification code sending simulation interface based on the processing status setting, and is also used to perform verification code verification processing according to the first verification code verification request and the verification code cache queue and send the corresponding first verification status to the verification code verification simulation interface based on the processing status setting, and is also used to perform verification code query processing according to the first verification code query request and the verification code cache queue to obtain the corresponding first query verification code and send it back to the verification code query simulation interface; the verification code cache queue is used to store multiple verification code cache records. The verification code simulation system provided by the present invention can use a large number of virtual user serial numbers for testing, thereby solving the problem of insufficient user serial number resources under conventional testing conditions.
[0006] To achieve the above-mentioned purpose, an embodiment of the present invention provides a verification code simulation system for use in a test environment, the system comprising: a verification code sending simulation interface, a verification code verification simulation interface, a verification code query simulation interface, a simulation control module and a verification code cache queue;
[0007] The simulation control module is connected to the verification code sending simulation interface, the verification code verification simulation interface, the verification code query simulation interface and the verification code cache queue respectively; the verification code sending simulation interface and the verification code verification simulation interface are also connected to the registration / login service end outside the system; the verification code query simulation interface is also connected to the test end outside the system;
[0008] The verification code sending simulation interface is used to forward the first verification code sending request sent by the registration / login server to the simulation control module; and send the first sending status sent back by the simulation control module back to the registration / login server;
[0009] The verification code verification simulation interface is used to forward the first verification code verification request sent by the registration / login server to the simulation control module; and send the first verification status sent back by the simulation control module back to the registration / login server;
[0010] The verification code query simulation interface is used to forward the first verification code query request sent by the test end to the simulation control module; and send the first query verification code sent back by the simulation control module back to the test end;
[0011] The simulation control module is used for, upon receiving the first verification code sending request, performing verification code generation processing according to the first verification code sending request and the verification code cache queue to obtain a corresponding first processing state; and identifying whether the first processing state is successful, if so, setting the corresponding first sending state to a successful sending, otherwise setting the corresponding first sending state to a failed sending; and sending the first sending state that has been set to the verification code sending simulation interface; the first processing state includes success and failure;
[0012] The simulation control module is also used to, upon receiving the first verification code verification request, perform verification code verification processing according to the first verification code verification request and the verification code cache queue to obtain a corresponding second processing state; and identify whether the second processing state is successful, if so, set the corresponding first verification state to verification success, otherwise, set the corresponding first verification state to verification failure; and send the first verification state that has been set to the verification code verification simulation interface; the second processing state includes success and failure;
[0013] The simulation control module is also used for, upon receiving the first verification code query request, performing verification code query processing according to the first verification code query request and the verification code cache queue to obtain a corresponding first query result; and identifying whether the first query result is empty, if so, setting the corresponding first query verification code to a preset query failure prompt message, if otherwise, setting the corresponding first query verification code to the first query result; and sending the first query verification code that has been set to the verification code query simulation interface;
[0014] The verification code cache queue is used to store multiple verification code cache records; the verification code cache record includes a first timestamp, a first user serial number, a first serial number type and a first simulation code; the first serial number type includes a mobile phone number and an email address.
[0015] Preferably, the first verification code sending request includes a registration / login user serial number and a registration / login serial number type; the registration / login serial number type includes a mobile phone number and an email address;
[0016] The first verification code verification request includes verifying the user serial number, verifying the serial number type and the user verification code; the verification serial number type includes a mobile phone number and an email address;
[0017] The first verification code query request includes querying the user serial number and querying the serial number type; the query serial number type includes a mobile phone number and an email address.
[0018] Preferably, the simulation control module is specifically used to extract the corresponding registration / login user serial number and the registration / login serial number type from the first verification code sending request when the verification code generation processing is performed according to the first verification code sending request and the verification code cache queue to obtain the corresponding first processing state; and perform a random verification code generation processing based on a preset random verification code generation algorithm to obtain the corresponding first verification code; and use the current time as the corresponding first timestamp; and use the registration / login user serial number, the registration / login serial number type and the first verification code as the corresponding first user serial number, the first serial number type and the first simulation code; and form a corresponding verification code cache record composed of the first timestamp, the first user serial number, the first serial number type and the first simulation code obtained this time, and add it to the verification code cache queue; and identify the addition completion status of the record added this time, if the addition completion status is successful addition, set the corresponding first processing status to success, if the addition completion status is failed addition, set the corresponding first processing status to failure.
[0019] Preferably, the simulation control module is specifically used to extract the corresponding verification user serial number, the verification serial number type and the user verification code from the first verification code verification request when the verification code verification processing is performed according to the first verification code verification request and the verification code cache queue to obtain the corresponding second processing state; and record the verification code cache record in the verification code cache queue in which the first user serial number matches the verification user serial number and the first serial number type matches the verification serial number type as the corresponding first matching record; and identify the total number of the first matching records; if the total number of the first matching records is zero, set the corresponding second processing state to failure; if the total number of the first matching records is greater than zero, set the first matching record in which the first timestamp is closest to the current time as the corresponding current matching record, and identify whether the first simulation code of the current matching record matches the user verification code, if not, set the corresponding second processing state to failure, if match, set the corresponding second processing state to success.
[0020] Preferably, the simulation control module is specifically used to extract the corresponding query user serial number and the query serial number type from the first verification code query request when the verification code query processing is performed according to the first verification code query request and the verification code cache queue to obtain the corresponding first query result; and record the verification code cache record in the verification code cache queue in which the first user serial number matches the query user serial number and the first serial number type matches the query serial number type as the corresponding second matching record; and identify the total number of the second matching records; if the total number of the second matching records is zero, set the corresponding first query result to empty; if the total number of the second matching records is greater than zero, set the second matching record in which the first timestamp is closest to the current time as the corresponding current matching record, and set the first simulation code of the current matching record as the corresponding first query result.
[0021] The embodiment of the present invention provides a verification code simulation system for use in a test environment, the system comprising: a verification code sending simulation interface, a verification code verification simulation interface, a verification code query simulation interface, a simulation control module and a verification code cache queue. Among them, the verification code sending simulation interface is used to forward the first verification code sending request sent by the registration / login server to the simulation control module, and send the first sending status sent back by the simulation control module to the registration / login server; the verification code verification simulation interface is used to forward the first verification code verification request sent by the registration / login server to the simulation control module, and send the first verification status sent back by the simulation control module to the registration / login server; the verification code query simulation interface is used to forward the first verification code query request sent by the test end to the simulation control module, and send the first query verification code sent back by the simulation control module to the test end; the simulation control module is used to perform verification code generation processing according to the first verification code sending request and the verification code cache queue and send the corresponding first sending status to the verification code sending simulation interface based on the processing status setting, and is also used to perform verification code verification processing according to the first verification code verification request and the verification code cache queue and send the corresponding first verification status to the verification code verification simulation interface based on the processing status setting, and is also used to perform verification code query processing according to the first verification code query request and the verification code cache queue to obtain the corresponding first query verification code and send it back to the verification code query simulation interface; the verification code cache queue is used to store multiple verification code cache records. The verification code simulation system provided by the embodiment of the present invention can use a large number of virtual user serial numbers for testing, thereby solving the problem of insufficient user serial number resources under conventional testing conditions, reducing testing difficulty, and improving testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A module structure diagram of a verification code simulation system for use in a test environment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] like Figure 1 As shown in the module structure diagram of a verification code simulation system for use in a test environment provided by an embodiment of the present invention, a verification code simulation system 1 for use in a test environment provided by an embodiment of the present invention mainly includes: a verification code sending simulation interface 11, a verification code verification simulation interface 12, a verification code query simulation interface 13, a simulation control module 14 and a verification code cache queue 15.
[0025] The connection relationship of each system component of the embodiment of the present invention is as follows: the simulation control module 14 is respectively connected to the verification code sending simulation interface 11, the verification code verification simulation interface 12, the verification code query simulation interface 13 and the verification code cache queue 15. The verification code sending simulation interface 11 and the verification code verification simulation interface 12 are also connected to the registration / login server 2 outside the system. The verification code query simulation interface 13 is also connected to the test terminal 3 outside the system. And the test terminal 3 is also connected to the registration / login server 2.
[0026] (I) Verification code sending simulation interface 11:
[0027] The verification code sending simulation interface 11 of the embodiment of the present invention is used to forward the first verification code sending request sent by the registration / login server 2 to the simulation control module 14; and send the first sending status sent back by the simulation control module 14 back to the registration / login server 2.
[0028] Here, the first verification code sending request in the embodiment of the present invention includes a registration / login user serial number and a registration / login serial number type; wherein the registration / login serial number type includes a mobile phone number and an email address.
[0029] It should be noted that, as will be known below, after receiving the first verification code sending request, the simulation control module 14 will generate a corresponding verification code and store it in the verification code cache queue 15, but will not actually send the generated verification code.
[0030] (II) Verification code verification simulation interface 12:
[0031] The verification code verification simulation interface 12 of the embodiment of the present invention is used to forward the first verification code verification request sent by the registration / login server 2 to the simulation control module 14; and send the first verification status sent back by the simulation control module 14 to the registration / login server 2.
[0032] Here, the first verification code verification request of the embodiment of the present invention includes verifying the user serial number, verifying the serial number type and the user verification code; wherein the verifying serial number type includes a mobile phone number and an email address.
[0033] It should be noted that, as will be known below, after receiving the first verification code verification request, the simulation control module 14 will compare and verify the user verification code in the current request based on the cache records in the verification code cache queue 15 .
[0034] (III) Verification code query simulation interface 13:
[0035] The verification code query simulation interface 13 of the embodiment of the present invention is used to forward the first verification code query request sent by the test terminal 3 to the simulation control module 14; and send the first query verification code sent back by the simulation control module 14 back to the test terminal 3.
[0036] Here, the first verification code query request in the embodiment of the present invention includes querying the user serial number and querying the serial number type; wherein the query serial number type includes a mobile phone number and an email address.
[0037] It should be noted that, as will be known below, after receiving the first verification code query request, the simulation control module 14 will retrieve the corresponding verification code from the verification code cache queue 15 and return it. In this way, the test terminal 3 is equivalent to receiving a virtual SMS with verification code information from the verification code simulation system 1.
[0038] (IV) Simulation control module 14:
[0039] The simulation control module 14 of the embodiment of the present invention is used to, when receiving a first verification code sending request, perform verification code generation processing according to the first verification code sending request and the verification code cache queue 15 to obtain a corresponding first processing state; and identify whether the first processing state is successful, if so, set the corresponding first sending state to successful sending, otherwise set the corresponding first sending state to failed sending; and send the set first sending state back to the verification code sending simulation interface 11; wherein the first processing state includes success and failure.
[0040] The simulation control module 14 of the embodiment of the present invention is also used to, when receiving a first verification code verification request, perform verification code verification processing according to the first verification code verification request and the verification code cache queue 15 to obtain a corresponding second processing state; and identify whether the second processing state is successful, if so, set the corresponding first verification state to successful verification, otherwise set the corresponding first verification state to failed verification; and send the completed first verification state back to the verification code verification simulation interface 12; wherein the second processing state includes success and failure.
[0041] The simulation control module 14 of the embodiment of the present invention is also used to, when receiving a first verification code query request, perform verification code query processing according to the first verification code query request and the verification code cache queue 15 to obtain a corresponding first query result; and identify whether the first query result is empty, if so, set the corresponding first query verification code to the preset query failure prompt information, otherwise set the corresponding first query verification code to the first query result; and send the set first query verification code back to the verification code query simulation interface 13.
[0042] In a specific implementation of the embodiment of the present invention, the simulation control module 14 is specifically configured to, when a verification code generation process is performed according to the first verification code sending request and the verification code cache queue 15 to obtain a corresponding first processing state:
[0043] Step A1, extracting the corresponding registration / login user serial number and registration / login serial number type from the first verification code sending request;
[0044] Step A2, performing a random check code generation process based on a preset random check code generation algorithm to obtain a corresponding first check code;
[0045] Here, the random check code generation algorithm of the embodiment of the present invention can be customized based on application requirements, and any conventional or commercial check code generation algorithm can also be used;
[0046] Step A3, and use the current time as the corresponding first timestamp; and use the registration / login user serial number, the registration / login serial number type and the first verification code as the corresponding first user serial number, the first serial number type and the first simulation code;
[0047] Step A4, a corresponding verification code cache record is formed by the first timestamp, the first user serial number, the first serial number type and the first simulation code obtained this time and added to the verification code cache queue 15;
[0048] Step A5, and identify the adding completion status of this record adding, if the adding completion status is adding success, set the corresponding first processing status to success, if the adding completion status is adding failure, set the corresponding first processing status to failure.
[0049] In another specific implementation of the embodiment of the present invention, the simulation control module 14 is specifically configured to, when performing verification code verification processing according to the first verification code verification request and the verification code cache queue 15 to obtain a corresponding second processing state:
[0050] Step B1, extracting the corresponding verification user serial number, verification serial number type and user verification code from the first verification code verification request;
[0051] Step B2, and record the verification code cache record in the verification code cache queue 15, in which the first user serial number matches the verification user serial number and the first serial number type matches the verification serial number type, as the corresponding first matching record;
[0052] Step B3, identifying the total number of first matching records;
[0053] Step B4, if the total number of first matching records is zero, setting the corresponding second processing state to failure;
[0054] Step B5, if the total number of first matching records is greater than zero, the first matching record whose first timestamp is closest to the current time is taken as the corresponding current matching record, and it is identified whether the first simulation code of the current matching record matches the user verification code. If they do not match, the corresponding second processing state is set to failure; if they match, the corresponding second processing state is set to success.
[0055] In another specific implementation of the embodiment of the present invention, the simulation control module 14 is specifically configured to, when performing verification code query processing according to the first verification code query request and the verification code cache queue 15 to obtain a corresponding first query result:
[0056] Step C1, extracting the corresponding query user serial number and query serial number type from the first verification code query request;
[0057] Step C2, and record the verification code cache record in the verification code cache queue 15, in which the first user serial number matches the query user serial number and the first serial number type matches the query serial number type, as the corresponding second matching record;
[0058] Step C3, identifying the total number of second matching records;
[0059] Step C4, if the total number of second matching records is zero, setting the corresponding first query result to empty;
[0060] Step C5: if the total number of second matching records is greater than zero, the second matching record whose first timestamp is closest to the current time is used as the corresponding current matching record, and the first simulation code of the current matching record is used as the corresponding first query result.
[0061] (V) Verification code cache queue 15:
[0062] The verification code cache queue 15 of the embodiment of the present invention is used to store multiple verification code cache records; wherein the verification code cache record includes a first timestamp, a first user serial number, a first serial number type and a first simulation code; the first serial number type includes a mobile phone number and an email address.
[0063] The check code cache queue 15 of the embodiment of the present invention is used to regularly delete the check code cache records whose time difference between the first timestamp in the queue and the current time exceeds a preset first time difference threshold according to a preset first time frequency. Here, the first time frequency is a preset time frequency parameter, and the first time difference threshold is a preset time length parameter.
[0064] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the verification code sending simulation interface can be a separately established processing element, or it can be integrated in a chip of the above-mentioned device for implementation. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned system. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each method step of the aforementioned method or each module processing step of the aforementioned system can be completed by an integrated logic circuit of hardware in a processor element or instructions in the form of software.
[0065] For example, the modules of the above system may be one or more integrated circuits configured to implement the aforementioned method, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module of the above system is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0066] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above method embodiments are generated. The above computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) methods. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0067] The embodiment of the present invention provides a verification code simulation system for use in a test environment, the system comprising: a verification code sending simulation interface, a verification code verification simulation interface, a verification code query simulation interface, a simulation control module and a verification code cache queue. Among them, the verification code sending simulation interface is used to forward the first verification code sending request sent by the registration / login server to the simulation control module, and send the first sending status sent back by the simulation control module to the registration / login server; the verification code verification simulation interface is used to forward the first verification code verification request sent by the registration / login server to the simulation control module, and send the first verification status sent back by the simulation control module to the registration / login server; the verification code query simulation interface is used to forward the first verification code query request sent by the test end to the simulation control module, and send the first query verification code sent back by the simulation control module to the test end; the simulation control module is used to perform verification code generation processing according to the first verification code sending request and the verification code cache queue and send the corresponding first sending status to the verification code sending simulation interface based on the processing status setting, and is also used to perform verification code verification processing according to the first verification code verification request and the verification code cache queue and send the corresponding first verification status to the verification code verification simulation interface based on the processing status setting, and is also used to perform verification code query processing according to the first verification code query request and the verification code cache queue to obtain the corresponding first query verification code and send it back to the verification code query simulation interface; the verification code cache queue is used to store multiple verification code cache records. The verification code simulation system provided by the embodiment of the present invention can use a large number of virtual user serial numbers for testing, thereby solving the problem of insufficient user serial number resources under conventional testing conditions, reducing testing difficulty, and improving testing efficiency.
[0068] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0069] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0070] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A verification code simulation system for use in a test environment, characterized in that: The system comprises: a check code sending simulation interface, a check code verification simulation interface, a check code query simulation interface, a simulation control module and a check code buffer queue; The simulation control module is connected to the verification code sending simulation interface, the verification code verification simulation interface, the verification code query simulation interface and the verification code cache queue respectively; the verification code sending simulation interface and the verification code verification simulation interface are also connected to the registration / login service end outside the system; the verification code query simulation interface is also connected to the test end outside the system; The verification code sending simulation interface is used to forward the first verification code sending request sent by the registration / login server to the simulation control module; and send the first sending status sent back by the simulation control module back to the registration / login server; The verification code verification simulation interface is used to forward the first verification code verification request sent by the registration / login server to the simulation control module; and send the first verification status sent back by the simulation control module back to the registration / login server; The verification code query simulation interface is used to forward the first verification code query request sent by the test end to the simulation control module; and send the first query verification code sent back by the simulation control module back to the test end; The simulation control module is used for, upon receiving the first verification code sending request, performing verification code generation processing according to the first verification code sending request and the verification code cache queue to obtain a corresponding first processing state; and identifying whether the first processing state is successful, if so, setting the corresponding first sending state to a successful sending, otherwise setting the corresponding first sending state to a failed sending; and sending the first sending state that has been set to the verification code sending simulation interface; the first processing state includes success and failure; The simulation control module is also used to, upon receiving the first verification code verification request, perform verification code verification processing according to the first verification code verification request and the verification code cache queue to obtain a corresponding second processing state; and identify whether the second processing state is successful, if so, set the corresponding first verification state to verification success, otherwise, set the corresponding first verification state to verification failure; and send the first verification state that has been set to the verification code verification simulation interface; the second processing state includes success and failure; The simulation control module is also used for, upon receiving the first verification code query request, performing verification code query processing according to the first verification code query request and the verification code cache queue to obtain a corresponding first query result; and identifying whether the first query result is empty, if so, setting the corresponding first query verification code to a preset query failure prompt message, if otherwise, setting the corresponding first query verification code to the first query result; and sending the first query verification code that has been set to the verification code query simulation interface; The verification code cache queue is used to store multiple verification code cache records; the verification code cache record includes a first timestamp, a first user serial number, a first serial number type and a first simulation code; the first serial number type includes a mobile phone number and an email address.
2. The verification code simulation system for use in a test environment according to claim 1, characterized in that: The first verification code sending request includes a registration / login user serial number and a registration / login serial number type; the registration / login serial number type includes a mobile phone number and an email address; The first verification code verification request includes verifying the user serial number, verifying the serial number type and the user verification code; the verification serial number type includes a mobile phone number and an email address; The first verification code query request includes querying the user serial number and querying the serial number type; The query serial number types include mobile phone numbers and email addresses.
3. The verification code simulation system for use in a test environment according to claim 2, characterized in that: The simulation control module is specifically used for extracting the corresponding registration / login user serial number and the registration / login serial number type from the first verification code sending request when the verification code generation process is performed according to the first verification code sending request and the verification code cache queue to obtain the corresponding first processing state; And performing a random check code generation process based on a preset random check code generation algorithm to obtain a corresponding first check code; and taking the current time as the corresponding first timestamp; and taking the registration / login user serial number, the registration / login serial number type and the first verification code as the corresponding first user serial number, the first serial number type and the first simulation code; The first timestamp, the first user serial number, the first serial number type and the first simulation code obtained this time form a corresponding verification code cache record and add it to the verification code cache queue; and the addition completion status of this record is identified, if the addition completion status is successful, the corresponding first processing status is set to success, if the addition completion status is failed, the corresponding first processing status is set to failure.
4. The verification code simulation system for use in a test environment according to claim 2, characterized in that: The simulation control module is specifically used for extracting the corresponding verification user serial number, the verification serial number type and the user verification code from the first verification code verification request when the verification code verification processing is performed according to the first verification code verification request and the verification code cache queue to obtain the corresponding second processing state; and recording the verification code cache record in the verification code cache queue in which the first user serial number matches the verification user serial number and the first serial number type matches the verification serial number type as the corresponding first matching record; and identifying the total number of the first matching records; if the total number of the first matching records is zero, setting the corresponding second processing state to failure; if the total number of the first matching records is greater than zero, setting the first matching record in which the first timestamp is closest to the current time as the corresponding current matching record, and identifying whether the first simulation code of the current matching record matches the user verification code, if not, setting the corresponding second processing state to failure, and if matching, setting the corresponding second processing state to success.
5. The verification code simulation system for use in a test environment according to claim 2, characterized in that: The simulation control module is specifically used for extracting the corresponding query user serial number and the query serial number type from the first verification code query request when the verification code query processing is performed according to the first verification code query request and the verification code cache queue to obtain the corresponding first query result; And the verification code cache record in the verification code cache queue in which the first user serial number matches the query user serial number and the first serial number type matches the query serial number type is recorded as the corresponding second matching record; and the total number of the second matching records is identified; if the total number of the second matching records is zero, the corresponding first query result is set to empty; if the total number of the second matching records is greater than zero, the second matching record in which the first timestamp is closest to the current time is taken as the corresponding current matching record, and the first simulation code of the current matching record is taken as the corresponding first query result.
Citation Information
Cited By
Method and device for verifying short message login function, equipment, medium and program product
CN120456024A