A credit index testing method and device, storage medium and electronic equipment

By generating local credit reporting messages and batch testing cases, the problem of low efficiency in credit reporting indicator testing in the existing technology is solved, and more efficient credit reporting indicator testing is achieved.

CN115082190BActive Publication Date: 2025-04-15JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210702481.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2025-04-15
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

The prior art is complex and time-consuming to build credit reporting messages, resulting in low testing efficiency of credit reporting indicators.

Method used

By generating local credit reporting messages for credit reporting indicators and testing credit reporting indicators using batch test cases, the time required to generate credit reporting messages for credit reporting indicator testing is shortened.

Benefits of technology

It improves the testing efficiency of credit reporting indicators, supports batch testing of credit reporting indicators, and shortens the online cycle of risk control strategies corresponding to credit reporting indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082190B_ABST
    Figure CN115082190B_ABST
Patent Text Reader

Abstract

The present invention provides a credit indicator testing method and device, a storage medium and an electronic device, the method comprising: displaying a test template of a credit indicator corresponding to a test instruction, wherein the test template comprises various credit labels corresponding to the credit indicator; receiving indicator test data corresponding to various credit labels, and generating a test case set comprising a plurality of test cases based on the indicator test data; running each test case to obtain a local credit message of each test case, processing each local credit message, and obtaining a test result file of the credit indicator; applying various credit labels in the test template to generate a local credit message of each test case, and using the local credit message to test the credit indicator; thereby, the credit indicator can be tested without generating a complete and large credit message, which shortens the time consumption of generating the credit message required for the credit indicator test and improves the efficiency of testing the credit indicator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a credit index testing method and device, a storage medium and an electronic device. Background Art

[0002] In various credit businesses, the personal credit risk of users is usually assessed to prevent economic losses. At present, when assessing the personal credit risk of users, credit indicators are usually used to assess the credit of users, and the credit indicators used are usually qualified indicators that have passed the test, thereby ensuring the accuracy of the assessment.

[0003] Testing credit indicators requires credit reports. Traditionally, when testing credit indicators, a complete credit report is constructed. The construction process is complicated and the credit report is too large, which takes a long time and results in low efficiency in testing credit indicators. Summary of the invention

[0004] In view of this, the present invention provides a credit indicator testing method and device, a storage medium and an electronic device to generate a partial credit message of a credit indicator, shorten the time for generating the credit message required for testing the credit indicator, and thereby improve the testing efficiency of the credit indicator.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect of the present invention discloses a credit index testing method, comprising:

[0007] Get test instructions;

[0008] Displaying a test template of the credit indicator corresponding to the test instruction, wherein the test template includes various credit labels corresponding to the credit indicator;

[0009] Receiving index test data corresponding to each of the credit labels;

[0010] Based on the indicator test data, generating a test case set of the credit indicator, wherein the test case set includes at least one test case;

[0011] For each of the test cases, run the test case, and based on each credit label in the test template, generate a partial credit message of the test case, and run the logic code corresponding to the credit indicator to process the partial credit message to obtain result data of the test case;

[0012] Based on each of the result data, a test result file corresponding to the credit reporting indicator is generated.

[0013] In the above method, optionally, the test template for displaying the credit index corresponding to the test instruction includes:

[0014] Parsing the test instruction to determine the credit indicator to be tested corresponding to the test instruction;

[0015] A template configuration file corresponding to the credit reporting indicator is obtained, and a test template is rendered in a display page based on the template configuration file, and the test template is displayed.

[0016] In the above method, optionally, generating a test case set of the credit reporting indicator based on the indicator test data includes:

[0017] Obtain each parameter group in the indicator test data, wherein the parameter group includes a plurality of label parameters and expected parameters, and each label parameter corresponds to each credit label one by one;

[0018] Based on each label parameter and expected parameter in each parameter group, generate a test case for each parameter group;

[0019] The test cases are combined into a test case set.

[0020] Optionally, the method described above, running the test case and generating a partial credit information message of the test case based on each credit information tag in the test template includes:

[0021] Run the test case to obtain a case task of the test case;

[0022] Execute the case task and convert each of the label parameters into a local message object;

[0023] Based on the local message object, a local credit investigation message of the test case is generated.

[0024] Optionally, in the above method, generating a test result file corresponding to the credit reporting indicator based on each of the result data includes:

[0025] For each of the test case result data, the result data is compared with the expected result data of the test case to obtain a test result indicating whether the test case is successfully tested;

[0026] Based on the test results of each of the test cases, a test result file corresponding to the credit reporting indicator is generated.

[0027] A second aspect of the present invention discloses a credit index testing device, comprising:

[0028] An acquisition unit, used for acquiring a test instruction;

[0029] A display unit, used to display a test template of the credit indicator corresponding to the test instruction, wherein the test template includes each credit label corresponding to the credit indicator;

[0030] A receiving unit, used to receive the index test data corresponding to each of the credit labels;

[0031] A first generating unit, configured to generate a test case set of the credit indicator based on the indicator test data, wherein the test case set includes at least one test case;

[0032] An operating unit, configured to operate the test case for each test case, generate a partial credit information message of the test case based on each credit information tag in the test template, and operate a logic code corresponding to the credit information indicator to process the partial credit information message to obtain result data of the test case;

[0033] The second generating unit is used to generate a test result file corresponding to the credit index based on each of the result data.

[0034] In the above device, optionally, the display unit comprises:

[0035] A parsing module, used to parse the test instruction and determine the credit index to be tested corresponding to the test instruction;

[0036] The first acquisition module is used to acquire a template configuration file corresponding to the credit indicator, and render a test template in a display page based on the template configuration file, and display the test template.

[0037] In the above device, optionally, the first generating unit includes:

[0038] A second acquisition module is used to acquire each parameter group in the index test data, wherein the parameter group includes multiple label parameters and expected parameters, and each label parameter corresponds to each credit label one by one;

[0039] A first generating module, configured to generate a test case for each parameter group based on each label parameter and expected parameter in each parameter group;

[0040] The composition module is used to combine the test cases into a test case set.

[0041] In the above device, optionally, the operating unit includes:

[0042] A running module, used for running the test case to obtain a case task of the test case;

[0043] An execution module, used for executing the case task and converting each of the label parameters into a local message object;

[0044] The second generating module is used to generate the local credit information message of the test case based on the local message object.

[0045] In the above device, optionally, the second generating unit includes:

[0046] A comparison module, for comparing the result data of each test case with the expected result data of the test case, to obtain a test result indicating whether the test case is successfully tested;

[0047] The third generating module is used to generate a test result file corresponding to the credit reporting indicator based on the test result of each test case.

[0048] A third aspect of the present invention discloses a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the credit indicator testing method as described above.

[0049] A fourth aspect of the present invention discloses an electronic device, comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the credit indicator testing method as described above.

[0050] Compared with the prior art, the present invention has the following advantages:

[0051] The present invention provides a credit index testing method and device, a storage medium and an electronic device, the method comprising: displaying a test template of a credit index corresponding to a received test instruction, wherein the test template contains various credit labels corresponding to the credit index; receiving index test data corresponding to various credit labels, and generating a test case set containing multiple test cases based on the index test data; running each test case, obtaining a partial credit message of each test case based on various credit labels, processing each partial credit message, and obtaining a test result file of the credit index; applying various credit labels in the test template, generating a partial credit message of each test case, and using the partial credit message to test the credit index. Thus, the credit index can be tested without generating a complete and large credit message, which shortens the time consumption of generating the credit message required for the credit index test and improves the efficiency of testing the credit index. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0053] Figure 1 A method flow chart of a credit index testing method provided by an embodiment of the present invention;

[0054] Figure 2 A flow chart of a method for displaying a test template of a credit indicator corresponding to a test instruction to a tester provided by an embodiment of the present invention;

[0055] Figure 3 An example diagram showing a test template provided by an embodiment of the present invention;

[0056] Figure 4 A flow chart of a method for generating a test case set of credit reporting indicators provided by an embodiment of the present invention;

[0057] Figure 5 An example diagram of a test result file provided by an embodiment of the present invention;

[0058] Figure 6 An example diagram of archived information of a test case provided by an embodiment of the present invention;

[0059] Figure 7 A structural schematic diagram of a credit index testing device provided by an embodiment of the present invention;

[0060] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of 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.

[0062] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0063] In the technical solution of this application, the acquisition, collection, storage, use, processing, transmission, provision, disclosure and application of data are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.

[0064] As can be seen from the background technology, when the existing technical means test the credit tag, it is necessary to construct a huge credit message, and the construction process takes a long time, resulting in too low efficiency in testing the credit index. To solve this problem, the present invention provides a credit testing method and device, a storage medium and an electronic device, which can effectively improve the efficiency of testing the credit index by generating a local credit message and using a batch of test cases to test the credit index.

[0065] The present invention can be used in many general or special computing device environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc. The method provided by the embodiment of the present invention can be applied to a test system, and the execution subject can be a processor or a server.

[0066] Reference Figure 1 , is a method flow chart of a credit index testing method provided by an embodiment of the present invention, and is specifically described as follows:

[0067] S101: Obtain test instructions.

[0068] When the tester needs to test the credit indicators, he can check the credit indicators that need to be tested in the system's operation interface. The system generates a test instruction based on the credit indicators checked by the tester, and the processor obtains the test instruction, which is used to test the credit indicators.

[0069] Preferably, the tester may select multiple or one credit indicators. When the tester selects multiple credit indicators, the credit indicators may be tested in batches, thereby effectively improving the efficiency of testing the credit indicators.

[0070] S102: Displaying a test template of the credit indicators corresponding to the test instruction, wherein the test template includes various credit labels corresponding to the credit indicators.

[0071] After receiving the test instruction, the test template of the credit indicator corresponding to the test instruction can be displayed to the tester, so that the tester can input data in response to the test template.

[0072] Reference Figure 2 , is a flow chart of a method for displaying a test template of a credit indicator corresponding to a test instruction provided by an embodiment of the present invention, and is specifically described as follows:

[0073] S201: Parse the test instruction and determine the credit indicator to be tested corresponding to the test instruction.

[0074] After obtaining the test instruction, the test instruction is parsed to determine the credit indicator to be tested corresponding to the test instruction, wherein the credit indicator to be tested is the credit indicator selected by the tester.

[0075] Furthermore, there may be multiple credit indicators to be tested or one credit indicator to be tested.

[0076] S202: Obtain a template configuration file corresponding to the credit reporting indicator, render a test template in a display page based on the template configuration file, and display the test template.

[0077] The template configuration file is a file pre-configured for credit indicators. The template configuration file contains information such as the credit labels corresponding to the credit indicators, the format of the data corresponding to each credit label, the arrangement order of each credit label, and the way the test template is displayed.

[0078] Furthermore, different credit indicators correspond to different credit labels. Developers can pre-sort and organize the credit labels that the credit indicators depend on, filter the credit labels that the credit indicators depend on, and then write the selected credit labels into the configuration file.

[0079] Preferably, the test template can be displayed in Excel format, for example, refer to Figure 3 , which is an example diagram of a display test template provided by an embodiment of the present invention; when displayed in Excel, a credit indicator test template corresponds to a sheet page, such as Figure 3 As shown in the figure, there are two sheet pages, one is the test template for the credit indicator of the total authorized amount, and the other is the test template for the credit indicator of the number of activated credit cards. The one shown in the figure is the test template for the number of activated credit cards.

[0080] As shown in the figure, each row in the table represents different content. The first row UUID is the universal unique identification code of the credit indicator; the second row is the name information of the credit indicator; the third row is the business code of the business to which the credit indicator belongs; the fourth row is the various test fields corresponding to the credit indicator, including but not limited to expected value, actual value, personal identity type, ID number, personal name, source system code, account status and account type; among them, the expected value and actual value exist in the test template of each credit indicator, and the personal identity type, ID number, personal name, source system code, account status and account type are the various test fields of each credit label that depends on the number of activated credit cards.

[0081] Based on the template configuration file corresponding to the credit indicator, the test template of the credit indicator is displayed to the tester, so that the tester can quickly know the various credit labels on which the credit indicator depends, so that the tester can quickly input the indicator test data corresponding to the credit indicator.

[0082] S103: Receive indicator test data corresponding to each credit label.

[0083] After the test template is displayed, the tester can input data into the test template based on each credit label in the test template, whereby the processor receives the data input by the tester, which is the indicator test data corresponding to each credit label.

[0084] S104: Generate a test case set of the credit reporting indicator based on the indicator test data, wherein the test case set includes at least one test case.

[0085] After the tester inputs the indicator test data into the test template, an executable test case file is generated, and a test case set of the credit indicator is generated according to the test case file. Furthermore, the indicator test data includes data input by the tester based on each credit label for constructing a test case.

[0086] Reference Figure 4 , is a flow chart of a method for generating a test case set of credit reporting indicators provided by an embodiment of the present invention, and is specifically described as follows:

[0087] S401: Acquire each parameter group in the index test data, wherein the parameter group includes a plurality of label parameters and expected parameters, and each label parameter corresponds to each credit label one by one.

[0088] The indicator test data contains multiple parameter groups, and the parameter groups contain multiple label parameters and expected parameters. Figure 3 Take this as an example to illustrate: Figure 3The data in the fifth row of the data constitute a parameter group. Each credit label in the parameter group has a corresponding label parameter, such as: the label parameter corresponding to the personal identity type is test; the label parameter corresponding to the ID number is 510107; the label parameter corresponding to the personal name is ace; the label parameter corresponding to the source system code is system; the label parameter corresponding to the account status is 01; the label parameter corresponding to the account type is D1; ​​the prediction parameter corresponding to the prediction value field is 1000. The data in the sixth row and the seventh row of data respectively constitute the parameter group, and the contents of the parameter group will not be repeated here.

[0089] Furthermore, the data in the parameter group is flat structure data.

[0090] S402: Generate a test case for each parameter group based on each label parameter and expected parameters in each parameter group.

[0091] It should be noted that the expected parameters in the parameter group are the data expected to be obtained after the test case is run, and each parameter group has a corresponding test case. Preferably, the expected parameters here can be understood as the expected values ​​in the figure.

[0092] S403: Group the test cases into a test case set.

[0093] The test case set contains at least one test case. Testers can input indicator test data in the test template to generate test cases in batches. The process of generating test cases is simple and time-saving, thereby improving the testing speed of credit indicators.

[0094] S105: For each test case, run the test case, and based on each credit label in the test template, generate a local credit message of the test case, and run the logic code corresponding to the credit indicator to process the local credit message to obtain the result data of the test case.

[0095] In the method provided in the embodiment of the present invention, the process of running the test case and generating a partial credit information message of the test case based on each credit information tag in the test template is as follows:

[0096] Run the test case and obtain the case task of the test case;

[0097] Execute the case task and convert each label parameter into a local message object;

[0098] Based on the local message object, a local credit investigation message of the test case is generated.

[0099] In the method provided by the embodiment of the present invention, the test case is run, the case task corresponding to the test case is abstracted, and the case task is executed using a preset thread, so as to convert each label parameter into a local message object; it should be noted that in the process of using a thread to execute a thread task and converting each label parameter into a local message object, the preset credit message class metadata and deep traversal algorithm can be used to restore each flat label parameter into a local message object, and then convert the local message object into a local credit message. The local credit message is not a complete credit message. The local credit message is a credit message containing local message data restored for each label data of the credit indicator.

[0100] It should be noted that the credit message class metadata is the data obtained by processing the complete credit message of the credit indicators. For example, the SAX XML parsing technology can be used to parse the credit message into a large credit message class, and then the JAVA reflection technology and the DFS algorithm can be used to convert the credit message class into object description metadata. The object description metadata is the credit message class metadata. The credit message class metadata contains the description objects of all the labels in the credit message. The credit message class metadata is data of a nested Map structure.

[0101] In the process of using the credit report class metadata and the deep traversal algorithm to restore the flat label parameters to the local message object, the deep traversal algorithm can be used to find the corresponding description object for each label parameter in the credit report class metadata, and map each label parameter to the corresponding description object, thereby obtaining the local message object, which contains the description object after mapping each label parameter, thereby obtaining the local message object with a nested Map structure.

[0102] Based on the indicator name of the credit indicator, determine the logic code corresponding to the credit label, run the logic code, and thus perform corresponding processing on the local credit message to obtain the result data of the test case.

[0103] It should be noted that different credit indicators correspond to different logic codes, and running or executing the logic code can realize the processing process corresponding to the credit indicator.

[0104] S106: Based on each result data, generate a test result file corresponding to the credit index.

[0105] In the method provided by the embodiment of the present invention, for the result data of each test case, the result data is compared with the expected result data of the test case to obtain a test result indicating whether the test case is tested successfully;

[0106] Based on the test results of each of the test cases, a test result file corresponding to the credit reporting indicator is generated.

[0107] Furthermore, when the result data is consistent with the expected result data, a test result indicating that the test case is tested successfully can be obtained; when the test result is inconsistent with the test result data, a test result indicating that the test case is tested unsuccessfully can be obtained.

[0108] It should be noted that the expected result data can be understood as the expected parameters mentioned above; the result data can be understood as the actual value after running the test case.

[0109] Exemplarily, the test result file can be an Excel file with Figure 5 Take this as an example to illustrate: Figure 5 An example diagram of a test result file provided by an embodiment of the present invention, Figure 5 The column of actual values ​​is the result data of the test case. If the expected value in the fifth row of the figure is inconsistent with the actual value, the test result of the test case corresponding to the fifth row is a test failure. If the expected value and the actual value in the sixth and seventh rows of the figure are the same, the test results of the test cases corresponding to the sixth and seventh rows are both test successes.

[0110] In the method provided by the embodiment of the present invention, a test instruction is obtained; a test template of a credit indicator corresponding to the test instruction is displayed, wherein the test template includes various credit tags corresponding to the credit indicator; indicator test data corresponding to each credit tag is received, and a test case set of the credit indicator is generated, wherein the test case set includes at least one test case; for each test case, the test case is run, and based on each credit tag in the test template, a local credit message of the test case is generated, and the logic code corresponding to the credit indicator is run to process the local credit message to obtain result data of the test case; based on each result data, a test result file corresponding to the credit indicator is generated. The tester inputs the indicator test data into the test template corresponding to the credit indicator, thereby generating a test case set containing multiple test cases, runs each test case, and obtains a local credit message for each test case. After processing each local credit message, a test result file for the execution indicator is obtained. By constructing the local credit message of the credit indicator, the credit message required for testing the credit indicator can be quickly constructed, effectively reducing the time for constructing the credit message, and by batch generating test cases and batch executing test cases, the credit indicator can be quickly tested, thereby improving the efficiency of testing the credit indicator. In addition, the present invention also supports batch testing of credit indicators, and can test multiple credit indicators in a shorter time, thereby improving testing efficiency and shortening the online cycle of the risk control strategy corresponding to the credit indicator.

[0111] In the method provided by the embodiment of the present invention, after the credit reporting index is tested, each test case can also be archived and retained as an asset to facilitate subsequent tracing and repeated application.

[0112] It should be noted that during the execution of the test case, relevant archive information can be abstracted, such as Figure 6 As shown, it is an example diagram of the archive information of a test case provided by an embodiment of the present invention, as shown in the figure, including the archive information of the test case, the archive information of the case task corresponding to the test case, and the task detail information corresponding to the case task; wherein, the archive information of the test case includes information such as the primary key, case code, case name, creator, business type, case template file, case test file, number of runs, creation time and modification time; the archive information of the case task includes information such as the primary key, case code, case name, task code, task status, start time, completion time, total number of samples, number of successes, number of failures, result file, creation time, modification time, creator and test case primary key; the archive information of the task detail includes information such as the primary key, case code, case name, task code, execution serial number, execution object name, execution object type, execution object UUID, predicted value, actual value, execution context, status, execution time, creation time, modification time and case task primary key; further, the execution context can be understood as the local credit report described above, and the actual value can be understood as the result data described above. Furthermore, in the figure, bigint is a system data type of Transact-SQL, varchar represents character data, tinyint represents a field type, integer represents an integer, timestamp represents a timestamp, and blob represents a field type used to store binary files in a database.

[0113] and Figure 1 Corresponding to the method shown in the figure, the embodiment of the present invention provides a credit index testing device for supporting Figure 1 In the real life implementation of the method shown, the apparatus may be set on a computer terminal or other processing equipment.

[0114] Reference Figure 7 , is a structural diagram of a credit index testing device provided by an embodiment of the present invention, and is specifically described as follows:

[0115] An acquisition unit 701 is used to acquire a test instruction;

[0116] A display unit 702, configured to display a test template of a credit indicator corresponding to the test instruction, wherein the test template includes each credit label corresponding to the credit indicator;

[0117] The receiving unit 703 is used to receive the index test data corresponding to each of the credit labels;

[0118] A first generating unit 704 is configured to generate a test case set of the credit indicator based on the indicator test data, wherein the test case set includes at least one test case;

[0119] The running unit 705 is used to run the test case for each test case, and generate a partial credit report of the test case based on each credit report tag in the test template, and run the logic code corresponding to the credit report indicator to process the partial credit report to obtain the result data of the test case;

[0120] The second generating unit 706 is used to generate a test result file corresponding to the credit index based on each of the result data.

[0121] In the device provided by the embodiment of the present invention, a test instruction is obtained; a test template of a credit indicator corresponding to the test instruction is displayed, wherein the test template includes various credit tags corresponding to the credit indicator; indicator test data corresponding to each credit tag is received, and a test case set of the credit indicator is generated, wherein the test case set includes at least one test case; for each test case, the test case is run, and based on each credit tag in the test template, a local credit message of the test case is generated, and the logic code corresponding to the credit indicator is run to process the local credit message to obtain result data of the test case; based on each result data, a test result file corresponding to the credit indicator is generated. The tester inputs the indicator test data into the test template corresponding to the credit indicator, thereby generating a test case set containing multiple test cases, runs each test case, and obtains a local credit message for each test case. After processing each local credit message, a test result file for the execution indicator is obtained. By constructing the local credit message of the credit indicator, the credit message required for testing the credit indicator can be quickly constructed, effectively reducing the time for constructing the credit message, and by batch generating test cases and batch executing test cases, the credit indicator can be quickly tested, thereby improving the efficiency of testing the credit indicator. In addition, the present invention also supports batch testing of credit indicators, and can test multiple credit indicators in a shorter time, thereby improving testing efficiency and shortening the online cycle of the risk control strategy corresponding to the credit indicator.

[0122] In the device provided in the embodiment of the present invention, the display unit 702 may be configured as follows:

[0123] A parsing module, used to parse the test instruction and determine the credit index to be tested corresponding to the test instruction;

[0124] The first acquisition module is used to acquire a template configuration file corresponding to the credit indicator, and render a test template in a display page based on the template configuration file, and display the test template.

[0125] In the device provided by the embodiment of the present invention, the first generating unit 704 may be configured as follows:

[0126] A second acquisition module is used to acquire each parameter group in the index test data, wherein the parameter group includes multiple label parameters and expected parameters, and each label parameter corresponds to each credit label one by one;

[0127] A first generating module, configured to generate a test case for each parameter group based on each label parameter and expected parameter in each parameter group;

[0128] The composition module is used to combine the test cases into a test case set.

[0129] In the device provided in the embodiment of the present invention, the operation unit 705 may be configured as follows:

[0130] A running module, used for running the test case to obtain a case task of the test case;

[0131] An execution module, used for executing the case task and converting each of the label parameters into a local message object;

[0132] The second generating module is used to generate the local credit information message of the test case based on the local message object.

[0133] In the device provided by the embodiment of the present invention, the second generating unit 706 may be configured as follows:

[0134] A comparison module, for comparing the result data of each test case with the expected result data of the test case, to obtain a test result indicating whether the test case is successfully tested;

[0135] The third generating module is used to generate a test result file corresponding to the credit reporting indicator based on the test result of each test case.

[0136] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned credit indicator testing method.

[0137] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 8As shown, it specifically includes a memory 801 and one or more instructions 802, wherein the one or more instructions 802 are stored in the memory 801 and are configured to be executed by one or more processors 803 to execute the one or more instructions 802 to perform the above-mentioned credit indicator testing method.

[0138] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0140] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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 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 may 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.

[0141] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A credit index testing method, characterized in that: include: Get test instructions; Displaying a test template of the credit indicator corresponding to the test instruction, wherein the test template includes various credit labels corresponding to the credit indicator; Receiving index test data corresponding to each of the credit labels; Based on the indicator test data, generating a test case set of the credit indicator, wherein the test case set includes at least one test case; For each of the test cases, run the test case, and based on each credit label in the test template, generate a partial credit message of the test case, and run the logic code corresponding to the credit indicator to process the partial credit message to obtain result data of the test case; The running of the test case and generating a local credit message of the test case based on each credit tag in the test template includes: running the test case to abstract a case task corresponding to the test case; using a preset thread to execute the case task, and in the process of executing the case task, using a preset credit message class metadata and a deep traversal algorithm to restore each flat label parameter to a local message object, and then converting the local message object into the local credit message; the local credit message is not a complete credit message, and the local credit message is a credit message containing local message data restored for each label data of the credit indicator; Based on each of the result data, a test result file corresponding to the credit reporting indicator is generated.

2. The method according to claim 1, characterized in that The test template for displaying the credit indicators corresponding to the test instruction includes: Parsing the test instruction to determine the credit indicator to be tested corresponding to the test instruction; A template configuration file corresponding to the credit reporting indicator is obtained, and a test template is rendered in a display page based on the template configuration file, and the test template is displayed.

3. The method according to claim 1, characterized in that The step of generating a test case set of the credit reporting indicator based on the indicator test data includes: Obtain each parameter group in the indicator test data, wherein the parameter group includes a plurality of label parameters and expected parameters, and each label parameter corresponds to each credit label one by one; Based on each label parameter and expected parameter in each parameter group, generate a test case for each parameter group; The test cases are combined into a test case set.

4. The method according to claim 1, characterized in that The step of generating a test result file corresponding to the credit reporting indicator based on each of the result data includes: For each of the test case result data, the result data is compared with the expected result data of the test case to obtain a test result indicating whether the test case is successfully tested; Based on the test results of each of the test cases, a test result file corresponding to the credit reporting indicator is generated.

5. A credit index testing device, characterized in that: include: An acquisition unit, used for acquiring a test instruction; A display unit, used to display a test template of the credit indicator corresponding to the test instruction, wherein the test template includes each credit label corresponding to the credit indicator; A receiving unit, used to receive the index test data corresponding to each of the credit labels; A first generating unit, configured to generate a test case set of the credit indicator based on the indicator test data, wherein the test case set includes at least one test case; An operating unit, configured to operate the test case for each test case, generate a partial credit information message of the test case based on each credit information tag in the test template, and operate a logic code corresponding to the credit information indicator to process the partial credit information message to obtain result data of the test case; The operation unit includes: an operation module, an execution module and a second generation module; The running module is used to run the test case and abstract the case task corresponding to the test case; The execution module is used to execute the case task using a preset thread, and in the process of executing the case task, use the preset credit information message metadata and deep traversal algorithm to restore the flattened label parameters to a local message object; The second generating module is used to convert the local message object into the local credit message based on the local message object; the local credit message is not a complete credit message, and the local credit message is a credit message containing local message data restored for each label data of the credit indicator; The second generating unit is used to generate a test result file corresponding to the credit index based on each of the result data.

6. The device according to claim 5, characterized in that The display unit comprises: A parsing module, used to parse the test instruction and determine the credit index to be tested corresponding to the test instruction; The first acquisition module is used to acquire a template configuration file corresponding to the credit indicator, and render a test template in a display page based on the template configuration file, and display the test template.

7. The device according to claim 5, characterized in that The first generating unit comprises: A second acquisition module is used to acquire each parameter group in the index test data, wherein the parameter group includes multiple label parameters and expected parameters, and each label parameter corresponds to each credit label one by one; A first generating module, configured to generate a test case for each parameter group based on each label parameter and expected parameter in each parameter group; The composition module is used to combine the test cases into a test case set.

8. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the credit indicator testing method according to any one of claims 1 to 4.

9. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the credit indicator testing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Interface testing method and device, equipment and storage medium

    CN113312260A