A long process function testing method, system, electronic device and storage medium
Through configuration file and simulation request technology, the over-dependence problem of dependent systems in functional testing is solved, the test environment setting and maintenance is simplified, and the test coverage and efficiency are improved.
Patent Information
- Application Number
- CN202510032270.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The prior art relies too much on other systems in functional testing, resulting in the test process being blocked, and the complex configuration and environmental requirements of the system make testing setup and maintenance difficult.
Through the configuration file-related information to the configuration file, the file-related information is transmitted to the target server, the external real credit request is initiated by simulated request, the credit test request data is generated, the credit application is initiated, and the file data is uploaded to the SFTP file server.
Effectively reduce code development, suitable for more project products, adapt to different test scenarios, ensure the coverage and reliability of long-process functional tests, reduce the impact on the actual dependence system, and improve the reliability and efficiency of tests.
Smart Images

Figure CN119441064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of product testing, and particularly to a long-process function testing method, system, electronic device and storage medium. Background Art
[0002] When conducting function testing, some functions may depend on the availability of other systems or services. If these dependent systems are unavailable, the testing cannot proceed, resulting in the blocking of the testing process. By bypassing the dependent systems, the testing can continue without being affected by the unavailability of the dependent systems. Sometimes, the dependent systems may be shared or limited resources and may not be able to meet the needs of all tests simultaneously. By bypassing the dependent systems, the demand for their resources can be reduced, and the concurrency and efficiency of the testing can be improved. Some dependent systems may have complex configuration and environmental requirements, making it difficult to set up and maintain the testing. By bypassing the dependent systems, the setup and maintenance of the testing environment can be simplified, and the feasibility and repeatability of the testing can be improved.
[0003] In summary, in the prior art, when conducting function testing, there is an over-reliance on other systems, and the dependent systems may not be able to meet the testing requirements simultaneously. Moreover, some dependent systems in the prior art have relatively complex configuration and environmental requirements, making it difficult to set up and maintain the testing. Summary of the Invention
[0004] Based on this, the objective of the present invention is to provide a long-process function testing method, system, electronic device and storage medium to solve the above deficiencies in the prior art.
[0005] In a first aspect, the present invention provides a long-process function testing method, which includes:
[0006] Configure file-related information into a configuration file and transmit the file-related information to a target server;
[0007] Input a product code into the target server and read the encryption / decryption configuration information of the configuration file and the SFTP configuration information based on the product code;
[0008] Initiate an external real credit request according to a preset scenario simulation request and query the credit status of the external real credit request;
[0009] Call the credit status query interface and determine whether to continue the query based on the credit status query interface and the credit status;
[0010] If so, initiate a credit usage request and test the fields in the credit usage request and the external real credit request to generate credit usage test request data for the credit usage request;
[0011] Initiate a credit application based on the encryption and decryption, the configuration information, and the credit usage test request data;
[0012] Invoke the credit status query interface, and determine whether the credit application passes based on the credit usage request and the credit status query interface;
[0013] If so, generate a plan file, generate file data based on the plan file, and upload the file data to the SFTP file server.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: By configuring relevant information to the configuration file, the development of code can be effectively reduced, so that it can be applied to more project products. By simulating requests to initiate external real credit requests, different test scenarios can be adapted to meet different test scenarios. By generating credit usage test request data, real situations can be simulated to ensure the coverage and reliability of long-process function tests, and the impact on the actual dependent system can be effectively reduced, improving the reliability and efficiency of testing.
[0015] Further, the steps of configuring the relevant information of the configuration file to the configuration file and transmitting the relevant information of the file to the target server include:
[0016] Obtain the relevant information and transmission path of the configuration file;
[0017] Transmit the relevant information and the transmission path to the target server by calling the interface method of the entire application process.
[0018] Further, the steps of initiating an external real credit request according to a preset scenario simulation request include:
[0019] Obtain the image file of the configuration file, and upload the image file and the configuration file to the SFTP file server in sequence;
[0020] Generate random data by writing a toolkit, and initiate an external real credit request based on the random data and the SFTP file server.
[0021] Further, the steps of testing the fields in the credit usage request and the external real credit request to generate the credit usage test request data of the credit usage request include:
[0022] Find the existing fields in the external real credit request according to the existing fields in the credit usage request;
[0023] Generate credit usage test request data by writing a toolkit and the existing fields in the external real credit request.
[0024] Further, the steps of generating a plan file and uploading the plan file to the SFTP file server include:
[0025] Simulate the user to generate a calculation file according to the rules, and query the file data in the plan file according to the data fetching logic;
[0026] Write the file data to the SFTP file server.
[0027] In a second aspect, the present invention also provides a long process function test system, which includes:
[0028] A configuration transmission module, configured to configure file-related information into a configuration file and transmit the file-related information to a target server;
[0029] An input reading module, configured to input a product code to the target server and read the encryption / decryption of the configuration file and the configuration information of SFTP based on the product code;
[0030] A simulation query module, configured to initiate an external real credit granting request according to a preset scenario simulation request and query the credit granting status of the external real credit granting request;
[0031] A first call judgment module, configured to call the credit granting status query interface and judge whether to continue the query based on the credit granting status query interface and the credit granting status;
[0032] A test generation module, configured to, if so, initiate a credit using request and test the fields in the credit using request and the external real credit granting request to generate credit using test request data for the credit using request;
[0033] An initiation module, configured to initiate a credit using application based on the encryption / decryption, the configuration information, and the credit using test request data;
[0034] A second call judgment module, configured to call the credit granting status query interface and judge whether to pass based on the credit using request and the credit granting status query interface;
[0035] A generation and upload module, configured to, if so, generate a plan file, generate file data based on the plan file, and upload the file data to the SFTP file server.
[0036] Further, the configuration transmission module includes:
[0037] An acquisition unit, configured to acquire the relevant information and transmission path of the configuration file;
[0038] A call unit, configured to transmit the relevant information and the transmission path to the target server by calling the interface method of the entire credit application process.
[0039] Further, the simulation query module includes:
[0040] An acquisition and upload unit, configured to acquire the image file of the configuration file, and sequentially upload the image file and the configuration file to an SFTP file server;
[0041] A generation and initiation unit, configured to generate random data through a toolkit, and initiate an external real credit request based on the random data and the SFTP file server.
[0042] In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the long process function test method described above is implemented.
[0043] In a fourth aspect, the present invention further provides a storage medium, on which a computer program is stored, wherein when the program is executed by a processor, the long process function test method described above is implemented. Description of the Drawings
[0044] Figure 1 It is a flowchart of the long process function test method in the first embodiment of the present invention;
[0045] Figure 2 It is a structural block diagram of the long process function test system in the second embodiment of the present invention;
[0046] Figure 3 It is a schematic hardware structure diagram of the electronic device in the third embodiment of the present invention.
[0047] Main element symbol description:
[0048] 10, Configuration transmission module; 20, Input reading module; 30, Simulation query module; 40, First call judgment module; 50, Test generation module; 60, Initiation module; 70, Second call judgment module; 80, Generation and upload module;
[0049] 90, Bus; 91, Processor; 92, Memory; 93, Communication interface.
[0050] The following specific embodiments will further illustrate the present invention in conjunction with the above drawings. Specific Embodiments
[0051] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.
[0052] It should be noted that when an element is referred to as being "fixedly provided on" another element, it can be directly on the other element or there can also be an intermediate element. When an element is considered to be "connected to" another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0054] Embodiment 1
[0055] Please refer to Figure 1 , which shows the long-process function test method in the first embodiment of the present invention. The method includes steps S1 to S8:
[0056] S1, configure the file-related information to the configuration file and transmit the file-related information to the target server;
[0057] Specifically, step S1 includes steps S11 to S12:
[0058] S11, obtain the relevant information and transmission path of the configuration file;
[0059] S12, transmit the relevant information and the transmission path to the target server by calling the interface method of the entire incoming process;
[0060] It can be understood that after the program is deployed to the server, the encryption and decryption public and private keys of various asset-side products, the SFTP domain names, ports, accounts, passwords, template paths of image files / accounting files / contracts, etc. uploaded by the asset side or the fund side, and the path to the target server for uploading are configured in the configuration file. The image files or contracts of each product are stored in the same-level directory of the program, and then the program is started. By calling the interface method of the entire incoming process, the product code is passed into the interface.
[0061] It should be noted that for newly added products similar to accounting files or image files in the future, only configuration in the configuration file is required.
[0062] S2, Input the product code into the target server, and read the encryption / decryption configuration information of the configuration file and the SFTP configuration information based on the product code;
[0063] It can be understood that the encryption / decryption method used and the SFTP address to be uploaded are confirmed by reading the encryption / decryption configuration information of the configuration file and the SFTP information through the incoming product code, and an incoming request is simulated for the corresponding product.
[0064] S3, Initiate an external real credit request according to the preset scenario simulation request, and query the credit status of the external real credit request;
[0065] Specifically, step S3 includes steps S31 to S32:
[0066] S31, Obtain the image file of the configuration file, and upload the image file and the configuration file to the SFTP file server in sequence;
[0067] S32, Generate random data through a tool kit, and initiate an external real credit request based on the random data and the SFTP file server;
[0068] It can be understood that first, the image file required for credit is copied from the product template, renamed, and placed in the temporary directory, and then the files are uploaded to the file server in the specified directory of the remote SFTP in sequence. If the file uploaded by the product is a compressed package, the copied file will be compressed into a zip package and then uploaded to the SFTP. After the upload is completed, the temporary directory is cleared to prevent excessive disk space occupation caused by file accumulation. And various random data required for testing are generated through a tool. The methods in the tool kit include methods for generating ID numbers, names, mobile phone numbers, addresses, bank card numbers, bank card names, strings of random lengths, dates, graphics, email addresses, personal basic information, and randomly specifying a value in a list, etc., and the required random data is generated according to the scenario.
[0069] S4, Call the credit status query interface, and judge whether to continue the query based on the credit status query interface and the credit status;
[0070] It is understandable that the data for initiating a credit granting request needs to be encrypted. The simulated asset party sends a request, sorts the data, encrypts it with a random secret key, signs it, clears the original plaintext request data, reassembles it into the data required for encryption, and then initiates a credit granting request. The response data decrypts the encrypted secret key into plaintext, extracts the encrypted response data, decrypts the response body according to the secret key, and finally replaces the original encrypted response body with the decrypted response body, and makes assertions based on the decrypted content.
[0071] It should be explained that when calling the credit status query interface, it is necessary to judge whether to continue the query, continue to the next step, or end the process according to the status. If it is under approval, it will query cyclically. If it is still under approval after more than 1 minute, the process will end. If it passes, continue with the following process. If it fails, the process will end.
[0072] S5. If so, initiate a credit usage request and test the fields in the credit usage request and the external real credit granting request to generate credit usage test request data for the credit usage request.
[0073] Specifically, step S5 includes steps S51 to S52:
[0074] S51. Search for existing fields in the external real credit granting request according to the existing fields in the credit usage request.
[0075] S52. Generate credit usage test request data by writing a toolkit and using the existing fields in the external real credit granting request.
[0076] It is understandable that according to which fields in the credit usage are existing fields in the credit granting, the existing fields use the fields in the credit granting request, and other fields use a custom-written toolkit to generate random data required for testing, and complete the test request data for the credit usage request.
[0077] It is worth noting that before initiating a credit usage request, first copy the image files required for credit usage from the template of this product, rename them, and place them in the temporary directory. Then upload the files to the file server in the specified directory of the remote SFTP in sequence. If the file uploaded by the product is a compressed package, then compress the copied file into a zip package and upload it to the SFTP. After the upload is completed, clear the temporary directory to prevent excessive disk space occupation caused by file accumulation.
[0078] S6. Initiate a credit usage application based on the encryption and decryption, the configuration information, and the credit usage test request data.
[0079] It should be explained that when initiating a credit usage request, the data is also encrypted first and then the request is sent. After receiving the response, the request is decrypted, assertions are made based on the decrypted content, and then a credit usage application is initiated.
[0080] S7. Call the credit status query interface, and determine whether the credit application is approved based on the credit request and the credit status query interface;
[0081] It should be noted that when calling the credit status query interface, it is necessary to judge whether to continue the query, proceed further, or end the process according to the status. If it is under approval, it will query cyclically. If it is still under approval after more than 1 minute, the process will end. If it is approved, proceed with the following process. If it fails, the process will end.
[0082] S8. If so, generate a plan file, generate file data based on the plan file, and upload the file data to the SFTP file server;
[0083] Specifically, step S8 includes steps S81 and S82:
[0084] S81. Simulate the user to generate a calculation file according to the rules, and query the file data in the plan file according to the data extraction logic;
[0085] S82. Write the file data to the SFTP file server.
[0086] It should be noted that after the credit application is approved, a plan file will be generated. In this embodiment, the plan file is a loan disbursement plan file and a repayment plan file. In this process, data is associated and queried from the middle platform according to the data extraction logic, written into the file, and then uploaded to the SFTP file server;
[0087] It is worth noting that in the repayment plan file, the repayment stage will first generate different types of repayment trial calculation and repayment result MOCK data according to the repayment type. The repayment type is passed in the interface request. If not passed by default, a repayment type (normal repayment, early repayment, overdue repayment, early settlement, compensation repayment) will be randomly generated. The repayment data will generate principal, interest, and penalty interest according to the type, and then be inserted into the MOCK table. When the repayment trial calculation interface is initiated, it will judge whether to use the MOCK trial calculation data according to whether MOCK configuration is required in the MOCK table. After the trial calculation is successful, the repayment application will be called, and the repayment result will be queried. It will judge whether to use the repayment result inserted by MOCK according to whether MOCK configuration is required in the MOCK table. In this process, some scheduled tasks will be called to speed up the query result. If it is in the repayment process, it will query cyclically. If it is still in the repayment process after more than 1 minute, the process will end. If the repayment is successful, proceed with the following process. If the repayment fails, the process will end. After the repayment is successful, the repayment detail data will be MOCK generated according to the repayment type and repayment data. The repayment data will be queried from the table according to the inter-table association relationship and written into the repayment detail file, and then uploaded to the bank's SFTP server;
[0088] The above process supports multi-threaded operation, ensuring more complete data for long processes in terms of data generation rate and coverage, and can effectively reduce the impact on the actual dependent system, improving the reliability and efficiency of testing.
[0089] It can be understood that when testing the data initiated by internal self-operated projects, face recognition can be mocked according to the situation, and more ID card data that meets the conditions can be used for testing instead of using one's own ID card. By cleaning internal and external data for repeated testing, when testing external interface adjustment data, the MOCK switch can be turned on to use internal MOCK data instead of going through the real bank environment, enabling rapid testing of internal functions. When a large volume of data needs to be tested, such as in the case of account reconciliation or contract signing, tools can be used to generate data in batches with multiple threads.
[0090] In summary, the long-process function testing method in the above embodiments of the present invention can effectively reduce code development by configuring relevant information to the configuration file, thus being applicable to more project products. By simulating requests to initiate external real credit requests, it can adapt to scenarios to meet different testing scenarios. By generating credit usage test request data, it can simulate real situations, ensuring the coverage and reliability of long-process function testing, and can effectively reduce the impact on the actual dependent system, improving the reliability and efficiency of testing.
[0091] Embodiment 2
[0092] Please refer to Figure 2 , which shows the long-process function testing system in the second embodiment of the present invention. The system includes:
[0093] A configuration transmission module 10, configured to configure relevant information of a configuration file to the configuration file and transmit the file-related information to a target server;
[0094] An input reading module 20, configured to input a product code to the target server and read the encryption / decryption and SFTP configuration information of the configuration file based on the product code;
[0095] A simulation query module 30, configured to initiate an external real credit request according to a preset scenario simulation request and query the credit status of the external real credit request;
[0096] A first call judgment module 40, configured to call the credit status query interface and judge whether to continue the query based on the credit status query interface and the credit status;
[0097] A test generation module 50, configured to, if so, initiate a credit usage request and test the fields in the credit usage request and the external real credit request to generate credit usage test request data for the credit usage request;
[0098] An initiation module 60, configured to initiate a credit application based on the encryption / decryption, the configuration information, and the credit usage test request data;
[0099] A second call judgment module 70, configured to call the credit approval status query interface and judge whether to pass based on the credit usage request and the credit approval status query interface;
[0100] A generation and upload module 80, configured to, if the judgment is passed, generate a plan file, generate file data based on the plan file, and upload the file data to an SFTP file server.
[0101] In some alternative embodiments, the configuration transmission module 10 includes:
[0102] An acquisition unit, configured to acquire the relevant information and transmission path of the configuration file;
[0103] A call unit, configured to transmit the relevant information and the transmission path to a target server by calling the interface method of the entire process of incoming application.
[0104] In some alternative embodiments, the simulation query module 30 includes:
[0105] An acquisition and upload unit, configured to acquire the image file of the configuration file and upload the image file and the configuration file to an SFTP file server in sequence;
[0106] A generation and initiation unit, configured to generate random data by writing a toolkit and initiate an external real credit approval request based on the random data and the SFTP file server.
[0107] In some alternative embodiments, the test generation module 50 includes:
[0108] A search unit, configured to search for existing fields in the external real credit approval according to the existing fields in the credit usage request;
[0109] A generation unit, configured to generate credit usage test request data by writing a toolkit and the existing fields in the external real credit approval.
[0110] In some alternative embodiments, the generation and upload module 80 includes:
[0111] A generation and query unit, configured to simulate a user to generate a calculation file according to rules and query the file data in the plan file according to the data extraction logic;
[0112] A writing unit, configured to write the file data to an SFTP file server.
[0113] The functions or operation steps implemented when the above modules and units are executed are substantially the same as those in the above method embodiments, and will not be elaborated here.
[0114] The long - process function test system provided by the embodiments of the present invention has the same implementation principle and the same technical effects as those in the foregoing method embodiments. For a brief description, for the parts not mentioned in the system embodiments, reference can be made to the corresponding content in the foregoing method embodiments.
[0115] Embodiment III
[0116] The present invention also provides an electronic device. Please refer to Figure 3 , which shows the hardware structure diagram of the electronic device in the third embodiment of the present invention.
[0117] The electronic device may include a processor 91 and a memory 92 storing computer program instructions.
[0118] Specifically, the above - mentioned processor 91 may include a central processing unit (CPU), or an application - specific integrated circuit (ASIC for short), or may be configured as one or more integrated circuits implementing the present application.
[0119] Among them, the memory 92 may include a mass memory for data or instructions. By way of example and not limitation, the memory 92 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 92 may include removable or non-removable (or fixed) media. Where appropriate, the memory 92 may be internal or external to the data processing device. In a particular embodiment, the memory 92 is non-volatile memory. In a particular embodiment, the memory 92 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these. Where appropriate, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended date out dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0120] The memory 92 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 91.
[0121] The processor 91 reads and executes the computer program instructions stored in the memory 92 to implement the long - process function test method of the first embodiment above.
[0122] In some of the embodiments, the electronic device may further include a communication interface 93 and a bus 90. Among them, as Figure 3 shown, the processor 91, the memory 92, and the communication interface 93 are connected through the bus 90 and complete communication with each other.
[0123] The communication interface 93 is used to implement communication between the various modules, devices, units, and / or devices in the present application. The communication interface 93 can also implement data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations, etc.
[0124] Bus 90 includes hardware, software, or both, and couples components of a device to each other. Bus 90 includes, but is not limited to, at least one of the following: Data Bus, Address Bus, Control Bus, Expansion Bus, Local Bus. By way of example and not limitation, Bus 90 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable bus or a combination of two or more of these. In a suitable case, Bus 90 may include one or more buses. Although this application describes and illustrates specific buses, this application contemplates any suitable bus or interconnect.
[0125] The electronic device can obtain a long process function test system and execute the long process function test method of Embodiment 1.
[0126] In addition, in combination with the long process function test method in Embodiment 1 above, this application can be implemented by providing a storage medium. Computer program instructions are stored on the storage medium; when the computer program instructions are executed by a processor, the long process function test method of Embodiment 1 above is implemented.
[0127] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0128] The above-described embodiments merely represent several implementation manners of the present invention. Their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.
Claims
1. A long process functional testing method, characterized in that: The method comprises: The configuration file information is transferred to the configuration file, and the configuration file information is transferred to the target server; The steps of transferring the configuration file related information to the configuration file and transmitting the configuration file related information to the target server include: Obtaining relevant information and transmission path of the configuration file; The relevant information and the transmission path are transmitted to the target server by calling the interface method of the whole process of submitting the document; Input the product code to the target server, and read the encryption and decryption of the configuration file and the SFTP configuration information based on the product code; Initiate an external real credit request according to a preset scenario-compliant simulation request, and query the credit status of the external real credit request; Calling the credit status query interface, and judging whether to continue querying based on the credit status query interface and the credit status; If yes, a credit request is initiated, and fields in the credit request and the external real credit request are tested to generate credit test request data of the credit request; Initiate a credit application based on the encryption and decryption, the configuration information, and the credit test request data; Calling the credit status query interface, and judging whether the credit application is approved based on the credit request and the credit status query interface; If so, a plan file is generated, file data is generated based on the plan file, and the file data is uploaded to the SFTP file server.
2. The long process functional testing method according to claim 1, characterized in that: The step of initiating an external real credit request according to a preset scenario simulation request includes: Obtain an image file of the configuration file, and upload the image file and the configuration file to the SFTP file server in sequence; The random data is generated by writing a toolkit, and an external real credit request is initiated based on the random data and the SFTP file server.
3. The long process functional testing method according to claim 1, characterized in that: The step of testing the fields in the credit request and the external real credit request to generate the credit test request data of the credit request comprises: Searching for existing fields in the external real credit request according to the existing fields in the credit request; The credit test request data is generated by writing a toolkit and existing fields in the external real credit request.
4. The long process functional testing method according to claim 1, characterized in that: The steps of generating a plan file and uploading the plan file to the SFTP file server include: Generate a calculation file based on rule simulation of the user, and query the file data in the plan file based on the data retrieval logic; The file data is written to the SFTP file server.
5. A long process functional testing system, characterized in that: The system comprises: A configuration transmission module is used to configure the file related information to the configuration file, and transmit the file related information to the target server; The configuration transmission module includes: An acquisition unit, used to acquire relevant information and a transmission path of the configuration file; A calling unit, used to transmit the relevant information and the transmission path to a target server by calling an interface method of the entire submission process; An input reading module, used for inputting a product code into the target server, and reading the encryption and decryption of the configuration file and the SFTP configuration information based on the product code; A simulation query module, used to initiate an external real credit request according to a preset scenario-compliant simulation request, and query the credit status of the external real credit request; A first call judgment module, used to call the credit status query interface and judge whether to continue the query based on the credit status query interface and the credit status; A test generation module, used to determine if yes, initiate a credit request, and test the fields in the credit request and the external real credit request to generate credit test request data of the credit request; An initiating module, used for initiating a credit application based on the encryption and decryption, the configuration information and the credit test request data; A second calling judgment module is used to call the credit status query interface and judge whether it is passed based on the credit request and the credit status query interface; Generate an upload module, which is used to generate a plan file, generate file data based on the plan file, and upload the file data to the SFTP file server.
6. The long process functional testing system according to claim 5, characterized in that: The simulation query module includes: An acquisition and uploading unit, used for acquiring an image file of the configuration file, and uploading the image file and the configuration file to an SFTP file server in sequence; The generating initiating unit is used to generate random data by writing a toolkit, and initiate an external real credit request based on the random data and the SFTP file server.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the long-process functional testing method according to any one of claims 1 to 4 is implemented.
8. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the long-process functional testing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Security simulation transaction platform based on message strategy configuration
CN109636603A
Mock test method and device, electronic equipment and medium
CN113190464A