Test system and method
By using automated testing equipment and a virtual single sign-on system, automated testing of business systems is conducted using verification credential information. This solves the security risks and inefficiencies caused by modifying login code in existing technologies, and achieves efficient business system login testing.
Patent Information
- Application Number
- CN202210329007.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In existing technologies, modifying the login code to bypass CAPTCHA verification during login testing of business systems can lead to security vulnerabilities and result in low testing efficiency.
An automated testing device is used to send verification credentials containing the test account to the business system through a browser. A virtual single sign-on system is used for user authentication, bypassing the CAPTCHA test without modifying the login code. Domain name mapping configuration is implemented through a mapping module.
It enables direct login to the business system without modifying the login code, improving testing efficiency, avoiding security risks, and offering flexible configuration.
Smart Images

Figure CN116938481B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of testing technology, and more particularly to a testing system and method. Background Technology
[0002] Single Sign-On (SSO) is a popular solution for enterprise business integration. SSO is defined as allowing users to access all trusted business systems by logging in only once.
[0003] In executing login test cases for business systems, a common challenge is that when simulating user login, the interface usually displays an image or SMS verification code. Test code often struggles to bypass this verification code, leading to inefficient testing.
[0004] To address these issues, existing technologies typically modify the login code to add a login mode that does not require verification codes. However, this method requires modifying the login function code, leaving a backdoor that allows login without verification codes, thus posing a security risk. Summary of the Invention
[0005] This invention provides a testing system and method to address the security risks caused by modifying login code to bypass CAPTCHA verification during the testing of business systems in the prior art, thereby overcoming security risks while improving testing efficiency.
[0006] In a first aspect, the present invention provides a testing system, comprising:
[0007] An automated testing device is used to send an access request to a business system via a browser, the access request carrying verification credentials information of a test account; and to receive a business homepage sent by the business system via a browser, and perform automated testing based on the business homepage.
[0008] The business system is configured to receive the access request, send the verification credential information to the virtual single sign-on system for user authentication, receive user information returned by the virtual single sign-on system, and send the business homepage corresponding to the user information to the browser.
[0009] The virtual single sign-on system is used to receive the verification credential information sent by the business system; determine the user information corresponding to the verification credential information based on the virtual verification strategy; and return the user information to the business system.
[0010] According to the testing system provided by the present invention, the verification credential information is the username of the virtual account.
[0011] According to the testing system provided by the present invention, the virtual single sign-on system is used to directly use the username as the user information corresponding to the verification credential information.
[0012] According to the testing system provided by the present invention, the system further includes:
[0013] The mapping module is used to store the modified domain name mapping information, wherein the verification domain name in the modified domain name mapping information is obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system;
[0014] The business system is used to read the modified domain name mapping information and send the verification credential information to the virtual single sign-on system for user authentication.
[0015] According to the testing system provided by the present invention, the mapping module is decoupled from the business system.
[0016] Secondly, the present invention provides a testing method, comprising:
[0017] The automated testing device sends an access request to the business system through a browser, and the access request carries the verification credentials information of the test account;
[0018] The business system receives the access request and sends the verification credential information to the virtual single sign-on system for user authentication.
[0019] The virtual single sign-on system receives the verification credential information sent by the business system, determines the user information corresponding to the verification credential information based on the virtual verification strategy, and returns the user information to the business system.
[0020] The business system receives the user information returned by the virtual single sign-on system and sends the business homepage corresponding to the user information to the browser;
[0021] The automated testing device receives the business homepage sent by the business system through a browser and performs automated testing based on the business homepage.
[0022] According to the testing method provided by the present invention, the verification credential information is the username of the virtual account.
[0023] According to the testing method provided by the present invention, the step of determining the user information corresponding to the verification credential information based on the virtual verification strategy includes:
[0024] The username is directly used as the user information corresponding to the verification credential information.
[0025] According to the testing method provided by the present invention, before the step of the business system receiving the access request and sending the verification credential information to the virtual single sign-on system for user authentication, the method further includes:
[0026] The modified domain name mapping information is stored through the mapping module. The verification domain name in the modified domain name mapping information is obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system.
[0027] The step of sending the verification credential information to the virtual single sign-on system for user authentication includes:
[0028] The modified domain name mapping information is read, and the verification credential information is sent to the virtual single sign-on system for user authentication.
[0029] According to the testing method provided by the present invention, the mapping module is decoupled from the business system.
[0030] The testing system and method provided by this invention send an access request carrying test account verification credentials to the business system through the browser of the automated testing device. This enables the business system to authenticate the user with a virtual single sign-on system based on the verification credentials. The system then receives user information corresponding to the verification credentials, determined by the virtual single sign-on system based on a virtual verification strategy, and returns the user information to the business system. This allows users to bypass CAPTCHA testing and log in directly to the business system without modifying the login code, thus overcoming security risks and improving testing efficiency. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is one of the architectural diagrams of the testing system provided by the present invention;
[0033] Figure 2 This is the second schematic diagram of the architecture of the testing system provided by the present invention;
[0034] Figure 3 This is one of the flowcharts of the testing method provided by the present invention;
[0035] Figure 4 This is the second flowchart of the testing method provided by the present invention. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0037] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0038] This invention discloses a testing system, such as... Figure 1 As shown, it includes:
[0039] The automated testing device 11 is used to send an access request to the business system through a browser, the access request carrying the verification credential information (ticket) of the test account; and to receive the business homepage sent by the business system through the browser, and perform automated testing based on the business homepage.
[0040] In an embodiment of the present invention, the automated testing device directly carries the ticket in the access request sent by the browser and uses the ticket to perform verification. In this way, without modifying the login function code, the password verification step is eliminated, and thus there is no need to recognize the image verification code.
[0041] In one example, the verification credentials could be the username of the test account. The virtual single sign-on system is actually used to simulate single sign-on verification; it doesn't need to implement the exact same functionality as the production single sign-on system, and correspondingly, the ticket content can be simplified.
[0042] The business system 12 is used to receive the access request, send the verification credential information to the virtual single sign-on system for user authentication, and receive the user information returned by the virtual single sign-on system; and send the business homepage corresponding to the user information to the browser.
[0043] The virtual single sign-on system 13 is used to receive the verification credential information sent by the business system; determine the user information corresponding to the verification credential information based on the virtual verification strategy; and return the user information to the business system.
[0044] In one example, a virtual single sign-on system can directly use the username as the user information corresponding to the verification credentials.
[0045] In this embodiment of the invention, the browser of the automated testing device sends an access request carrying test account verification credentials to the business system. This allows the business system to authenticate the user with the virtual single sign-on system based on the verification credentials. The virtual single sign-on system then receives the user information corresponding to the verification credentials based on the virtual verification strategy and returns the user information to the business system. This allows the user to bypass the CAPTCHA test and log in directly to the business system without modifying the login code, thus overcoming security risks and improving testing efficiency.
[0046] The testing system provided according to embodiments of the present invention, such as Figure 2 As shown, the system also includes:
[0047] The mapping module 14 stores the modified domain name mapping information. The verification domain name in the modified domain name mapping information is obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system. This way, after successful testing, when going live, it is only necessary to change the verification domain name back to the domain name of the single sign-on system, making switching very convenient.
[0048] If the system also includes a mapping module 14, the business system 12 is specifically used to read the modified domain name mapping information and send the verification credential information to the virtual single sign-on system for user authentication.
[0049] In one example, the mapping module is decoupled from the business system. This allows for flexible configuration and avoids code intrusion.
[0050] In this embodiment of the invention, the testing system further includes a mapping module, which stores domain name mapping information obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system. The business system reads the modified domain name mapping information from the mapping module, enabling the sending of verification credentials to the virtual single sign-on system for user authentication. This bypasses CAPTCHA testing and allows direct login to the business system without modifying the login code, overcoming security vulnerabilities while improving testing efficiency.
[0051] This invention discloses a testing method, see [link to relevant documentation]. Figure 3 ,include:
[0052] Step S301: The automated testing device sends an access request to the business system through a browser. The access request carries the verification credentials information of the test account.
[0053] Specifically, the access request is generated through the following steps: receiving the business system address entered in the browser and entering the business system; if it is detected that the user is not logged into the business system, redirecting to the login page of the business system; and generating the access request based on the information entered by the user on the login page.
[0054] The verification credentials for the test account carried in the access request are generated based on user information, which can include various types such as username and password.
[0055] In one specific implementation, the verification credentials can be the username of the test account.
[0056] Step S302: The business system receives the access request and sends the verification credential information to the virtual single sign-on system for user authentication.
[0057] Step S303: The virtual single sign-on system receives the verification credential information sent by the business system, determines the user information corresponding to the verification credential information based on the virtual verification strategy, and returns the user information to the business system.
[0058] Step S304: The business system receives the user information returned by the virtual single sign-on system and sends the business homepage corresponding to the user information to the browser.
[0059] Step S305: The automated testing device receives the business homepage sent by the business system through a browser and performs automated testing based on the business homepage.
[0060] For example, user Wang Wu accesses the business system through a browser and generates an access request upon requesting to log in to the business system. This access request carries verification credentials for the username "wangwu".
[0061] In one specific implementation, before the business system receives an access request and sends verification credential information to the virtual single sign-on system for user authentication, a mapping module can store modified domain name mapping information. The verification domain name in the modified domain name mapping information is obtained by modifying the domain name in the single sign-on system to the domain name in the virtual single sign-on system. The mapping module can be decoupled from the business system. The business system can read the modified domain name mapping information and send the verification credential information to the virtual single sign-on system for user authentication.
[0062] The virtual single sign-on system parses user authentication requests, obtains the authentication credentials, and generates corresponding authentication success information.
[0063] In one specific implementation, the virtual single sign-on system directly uses the username as the user information corresponding to the verification credential information without verifying the verification credential information, and returns verification success information to the business system, thereby enabling the business system to log in without performing CAPTCHA verification.
[0064] Specifically, the verification information includes the verification credentials information used as the username. For example, if the user authentication request sent by the business system is http: / / biz.com?ticket=wangwu, the virtual single sign-on system does not need to perform user authentication. Instead, it directly returns "wangwu" as the verification information to the business system, so that the business system will be redirected to the business homepage after logging in as "wangwu".
[0065] After logging into the business system, the content of the business homepage is sent to the browser so that the browser can load the business homepage content.
[0066] The business homepage can include various types of content, such as text, images, ActiveX controls, hyperlinks, etc.
[0067] Specifically, see Figure 4 The method includes:
[0068] Step 401: The user enters the business system address in the browser.
[0069] Step 402: The browser sends an access request to the business system, wherein the access request carries verification credential information.
[0070] Specifically, the access request is generated through the following steps: the browser receives the business system address entered by the user and enters the business system; if the browser detects that the user is not logged into the business system, it redirects to the login page of the business system; the browser generates the access request based on the information entered by the user on the login page.
[0071] The verification credentials carried in the access request are generated based on user information, which can include various types such as username and password.
[0072] In one specific implementation, the verification credential information can be carried as the username in the access request.
[0073] For example, user Zhang San accesses the business system through a browser and generates an access request when requesting to log in to the business system. This access request carries authentication credentials for the username "zhangsan".
[0074] Step 403: The business system requests user authentication from the virtual single sign-on system based on the verification credential information.
[0075] In this embodiment, the virtual single sign-on system provides login verification services. In the case of multiple business systems, users only need to log in once to access all mutually trusted business systems.
[0076] A virtual single sign-on system can run on a server. The server can be a rack server, blade server, tower server, or cabinet server, etc. The server can be a standalone server or a server cluster composed of multiple servers.
[0077] In this embodiment, a fake virtual single sign-on (SSO) system needs to be built to perform domain name mapping on the business system, mapping the SSO domain name in the business system to the fake SSO system, so that the login code does not need to be modified.
[0078] Step 404: The virtual single sign-on system receives the user authentication request sent by the business system and generates authentication pass information without verifying the authentication credential information.
[0079] The user authentication request includes verification credential information as the username. The virtual single sign-on system parses the user authentication request, obtains the verification credential information, and generates the corresponding verification pass information.
[0080] Through the processing in step 404, the virtual single sign-on system can directly generate verification pass information based on the verification credential information as the username when it receives the verification credential information, thus eliminating the need to verify the verification credential information. Compared with existing technologies, users no longer need to enter a username, password, and verification code, thereby reducing the complexity of login testing in business systems and making it simple to use.
[0081] Step 405: The virtual single sign-on system returns verification information to the business system.
[0082] Specifically, if the user authentication request sent by the business system is http: / / biz.com?ticket=zhangsan, the virtual single sign-on system does not need to perform user authentication. Instead, it directly returns zhangsan as the authentication pass information to the business system, so that the business system will log in as zhangsan and return to the business homepage.
[0083] Step 406: The business system sends the business homepage corresponding to the access request to the browser.
[0084] After logging into the business system, the content of the business homepage is sent to the browser so that the browser can load the business homepage content.
[0085] The business homepage can include various types of content, such as text, images, ActiveX controls, hyperlinks, etc.
[0086] Step 407: The browser receives and displays the business homepage sent by the business system, which corresponds to the access request.
[0087] The login testing method provided in this invention sends an access request carrying verification credential information to the business system through a browser. This allows the business system to request user authentication from a virtual single sign-on system based on the verification credential information. The method also receives a verification pass message returned by the virtual single sign-on system without verifying the verification credential information. This bypasses CAPTCHA testing and allows direct login to the business system. Furthermore, only the mapped virtual single sign-on system needs to be modified in the business system, without modifying the login code. This overcomes security risks while improving testing efficiency.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A testing system, characterized in that, include: An automated testing device is used to send access requests to a business system via a browser, the access requests carrying verification credentials information of the test account; And a tool for receiving the business homepage sent by the business system through a browser, and performing automated testing based on the business homepage; The mapping module is used to store the modified domain name mapping information, wherein the verification domain name in the modified domain name mapping information is obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system; After the test is passed, the verification domain will be changed back to the domain of the single sign-on system; The business system is used to receive the access request and read the modified domain name mapping information, send the verification credential information to the virtual single sign-on system for user authentication, and receive the user information returned by the virtual single sign-on system. And send the service homepage corresponding to the user information to the browser; The virtual single sign-on system is used to receive the verification credential information sent by the business system; simulate the user information corresponding to the verification credential information based on the virtual verification strategy; and return the user information to the business system.
2. The testing system according to claim 1, characterized in that, The verification credentials are the username of the test account.
3. The testing system according to claim 2, characterized in that, The virtual single sign-on system is used to directly use the username as the user information corresponding to the verification credential information.
4. The testing system according to claim 1, characterized in that, The mapping module is decoupled from the business system.
5. A testing method, characterized in that, include: The automated testing device sends an access request to the business system through a browser, and the access request carries the verification credentials information of the test account; The modified domain name mapping information is stored through the mapping module. The verification domain name in the modified domain name mapping information is obtained by modifying the domain name of the single sign-on system to the domain name of the virtual single sign-on system. The business system receives the access request and sends the verification credential information to the virtual single sign-on system for user authentication, including: the business system reads the modified domain name mapping information and sends the verification credential information to the virtual single sign-on system for user authentication; The virtual single sign-on system receives the verification credential information sent by the business system, simulates user information corresponding to the verification credential information based on the virtual verification strategy, and returns the user information to the business system. The business system receives the user information returned by the virtual single sign-on system and sends the business homepage corresponding to the user information to the browser; The automated testing device receives the business homepage sent by the business system through a browser and performs automated testing based on the business homepage. After the test is passed, the verification domain will be changed back to the domain of the single sign-on system.
6. The test method according to claim 5, characterized in that, The verification credentials are the username of the test account.
7. The test method according to claim 6, characterized in that, The steps of the virtual single sign-on system to determine the user information corresponding to the verification credential information based on the virtual verification strategy include: The virtual single sign-on system directly uses the username as the user information corresponding to the verification credential information.
8. The test method according to claim 5, characterized in that, The mapping module is decoupled from the business system.
Citation Information
Patent Citations
Dynamic domain name distribution method and system based on mobile phone APP
CN113014690A
Business system login test method, device, equipment and medium
CN114238148A