An automated testing method and system for marketing application loans
By extracting public fields and splitting loan data, the user's basic data and loan business data are decoupled, solving the problems of low testing efficiency and high error rate in the existing technology, and improving the efficiency and accuracy of marketing entry loan testing.
Patent Information
- Application Number
- CN202111483815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-12-07
AI Technical Summary
When conducting marketing and entry loan tests in third-party systems outside the bank, there are problems such as unstable environment, many obstacles, complex loan data preparation, and high communication costs, resulting in low testing efficiency and high error rates.
By obtaining interface request messages, extracting public fields, and splitting loan data into user basic data and loan business data, storing and decoupling respectively, achieving flexible generation and automatic update of test data.
It realizes complete decoupling of user basic data and loan service data, improves the efficiency of interface testing, and reduces the error rate of manual modification request packets.
Smart Images

Figure CN114255118B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated testing, and in particular relates to an automated testing method and system for marketing application loans. Background Art
[0002] In the business scenario of initiating a loan application from a third-party system outside the bank, there are problems such as unstable external system environment, many resistance testing problems, complex loan data preparation, and high communication costs, resulting in low testing efficiency and slow progress; the general interface automatic series operation requires initiating operations such as loan applications through a single interface, manually modifying the message content, and manually obtaining the interface response message as the request message of the next interface for interface series connection, which is inefficient and has a high error rate; the request transaction message is split and extracted according to keywords, and the request message is generated by matching the test data through transaction scenarios. Since the request messages come from multiple different types of data sources and are coupled with each other, the loan data cannot be flexibly modified.
[0003] The testers used a third-party system outside the bank to manually initiate loan applications, and the loan approval was automated. The full-process automated testing method was not adopted, and problems such as unstable environment, many test obstacles, complex loan data preparation, and high communication costs were not avoided. Summary of the invention
[0004] The purpose of the present invention is to circumvent third-party systems outside the bank, directly initiate loan-related transactions, and simulate the generation of loan data from the bank's internal system; extract common fields between interfaces, split and decouple loan data, and abstract data models, so that testers can flexibly generate test data for different scenarios.
[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0006] Obtaining a request message of an interface and extracting common fields, wherein the interface includes loan application, contract signing, withdrawal and repayment, and is arranged in a serial order; the common fields include the applicant's name, gender, ID number, loan application amount, loan product type, assets and salary;
[0007] Obtain loan data, split the loan data into user basic data and loan business data, and store them separately in a data storage system;
[0008] Configuring the common fields to the user basic data and the loan business data;
[0009] Receive a test message, encrypt the test message, generate a corresponding picture verification code according to the test message, and send the test message to the interface for testing;
[0010] Determine the maximum loan approval amount according to the applicant's assets, salary information and corresponding loan product type included in the test message, and judge whether the loan amount applied for by the applicant is less than or equal to the loan approval amount;
[0011] When it is determined that the loan amount applied for by the applicant is less than or equal to the maximum loan approval amount, the loan application of the applicant is determined to be approved, loan approval information is generated, and the loan approval information is fed back;
[0012] When it is determined that the loan amount applied for by the applicant is greater than the loan approval limit, it is determined that the applicant's loan application has not been approved, loan approval failure information is generated, and the maximum loan approval limit and loan approval failure information are fed back;
[0013] If the applicant is changed, the basic user data will be changed, the loan business data will remain unchanged, and all interface test messages will be automatically updated;
[0014] If the loan business data is changed, the basic user data remains unchanged. If the loan business data is changed, all interface test messages are automatically updated.
[0015] Furthermore, the basic user information includes the user's name, gender, ID number and loan application amount; the loan business information includes loan product type, assets and salary.
[0016] Furthermore, it also includes extracting the birth date number segment of the applicant's ID number in the user basic data to determine whether the applicant is an adult. If the applicant is a minor, feedback is given that the loan approval has not been passed.
[0017] Furthermore, an OCR recognition method is used to recognize the image verification code.
[0018] Furthermore, the encryption method includes one or both of 3DES and RSA encryption algorithms.
[0019] The present invention also relates to an automated testing system for marketing application loans, which is characterized by comprising:
[0020] Storage module, used to store basic user data and loan business data;
[0021] An extraction module, used for extracting common fields according to the interface request message;
[0022] A generation module, used for generating a test message;
[0023] A recognition module, used to recognize the image verification code using an OCR recognition method;
[0024] An encryption module, used for encrypting the test message to obtain an encrypted test message;
[0025] A judgment module is used to judge whether the loan amount applied for by the applicant is less than or equal to the loan approval limit;
[0026] The execution module is used to execute the test messages in sequence to complete the test of each interface.
[0027] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.
[0028] The present invention also relates to an electronic device, characterized in that it comprises a memory, a processor and a computer program stored in the memory and executable on the processor, for executing the above method.
[0029] The beneficial effects of the present invention are:
[0030] By using the automated testing method and system for marketing application loans described in the present invention, the loan data is split into user basic data and business data and stored separately, avoiding the problem that business data can only be queried through user basic information and loan product type, achieving complete decoupling of user basic data and business data, and flexibly generating various loan data. Testers only need to modify the user basic data file to complete loan application transactions for the same scenario of different users; they only need to modify the business data file to complete loan application transactions for different scenarios of the same user. Compared with the case where the present invention is not introduced, the efficiency of interface testing is greatly improved, and the problem of high error rate of manually modifying request messages is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The present invention is a flow chart of the automated testing method for marketing application loans.
[0032] Figure 2 The figure is a schematic diagram of the structure of the automated testing system for marketing application loans of the present invention. DETAILED DESCRIPTION
[0033] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.
[0034] The first aspect of the present invention relates to an automated testing method for marketing application loans, the process is as follows: Figure 1As shown, it includes: obtaining the request message of the interface and extracting the common fields, wherein the interface includes loan application, contract signing, withdrawal and repayment, and is set in series, in the order of application, contract signing, withdrawal and repayment, so as to test the interface in series. Each interface is independent of each other and can also be tested separately, or the intermediate interface can be used as the initial interface for testing, for example, starting from the contract signing interface, testing the contract signing, withdrawal and repayment functions; the common fields include the applicant's name, gender, ID number, loan application amount, loan product type, assets and salary;
[0035] Obtain loan data, as shown in Table 1, and split the loan data into user basic data and loan business data. User basic information includes user name, gender, ID number, and loan application amount; loan business information includes loan product type, assets, and salary. User basic information and loan business information are stored separately in the data storage system;
[0036] Serial number Name gender ID number Loan Amount Loan Product Type assets Salary 1 plum- female 4401021980XXXXXXXX 3,000 Ordinary loan 20,000 5,000 2 Wang Er male 2202811977XXXXXXXX 90,000 Consumer loans 550,000 1,000 3 Zhang San female 3505241965XXXXXXXX 12,000 Personal housing loan 1,000 1,200 4 Li Si female 5401021980XXXXXXXX 80,000 Personal car loan 0 2,500 5 Wang Wu male 2102811971XXXXXXXX 198,000 Account overdraft 30 30,000 6 king- male 6405241960XXXXXXXX 70,000 Fixed asset loans 600,000 8,000 7 Li San female 1401021981XXXXXXXX 4,000 Personal housing loan 7,000 3,000 8 Zhang Liu female 5102811979XXXXXXXX 8,000 Consumer loans 900 12,000
[0037] Table 1
[0038] The common fields are configured to the user basic data and the loan business data, and the contents are shown in Table 2 and Table 3 below;
[0039] Serial number Name gender ID number Loan Amount 1 Li Yi female 4401021980XXXXXXXX 3,000 2 Wang Er male 2202811977XXXXXXXX 90,000 3 Zhang San female 3505241965XXXXXXXX 12,000 4 Li Si female 5401021980XXXXXXXX 80,000 5 Wang Wu male 2102811971XXXXXXXX 198,000 6 Wang Yi male 6405241960XXXXXXXX 70,000 7 Li San female 1401021981XXXXXXXX 4,000 8 Zhang Liu female 5102811979XXXXXXXX 8,000
[0040] Table 2
[0041] Serial number Loan Product Type assets Salary 1 Ordinary loan 20,000 5,000 2 Consumer loans 550,000 1,000 3 Personal housing loan 1,000 1,200 4 Personal car loan 0 2,500 5 Account overdraft 30 30,000 6 Fixed asset loans 600,000 8,000 7 Personal housing loan 7,000 3,000 8 Consumer loans 900 12,000
[0042] Table 3
[0043] If the applicant is changed, the tester only needs to change the user's basic data, the loan business data remains unchanged, and all interface test messages are automatically updated; if the loan business data is changed, only the user's basic data remains unchanged, and the loan business data is changed, and all interface test messages are automatically updated, thereby flexibly generating a large amount of loan data in various scenarios. For example, if only the loan business data is changed, the changed information is shown in Table 4;
[0044] Serial number Name gender ID number Loan Amount Loan Product Type assets Salary 1 Li Si female 5401021980XXXXXXXX 80,000 Fixed asset loans 200,000 6,000 2 Wang Yi male 6405241960XXXXXXXX 70,000 Account overdraft 200,000 6,000 3 Li Yi female 4401021980XXXXXXXX 3,000 Personal housing loan 200,000 6,000 4 Zhang San female 3505241965XXXXXXXX 12,000 Personal housing loan 150,000 2,000 5 Li San female 1401021981XXXXXXXX 4,000 Consumer loans 200,000 6,000 6 Wang Er male 2202811977XXXXXXXX 90,000 Ordinary loan 200,000 6,000 7 Zhang Liu female 5102811979XXXXXXXX 8,000 Consumer loans 30,000 5,000 8 Wang Wu male 2102811971XXXXXXXX 198,000 Personal car loan 200,000 6,000
[0045] Table 4
[0046] This method achieves complete decoupling of user basic data and loan business data. Testers only need to change a certain type of data to simulate the generation of various loan data.
[0047] In addition, for the serial interfaces set up in sequence for loan application, contract signing, withdrawal, and repayment, the input data of the interface in the latter order is the output data of the previous interface. For example, the initial test interface is the loan application interface, and the output data includes user basic information, loan business information, and transaction serial number. The input data of the contract signing interface includes user basic information, loan business information, and transaction serial number.
[0048] Receive a test message, encrypt the test message, use one or both of 3DES and RSA encryption algorithms to obtain an encrypted test message, generate a corresponding picture verification code according to the test message, use an OCR recognition method to recognize the picture verification code to implement automated testing, and send the test message to an interface for testing;
[0049] Obtain the applicant's ID number, extract the birth date segment of the applicant's ID number, determine whether the applicant is an adult, and if the applicant is a minor, feedback the loan approval rejection information;
[0050] If the applicant is an adult, determine the maximum loan approval amount based on the applicant's assets, salary and corresponding loan product type, and determine whether the applicant's loan amount is less than or equal to the loan approval amount;
[0051] When it is determined that the loan amount applied for by the applicant is less than or equal to the maximum loan approval amount, the applicant's loan application is determined to be approved, loan approval information is generated, and the loan approval information is fed back; if the test interface is a loan application interface, the signing, withdrawal, and repayment interface tests are automatically performed; if the test interface is an interface other than the loan application interface, such as a withdrawal interface test, the loan approval information is still fed back and the withdrawal and repayment interface tests are performed in turn.
[0052] When it is determined that the loan amount applied for by the applicant is greater than the loan approval amount, it is determined that the loan application of the applicant has not been approved, and loan approval failure information is generated, and the maximum loan approval amount and loan approval failure information are fed back; regardless of whether the test interface is any one or more of the loan application, contract signing, withdrawal, and repayment interfaces, the maximum loan approval amount and loan approval failure information are fed back. For example, if the test interface is a loan application interface, the maximum loan approval amount and loan approval failure information are fed back, and the contract signing, withdrawal, and repayment interface tests are continued in sequence; if the test interface is an interface other than the loan application interface, such as a withdrawal interface test, the maximum loan approval amount and loan approval failure information are still fed back, and the withdrawal and repayment interface tests are continued.
[0053] A second aspect of the present invention relates to a structure such as Figure 2An automated testing system for marketing application loans is shown, comprising:
[0054] Storage module, used to store basic user data and loan business data;
[0055] An extraction module, used for extracting common fields according to the interface request message;
[0056] A generation module, used for generating a test message;
[0057] A recognition module, used to recognize the image verification code using an OCR recognition method;
[0058] An encryption module, used for encrypting the test message to obtain an encrypted test message;
[0059] A judgment module is used to judge whether the loan amount applied for by the applicant is less than or equal to the loan approval limit;
[0060] The execution module is used to execute the test messages in sequence to complete the test of each interface.
[0061] The system can be used to implement the above method.
[0062] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention 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. An automated testing method for marketing application loans, characterized in that: include: Obtaining a request message of an interface and extracting common fields, wherein the interface includes loan application, contract signing, withdrawal and repayment, and is arranged in a serial order; the common fields include the applicant's name, gender, ID number, loan application amount, loan product type, assets and salary; Obtain loan data, split the loan data into user basic data and loan business data, and store them separately in a data storage system; Configuring the common fields to the user basic data and the loan business data; Receive a test message, encrypt the test message, generate a corresponding picture verification code according to the test message, and send the test message to the interface for testing; Determine the maximum loan approval amount according to the applicant's assets, salary information and corresponding loan product type included in the test message, and judge whether the loan amount applied for by the applicant is less than or equal to the loan approval amount; When it is determined that the loan amount applied for by the applicant is less than or equal to the maximum loan approval amount, the loan application of the applicant is determined to be approved, loan approval information is generated, and the loan approval information is fed back; When it is determined that the loan amount applied for by the applicant is greater than the loan approval limit, it is determined that the applicant's loan application has not been approved, loan approval failure information is generated, and the maximum loan approval limit and loan approval failure information are fed back; If the applicant is changed, the basic user data will be changed, the loan business data will remain unchanged, and all interface test messages will be automatically updated; If the loan business data is changed, the basic user data remains unchanged. If the loan business data is changed, all interface test messages are automatically updated.
2. The method according to claim 1, characterized in that The basic user information includes the user's name, gender, ID number and applied loan amount; the loan business information includes loan product type, assets and salary.
3. The method according to claim 2, characterized in that It also includes extracting the birth date number segment of the applicant's ID number in the user basic data to determine whether the applicant is an adult. If the applicant is a minor, feedback is given that the loan approval has not been passed.
4. The method according to claim 3, characterized in that The image verification code is recognized using an OCR recognition method.
5. The method according to claim 4, characterized in that The encryption method includes one or both of 3DES and RSA encryption algorithms.
6. A system according to the method of claim 1, characterized in that: include: Storage module, used to store basic user data and loan business data; An extraction module, used for extracting common fields according to the interface request message; A generation module, used for generating a test message; A recognition module, used to recognize the image verification code using an OCR recognition method; An encryption module, used for encrypting the test message to obtain an encrypted test message; A judgment module is used to judge whether the loan amount applied for by the applicant is less than or equal to the loan approval limit; The execution module is used to execute the test messages in sequence to complete the test of each interface.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
Citation Information
Patent Citations
Automatic end-user oriented testing method for mobile phone
CN102255676A
Loan application processing method and device
CN110619571A