CN110502442B - Dynamic parameter checking method, device, equipment and storage medium - Google Patents

Dynamic parameter checking method, device, equipment and storage medium Download PDF

Info

Publication number
CN110502442B
CN110502442B CN201910768206.1A CN201910768206A CN110502442B CN 110502442 B CN110502442 B CN 110502442B CN 201910768206 A CN201910768206 A CN 201910768206A CN 110502442 B CN110502442 B CN 110502442B
Authority
CN
China
Prior art keywords
target data
verification
test case
data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910768206.1A
Other languages
Chinese (zh)
Other versions
CN110502442A (en
Inventor
吴少华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910768206.1A priority Critical patent/CN110502442B/en
Publication of CN110502442A publication Critical patent/CN110502442A/en
Application granted granted Critical
Publication of CN110502442B publication Critical patent/CN110502442B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to automatic testing, and discloses a dynamic parameter checking method, which comprises the following steps: when a data verification request is received, acquiring target data corresponding to the data verification request and attributes of the target data; judging whether the target data is a dynamic parameter or not according to the attribute; when the target data is a dynamic parameter, determining a business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter; and selecting a target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, obtaining a verification result and outputting the verification result. The invention also discloses a dynamic parameter calibration device, equipment and a storage medium. In the invention, when the dynamic parameters are verified, the corresponding test case is selected according to the business process of the dynamic parameters, and the dynamic parameters are verified through the test case, thereby improving the test efficiency and ensuring the test comprehensiveness.

Description

Dynamic parameter checking method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data testing, and in particular, to a method, an apparatus, a device, and a storage medium for verifying dynamic parameters.
Background
A large number of dynamic parameters exist in the business process of different products of application software, certain logic rules exist among the dynamic parameters, and the dynamic parameter verification is to ensure the correctness of the dynamic parameters.
At present, the verification of the dynamic parameters mainly comprises manual comparison by a tester, and the tester matches the dynamic parameters on the premise of knowing business rules, for example, the tester verifies the monthly repayment amount and the dynamic parameters related to the rate in the verification loan business flow by combing the loan business flow so as to intercept the problem of parameter errors; however, if the service flow is complex or the service scenes are more, the problem of test errors or test omission is easily caused. How to eliminate the problems generated by the method to the maximum extent, quickly and accurately, and improve the dynamic parameter testing efficiency and the testing comprehensiveness becomes a technical problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide a dynamic parameter checking method, a dynamic parameter checking device, dynamic parameter checking equipment and a storage medium, and aims to solve the problems that the current dynamic parameter testing efficiency is low and the testing is incomplete.
In order to achieve the above object, the present invention provides a dynamic parameter verification method, which includes the following steps:
when a data verification request is received, acquiring target data corresponding to the data verification request and attributes of the target data;
judging whether the target data is a dynamic parameter or not according to the attribute;
when the target data is a dynamic parameter, determining a business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter;
and selecting a target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, obtaining a verification result and outputting the verification result.
Optionally, before the step of obtaining the target data corresponding to the data verification request and the attribute of the target data when the data verification request is received, the method includes:
when a checking function is started, acquiring target data to be checked and a page identifier and a coordinate of a page to which the target data belongs, and taking the page identifier and the coordinate as position information;
adding a data tag to the target data according to the position information, taking the position information and the data tag as attributes of the target data, and storing the target data and the attributes in a preset data record table in a related manner;
and when detecting that target data are newly added in the preset data record table, triggering a data verification request based on the target data.
Optionally, when the target data is a dynamic parameter, the step of determining the service flow to which the dynamic parameter belongs according to the attribute of the dynamic parameter includes:
when the target data is a dynamic parameter, acquiring position information and a data tag in the attribute, wherein the position information comprises a page identifier and a coordinate, and the data tag comprises a data type and data editing information;
and acquiring a service scene corresponding to the page identifier and the coordinates, acquiring a service flow matched with the data type and the data editing information in the service scene, and taking the service flow as the service flow to which the dynamic parameters belong.
Optionally, before the step of selecting the target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, and obtaining and outputting a verification result, the method includes:
when a test case generation request is received, acquiring an interface identifier, an input parameter and an output parameter corresponding to the test case generation request, and configuring an input parameter and output parameter corresponding rule according to the input parameter and the output parameter;
inputting the interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rule into a preset test case generation model to generate a test case;
when the test case is detected to be generated completely, inputting verification parameters corresponding to the test case into the test case, and verifying the test case;
and when the test case passes the verification, packaging and storing the test case and adding a business process mark.
Optionally, the step of selecting a target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, obtaining a verification result, and outputting the verification result includes:
inquiring a preset service flow and test case mapping table to obtain a target test case corresponding to the service flow;
and inputting the dynamic parameters into the target test case, and obtaining and outputting a verification result corresponding to the dynamic parameters through the target test case.
Optionally, after the step of selecting the target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, and obtaining and outputting a verification result, the method includes:
when the verification result is that the verification is failed, adjusting the target data according to the attribute of the target data to obtain new target data;
inputting the new target data into the target test case to obtain a new verification result;
and when the verification result is that the verification is passed, terminating the verification operation, or when the verification failure times reach a preset threshold value, outputting code adjustment prompt information.
Optionally, after the step of determining whether the target data is a dynamic parameter according to the attribute, the method includes:
when the target data is not a dynamic parameter, acquiring a check rule of the target data, and checking the target data by using the check rule;
and outputting the target data adjustment prompt information when the target data fails to be checked.
In addition, to achieve the above object, the present invention further provides a dynamic parameter verification apparatus, including:
the request receiving module is used for acquiring target data corresponding to the data verification request and the attribute of the target data when the data verification request is received;
the data judgment module is used for judging whether the target data is a dynamic parameter according to the attribute;
the flow determining module is used for determining the business flow to which the dynamic parameter belongs according to the attribute of the dynamic parameter when the target data is the dynamic parameter;
and the verification output module is used for selecting a target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, obtaining and outputting a verification result.
In addition, in order to achieve the above object, the present invention also provides a dynamic parameter calibration apparatus;
the dynamic parameter verification apparatus includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program, when executed by the processor, implements the steps of the dynamic parameter checking method as described above.
In addition, to achieve the above object, the present invention also provides a computer storage medium;
the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the dynamic parameter checking method as described above.
According to the dynamic parameter verification method, the device, the equipment and the storage medium provided by the embodiment of the invention, when a data verification request is received by a background test platform, target data corresponding to the data verification request and the attribute of the target data are obtained; judging whether the target data is a dynamic parameter or not according to the attribute; when the target data is a dynamic parameter, determining a business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter; according to the embodiment, whether the target data is the dynamic parameter is judged according to the attribute of the target data, the business process of the dynamic parameter is determined according to the attribute of the dynamic parameter when the target data is the dynamic parameter, and the corresponding test case is selected according to the business process, so that the time for combing the business process of a tester and understanding the dynamic parameter is reduced, the tester does not need to be familiar with the business scene to select the test case, the automatic dynamic parameter verification is realized, and the comprehensiveness of the dynamic parameter verification is effectively ensured.
Drawings
FIG. 1 is a schematic diagram of an apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a dynamic parameter verification method according to the present invention;
fig. 3 is a schematic functional block diagram of a dynamic parameter calibration apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a server (also called a dynamic parameter verification device, where the dynamic parameter verification device may be formed by a separate dynamic parameter verification apparatus, or may be formed by combining other apparatuses with a dynamic parameter verification apparatus) in a hardware operating environment according to an embodiment of the present invention.
The server in the embodiment of the invention refers to a computer which manages resources and provides services for users, and is generally divided into a file server, a database server and an application server. The computer or computer system running the above software is also referred to as a server. Compared with a common PC (personal computer) personal computer, the server has higher requirements on stability, safety, performance and the like; as shown in fig. 1, the server may include: the processor 1001 includes, for example, a Central Processing Unit (CPU), a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, a chipset, a disk system, hardware such as a network, and the like. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., WIFI interface, WIreless FIdelity, WIFI interface). The memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (e.g., a disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the server may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, and a WiFi module; the input unit is compared with a display screen and a touch screen; the network interface can be selected from the wireless interface, such as Bluetooth, a probe and the like except WiFi. Those skilled in the art will appreciate that the server architecture shown in FIG. 1 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the computer software product is stored in a storage medium (storage medium: also called computer storage medium, computer medium, readable storage medium, computer readable storage medium, or direct storage medium, etc., and the storage medium may be a non-volatile readable storage medium, such as RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method according to the embodiments of the present invention, and a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a computer program.
In the server shown in fig. 1, the network interface 1004 is mainly used for connecting a background database and communicating data with the background database; the user interface 1003 is mainly used for connecting a client (client, also called user side or terminal, the terminal in the embodiment of the present invention may be a fixed terminal or a mobile terminal, for example, an intelligent air conditioner with networking function, an intelligent electric lamp, an intelligent power supply, an intelligent sound box, an automatic driving car, a PC, a smart phone, a tablet computer, an electronic book reader, a portable computer, etc., the terminal includes sensors such as a light sensor, a motion sensor, and other sensors, which are not described herein again), and performs data communication with the client; and the processor 1001 may be configured to call the computer program stored in the memory 1005 and execute the steps of the dynamic parameter checking method provided by the following embodiments of the present invention.
A first embodiment of the present invention provides a dynamic parameter verification method, which is applied to a server shown in fig. 1, and the dynamic parameter verification method in this embodiment includes:
when a data verification request is received, acquiring target data corresponding to the data verification request and attributes of the target data;
judging whether the target data is a dynamic parameter or not according to the attribute;
when the target data is a dynamic parameter, determining a business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter;
and selecting a target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, obtaining a verification result and outputting the verification result.
Before the steps of this embodiment are executed, a data record table is preset in the server, and the data record table stores target data to be verified, specifically, the method includes:
step S01, when a checking function is started, target data to be checked and page identification and coordinates of a page to which the target data belongs are obtained, and the page identification and the coordinates are used as position information.
The method comprises the steps that a tester triggers a verification instruction on terminal equipment, wherein the triggering mode of the verification instruction is not specifically limited, the terminal equipment collects target data to be tested in a page, the target data can be data input by a user in the page and can also be data obtained by running codes in the page, the terminal determines the page to which the target data belongs and obtains a page identifier (the page identifier refers to identification information for uniquely identifying the page to which the target data belongs, such as page number) of the page to which the target data belongs and coordinates of the target data in the page to which the target data belongs, and the terminal sends the target data and the page identifier and the coordinates of the page to which the target data belongs to a rear-end test platform of a server.
When the back-end test platform receives the verification instruction, the back-end test platform starts a verification function, the back-end test platform acquires target data to be verified, and page identification and coordinates corresponding to the target data, and the back-end test platform takes the acquired page identification and coordinates as position information of the target data.
And S02, adding a data label to the target data according to the position information, using the position information and the data label as the attribute of the target data, and storing the target data and the attribute in a preset data record table in a related manner.
The method comprises the following steps that a back-end test platform adds data labels to target data according to position information of the target data, namely, a data label set is preset in the back-end test platform, different data labels are preset in the preset data label set, and data types and data editing information (the data editing information, namely, input time, modification time, access time and the like of the target data) are recorded in the data labels; the back-end test platform queries a preset data label set, and acquires a data label corresponding to the position information, for example, xx characters in the xx rows in a financial product procurement page are target data: the purchase applying amount is 10 thousands, and the back-end test platform acquires a data label corresponding to the purchase applying amount; it is understood that the number of data tags of the target data may be plural or plural.
The back-end test platform takes the position information and the data label as the attributes of the target data, the back-end test platform stores the target data and the corresponding attributes in a preset data record table in an associated manner, wherein the preset data record table is a preset data table used for recording the target data and the data attributes of the target data, the back-end test platform can read the information in the preset data record table and directly check according to the read information, specifically:
and step S03, when detecting that the target data is newly added in the preset data record table, triggering a data verification request based on the target data.
When the back-end test platform detects that target data is newly added in the preset data record table, the back-end test platform obtains the target data and attributes corresponding to the target data, and triggers a data verification request based on the target data so as to verify the newly added target data in the preset data record table.
In this embodiment, the method does not depend on a front-end page, that is, whether the front-end page is developed or not does not affect the test operation of the back-end test platform, the back-end test platform can automatically obtain target data to be tested, and uniformly process the target data and add the target data to a preset data recording table.
Referring to fig. 2, in a first embodiment of a dynamic parameter checking method according to the present invention, the dynamic parameter checking method includes:
step S10, when a data verification request is received, target data corresponding to the data verification request and attributes of the target data are obtained.
The back-end test platform receives the data verification request, acquires target data corresponding to the data verification request, queries a preset data record table and acquires the attribute of the target data in the preset data record table, wherein the attribute of the target data comprises: the position information refers to a page identifier corresponding to a page to which the target data belongs and coordinates of the target data in the page to which the target data belongs; the data tag is a tag in which a target data type and data editing information are recorded.
And S20, judging whether the target data is a dynamic parameter or not according to the attribute.
The method comprises the steps that a rear-end test platform obtains position information in attributes, the rear-end test platform comprises a dynamic parameter position table preset by a tester, the preset dynamic parameter position table records dynamic parameters related in codes and position information corresponding to the dynamic parameters, the rear-end test platform inquires the preset dynamic parameter position table and judges whether target position information identical to the position information of target data exists in the preset dynamic parameter position table or not, and when the target position information identical to the position information of the target data exists in the preset dynamic parameter position table, the rear-end test platform judges that the target data are the dynamic parameters; and when the target position information which is the same as the position information of the target data does not exist in the preset dynamic parameter position table, the back-end test platform judges that the target data is not a dynamic parameter.
And step S30, when the target data is a dynamic parameter, determining the business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter.
When the back-end test platform judges that the target data is a dynamic parameter, the back-end test platform determines a business process to which the dynamic parameter belongs according to the attribute of the dynamic parameter; for example, the dynamic parameters 536 correspond to attributes including: the location information credit product xx page (repayment page) xxx line (repayment amount location), the date repayment amount is recorded in the data label, and the back-end test platform determines the business process of the dynamic parameter according to the dynamic parameter and the attribute of the dynamic parameter as follows: the date x repayment process for credit product a.
Specifically, step S30 in this embodiment includes:
step S31, when the target data is a dynamic parameter, acquiring the position information and the data tag in the attribute.
When the back-end test platform judges that the target data are dynamic parameters, the back-end test platform acquires position information and a data tag of the target data, wherein the position information comprises a page identifier and coordinates, and the data tag comprises a data type and data editing information; so that the back-end test platform determines the service scene corresponding to the target data according to the position information and the data label, that is,
step S32, obtaining the service scene corresponding to the page identifier and the coordinates, obtaining the service flow matched with the data type and the data editing information in the service scene, and using the service flow as the service flow to which the dynamic parameters belong.
The method comprises the steps that a mapping table of position information and a service scene is preset by a rear-end test platform, and a mapping relation of the position information and the service scene is recorded in the mapping table of the preset position information and the service scene, for example, the xx page of a credit product A is a credit application scene, and the xxx page is a credit auditing scene; the back-end testing platform inquires a preset position information and service scene mapping table, obtains a service scene corresponding to the page identification and the coordinates, further obtains a service flow matched with the data type and the data editing information in the service scene after determining the service scene corresponding to the target data, and takes the service flow as a service flow to which the dynamic parameters belong.
In this embodiment, the back-end test platform analyzes the dynamic parameters through the customized analysis logic, determines a service flow to which the dynamic parameters belong, and selects a test case according to the service flow to simplify the verification process, specifically, in step S40, selects a target test case corresponding to the target data according to the service flow, verifies the dynamic parameters according to the target test case, and obtains and outputs a verification result.
Specifically, the method comprises the following steps:
step a, inquiring a preset service flow and test case mapping table to obtain a target test case corresponding to the service flow;
and b, inputting the dynamic parameters into the target test case, and obtaining and outputting a verification result corresponding to the dynamic parameters through the target test case.
The method comprises the steps that a back-end test platform presets a service flow and test case mapping table, the service flow and test case mapping table refers to a service flow and test case number mapping table, and the back-end test platform inquires the preset service flow and test case mapping table to obtain a target test case corresponding to a service flow; and then, the back-end test platform inputs the dynamic parameters into the target test case, executes the test case, obtains a verification result corresponding to the dynamic parameters and outputs the verification result.
In the embodiment, whether the target data is a dynamic parameter is judged according to the attribute of the target data, when the target data is a dynamic parameter, the business process of the dynamic parameter is determined according to the attribute of the dynamic parameter, and the corresponding test case is selected according to the business process, so that the time for combing the business process and understanding the dynamic parameter of a tester is reduced, the tester does not need to be familiar with the business scene to select the test case, the automatic dynamic parameter verification is realized, and meanwhile, the comprehensiveness of the dynamic parameter verification is effectively ensured.
Further, on the basis of the first embodiment of the present invention, a second embodiment of the dynamic parameter verification method of the present invention is provided.
The present embodiment is a step before step S40 in the first embodiment, and the step of constructing the target test case in step S40 is specifically described in the present embodiment, it can be understood that the step in the present embodiment only needs to be before step S40, and a specific position is not limited, and the dynamic parameter verification method in the present embodiment includes:
and S50, when a test case generation request is received, acquiring an interface identifier, an input parameter and an output parameter corresponding to the test case generation request, and configuring an input parameter and output parameter corresponding rule according to the input parameter and the output parameter.
The method includes that a tester triggers a test case generation request at a terminal, the terminal sends the test case generation request to a back-end test platform, the back-end test platform receives the test case generation request, and it can be understood that the triggering form of the test case generation request is not specifically limited, that is, the test case generation request can be actively triggered by a user or automatically triggered when a set condition is met, and when the back-end test platform receives the test case generation request, the back-end test platform obtains an interface identifier (the interface identifier refers to identification information for uniquely identifying an interface, such as an interface name), a parameter and a parameter.
Then, the back-end test platform combs the corresponding relationship of the interface, the entry and the exit corresponding to the interface identification, namely, the back-end test platform determines what entry and the exit in the interface are returned, the returned priority relationship and the like, and the back-end test platform configures an entry and exit corresponding rule according to the corresponding relationship of the interface, the entry and the exit; it can be understood that the rule corresponding to the input and output parameters of the test case not only can be automatically configured by the backend test platform according to the rule, but also can be manually configured by the tester according to the service scene.
For example, the service scenario is a login scenario, and the entry parameters are: user name, password, and permissions; the out-going priority is username error > password error > permission error, then the out-going corresponding rule calls the username error information when the username error is used, and adjusting the password error information when the password error exists in the absence of the user name error, and adjusting the authority error information when the password error exists in the absence of the user name error.
And S60, inputting the interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rule into a preset test case generation model to generate a test case.
The back-end test platform inputs the interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rules corresponding to the test case generation request to a preset test case generation model (the preset test case generation model refers to a preset test case generation script), the preset test case generation model generates test cases according to the input interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rules, in the embodiment, the preset test case generation model can generate the test cases by using an exhaustion method, namely, the test cases are matched with corresponding returns according to the input parameter and output parameter corresponding rules, and finally, a test case file of Excel is generated.
Step S70, when detecting that the test case is generated completely, inputting verification parameters corresponding to the test case into the test case, and verifying the test case; and when the test case passes the verification, packaging and storing the test case and adding a business process mark.
After the back-end test platform detects that the test case is generated completely, the back-end test platform obtains verification parameters corresponding to the test case and verifies the test case by using the verification parameters, wherein the verification parameters corresponding to the test case are randomly generated by the back-end test platform according to input parameters, for example, the test case is specific to a mobile phone number, the back-end test platform randomly extracts 11 data groups which are formed by integers, the back-end test platform inputs the generated 11 data groups into the test case to verify whether an abnormal data prompt language corresponding to the test case is consistent with the setting, when the abnormal data prompt language corresponding to the test case is inconsistent with the setting, the back-end test platform judges that the test case is not verified, and outputs prompt information indicating that the test case is not verified, and when the abnormal data prompt language corresponding to the test case is consistent with the setting, the back-end test platform judges that the test case is verified. And when the back-end test platform judges that the test case passes the verification, the back-end test platform packages the test case, stores the test case and adds a service flow mark. So as to utilize the test case to carry out testing. In the embodiment, the test cases are automatically generated, and the comprehensiveness of the test is finally ensured by improving the number of the test cases.
Further, a third embodiment of the dynamic parameter verification method of the present invention is provided on the basis of the above-mentioned embodiments.
In this embodiment, the step after the step S40 in the first embodiment is a step in which the back-end test platform of the server in this embodiment analyzes the verification result, and determines whether to perform secondary verification according to the verification result, specifically, the dynamic parameter verification method includes:
and S80, when the verification result is that the verification is failed, adjusting the target data according to the attribute of the target data to obtain new target data.
When the back-end test platform determines that the verification result is verification failed, the back-end test platform adjusts according to the attribute of the target data to obtain new target data, that is, in this embodiment, multiple times of verification are realized by adjusting the target data, so as to ensure the accuracy of analysis of the verification result, specifically:
step S90, inputting the new target data into the target test case to obtain a new verification result; and when the verification result is that the verification is passed, terminating the verification operation, or when the verification failure times reach a preset threshold value, outputting code adjustment prompt information.
The back-end test platform inputs new target data into the target test case to obtain a new verification result; the back-end testing platform obtains a new verification result, when the verification result is that the verification is passed, the back-end testing platform terminates the verification operation, or when the verification result is that the verification is failed, the number of times of the verification is counted, and when the number of times of the verification reaches a preset threshold (the preset threshold is a preset verification number critical value, and the preset threshold can be set according to a specific scene, for example, the preset threshold is 10 times), the back-end testing platform outputs code adjustment prompt information.
In this embodiment, the back-end test platform adjusts the target data according to the attribute, and can perform multiple times of verification, so as to accurately analyze the reason why the verification fails according to multiple verification results, thereby enabling the verification result analysis to be more accurate.
In addition, in this embodiment, when the verification result is that verification passes, selecting a new target test case according to the service flow of the target data, and obtaining and outputting the verification result corresponding to the dynamic parameter through the new target test case; and terminating the verification of the dynamic parameters until the test passing times reach the preset termination times, namely adjusting the test cases when the test passes in the embodiment so as to use a plurality of test cases to test the dynamic parameters and ensure the correctness of the codes.
Further, a fourth embodiment of the dynamic parameter verification method of the present invention is provided on the basis of the above-mentioned embodiments.
The present embodiment is a step after step S20 in the first embodiment, and is a processing step in this embodiment when the target data is not a dynamic parameter, specifically, the dynamic parameter checking method includes:
step S100, when the target data is not a dynamic parameter, obtaining a verification rule of the target data, and verifying the target data by using the verification rule.
When the back-end test platform determines that the target data is not a dynamic parameter, namely when the target parameter is information such as a user mobile phone number, a user identity card number and the like, the back-end test platform acquires a check rule of the target data and checks the target data by using the check rule.
And step S110, outputting the target data adjustment prompt information when the target data is not verified.
The back-end test platform obtains a verification result of the target data, outputs target data adjustment prompt information when the verification result of the target data is verification-passed, and outputs verification-passing prompt information when the target data is verification-passed.
In addition, referring to fig. 3, an embodiment of the present invention further provides a dynamic parameter checking apparatus, where the dynamic parameter checking apparatus includes:
a request receiving module 10, configured to obtain target data corresponding to a data verification request and an attribute of the target data when the data verification request is received;
a data determining module 20, configured to determine whether the target data is a dynamic parameter according to the attribute;
a flow determining module 30, configured to determine, when the target data is a dynamic parameter, a service flow to which the dynamic parameter belongs according to an attribute of the dynamic parameter;
and the verification output module 40 is configured to select a target test case corresponding to the dynamic parameter according to the business process, verify the dynamic parameter according to the target test case, obtain a verification result, and output the verification result.
Optionally, the dynamic parameter verification apparatus includes:
the verification starting module is used for acquiring target data to be verified and page identification and coordinates of a page to which the target data belongs when a verification function is started, and taking the page identification and the coordinates as position information;
the information sorting module is used for adding a data tag to the target data according to the position information, using the position information and the data tag as the attribute of the target data, and storing the target data and the attribute in a preset data record table in a correlation manner;
and the verification triggering module is used for triggering a data verification request based on the target data when detecting that the target data is newly added in the preset data record table.
Optionally, the flow determining module 30 includes:
the information acquisition unit is used for acquiring position information and a data tag in the attribute when the target data is a dynamic parameter, wherein the position information comprises a page identifier and a coordinate, and the data tag comprises a data type and data editing information;
and the process selection unit is used for acquiring the service scene corresponding to the page identifier and the coordinates, acquiring a service process matched with the data type and the data editing information in the service scene, and taking the service process as the service process to which the dynamic parameters belong.
Optionally, the dynamic parameter verification apparatus includes:
the rule configuration module is used for acquiring an interface identifier, an input parameter and an output parameter corresponding to a test case generation request when the test case generation request is received, and configuring an input parameter and an output parameter corresponding rule according to the input parameter and the output parameter;
the case generation module is used for inputting the interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rule into a preset test case generation model to generate a test case;
the case verification module is used for inputting verification parameters corresponding to the test case into the test case and verifying the test case when the test case is detected to be generated;
and the case packaging module is used for packaging and storing the test case and adding a service flow mark when the test case passes the verification.
Optionally, the check output module 40 includes:
the query acquisition unit is used for querying a preset business process and test case mapping table to acquire a target test case corresponding to the business process;
and the result output unit is used for inputting the dynamic parameters into the target test case, obtaining the verification result corresponding to the dynamic parameters through the target test case and outputting the verification result.
Optionally, the dynamic parameter verification apparatus includes:
the parameter adjusting module is used for adjusting the target data according to the attribute of the target data to obtain new target data when the verification result is that the verification fails;
the verification execution module is used for inputting the new target data into the target test case to obtain a new verification result;
and the verification termination module is used for terminating the verification operation when the verification result is that the verification is passed, or outputting code adjustment prompt information when the verification failure times reach a preset threshold value.
Optionally, the dynamic parameter checking apparatus includes:
the condition acquisition module is used for acquiring a check rule of the target data when the target data is not a dynamic parameter, and checking the target data by using the check rule;
and the prompt output module is used for outputting the target data adjustment prompt information when the target data is not verified.
The steps implemented by each functional module of the dynamic parameter verification apparatus may refer to each embodiment of the dynamic parameter verification method of the present invention, and are not described herein again.
In addition, the embodiment of the invention also provides a computer storage medium.
The computer storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the operations in the dynamic parameter verification method provided by the above embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity/action/object from another entity/action/object without necessarily requiring or implying any actual such relationship or order between such entities/actions/objects; the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, in that elements described as separate components may or may not be physically separate. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A dynamic parameter verification method is characterized by comprising the following steps:
when a data verification request is received, acquiring target data corresponding to the data verification request and attributes of the target data;
judging whether the target data is a dynamic parameter or not according to the attribute;
when the target data is a dynamic parameter, determining a service process to which the dynamic parameter belongs according to the attribute of the dynamic parameter;
selecting a target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, obtaining a verification result and outputting the verification result;
wherein, the step of judging whether the target data is a dynamic parameter according to the attribute comprises:
acquiring position information in the attribute, and judging whether the target data is a dynamic parameter according to the position information and a preset dynamic parameter position table;
the step of selecting a target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, obtaining a verification result and outputting the verification result comprises the following steps:
inquiring a preset service flow and test case mapping table to obtain a target test case corresponding to the service flow;
inputting the dynamic parameters into the target test case, obtaining a verification result corresponding to the dynamic parameters through the target test case, and outputting the verification result;
the step of selecting the target test case corresponding to the dynamic parameter according to the business process, verifying the dynamic parameter according to the target test case, obtaining a verification result and outputting the verification result comprises the following steps:
when the verification result is that the verification is failed, adjusting the target data according to the attribute of the target data to obtain new target data;
inputting the new target data into the target test case to obtain a new verification result;
and when the verification result is that the verification is passed, terminating the verification operation, or when the verification failure times reach a preset threshold value, outputting code adjustment prompt information.
2. The method for verifying dynamic parameters according to claim 1, wherein before the step of obtaining the target data corresponding to the data verification request and the attribute of the target data when the data verification request is received, the method comprises:
when a checking function is started, acquiring target data to be checked and a page identifier and a coordinate of a page to which the target data belongs, and taking the page identifier and the coordinate as position information;
adding a data tag for the target data according to the position information, taking the position information and the data tag as attributes of the target data, and storing the target data and the attributes in a preset data record table in a related manner;
and when detecting that target data are newly added in the preset data record table, triggering a data verification request based on the target data.
3. The method for verifying dynamic parameters according to claim 1, wherein when the target data is a dynamic parameter, the step of determining the service flow to which the dynamic parameter belongs according to the attribute of the dynamic parameter comprises:
when the target data are dynamic parameters, acquiring position information and a data tag in the attribute, wherein the position information comprises a page identifier and coordinates, and the data tag comprises a data type and data editing information;
and acquiring a service scene corresponding to the page identifier and the coordinates, acquiring a service flow matched with the data type and the data editing information in the service scene, and taking the service flow as the service flow to which the dynamic parameters belong.
4. The method for verifying the dynamic parameters according to claim 1, wherein before the steps of selecting the target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, and obtaining and outputting the verification result, the method comprises:
when a test case generation request is received, acquiring an interface identifier, an input parameter and an output parameter corresponding to the test case generation request, and configuring an input parameter and output parameter corresponding rule according to the input parameter and the output parameter;
inputting the interface identification, the input parameter, the output parameter and the input parameter and output parameter corresponding rule into a preset test case generation model to generate a test case;
when the test case is detected to be generated completely, inputting verification parameters corresponding to the test case into the test case, and verifying the test case;
and when the test case passes the verification, packaging and storing the test case and adding a business process mark.
5. The method as claimed in any of claims 1 to 4, wherein said step of determining whether said target data is a dynamic parameter according to said attribute comprises:
when the target data are not dynamic parameters, acquiring a verification rule of the target data, and verifying the target data by using the verification rule;
and outputting the target data adjustment prompt information when the target data fails to be checked.
6. A dynamic parameter verification apparatus, comprising:
the request receiving module is used for acquiring target data corresponding to the data verification request and the attribute of the target data when the data verification request is received;
the data judgment module is used for judging whether the target data is a dynamic parameter according to the attribute;
the flow determining module is used for determining a business flow to which the dynamic parameter belongs according to the attribute of the dynamic parameter when the target data is the dynamic parameter;
the verification output module is used for selecting a target test case corresponding to the dynamic parameters according to the business process, verifying the dynamic parameters according to the target test case, obtaining a verification result and outputting the verification result;
the data judgment module is further configured to acquire position information in the attribute and judge whether the target data is a dynamic parameter according to the position information and a preset dynamic parameter position table;
the verification output module is also used for inquiring a preset service flow and test case mapping table to obtain a target test case corresponding to the service flow; inputting the dynamic parameters into the target test case, obtaining a verification result corresponding to the dynamic parameters through the target test case, and outputting the verification result; when the verification result is that the verification is failed, adjusting the target data according to the attribute of the target data to obtain new target data; inputting the new target data into the target test case to obtain a new verification result; and when the verification result is that the verification is passed, terminating the verification operation, or when the verification failure times reach a preset threshold value, outputting code adjustment prompt information.
7. A dynamic parameter verification apparatus, characterized in that the dynamic parameter verification apparatus comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program when executed by the processor implements the steps of the dynamic parameter checking method of any of claims 1 to 5.
8. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the dynamic parameter checking method according to any one of claims 1 to 5.
CN201910768206.1A 2019-08-15 2019-08-15 Dynamic parameter checking method, device, equipment and storage medium Active CN110502442B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910768206.1A CN110502442B (en) 2019-08-15 2019-08-15 Dynamic parameter checking method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910768206.1A CN110502442B (en) 2019-08-15 2019-08-15 Dynamic parameter checking method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110502442A CN110502442A (en) 2019-11-26
CN110502442B true CN110502442B (en) 2023-02-03

Family

ID=68588981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910768206.1A Active CN110502442B (en) 2019-08-15 2019-08-15 Dynamic parameter checking method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110502442B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360363B (en) * 2020-03-04 2024-04-02 腾讯科技(深圳)有限公司 Method, device, equipment and computer storage medium for testing micro service system
CN111400187B (en) * 2020-03-19 2023-03-14 重庆富民银行股份有限公司 Parameter dynamic verification system and method based on customized data source
CN111522737B (en) * 2020-03-26 2023-07-07 浙江口碑网络技术有限公司 Automatic test verification method and device for front-end interface and storage medium
CN111625580A (en) * 2020-04-22 2020-09-04 口碑(上海)信息技术有限公司 Data processing method, device and equipment
CN112286795A (en) * 2020-09-28 2021-01-29 长沙市到家悠享网络科技有限公司 Software testing method, device and storage medium
CN113282513B (en) * 2021-06-28 2022-11-29 平安消费金融有限公司 Interface test case generation method and device, computer equipment and storage medium
CN115145587A (en) * 2022-07-22 2022-10-04 中国农业银行股份有限公司 Product parameter checking method and device, electronic equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544074B (en) * 2012-07-09 2016-06-29 阿里巴巴集团控股有限公司 The method of calibration of a kind of business and device
CN107579836A (en) * 2016-07-04 2018-01-12 中兴通讯股份有限公司 A kind of parameter verification method and apparatus and NM server
CN109101812A (en) * 2018-08-28 2018-12-28 北京神州绿盟信息安全科技股份有限公司 A kind of parameter verification method, apparatus, computing device and storage medium
CN109597816A (en) * 2018-10-30 2019-04-09 京信通信系统(中国)有限公司 Parameter verification method, apparatus, computer storage medium and embedded device
CN109766264A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Method of calibration, device, computer equipment and the storage medium of interface parameters
CN109815013A (en) * 2019-01-02 2019-05-28 深圳壹账通智能科技有限公司 Business data processing method, device, computer equipment and storage medium
CN109859028A (en) * 2019-01-03 2019-06-07 深圳壹账通智能科技有限公司 A kind of verification method, system, medium and the electronic equipment of repaying information

Also Published As

Publication number Publication date
CN110502442A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN110502442B (en) Dynamic parameter checking method, device, equipment and storage medium
CN107766190B (en) Interface testing method and device, computer equipment and storage medium
CN109687991B (en) User behavior identification method, device, equipment and storage medium
CN107908485B (en) Interface parameter transmission method, device, equipment and computer readable storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN110221982B (en) Performance test method, device and equipment of business system and readable storage medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN108491321B (en) Method and device for determining test case range and storage medium
CN110058998B (en) Software testing method and device
CN109766483B (en) Regular expression generation method, device, computer equipment and storage medium
CN108804399B (en) Form verification method and device
CN110515924B (en) Database operation logic verification method, device, equipment and readable storage medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN107526580A (en) Terminal applies recognition methods and device
CN114285893A (en) Access request processing method, system, device, storage medium and electronic equipment
CN112507087A (en) Terminal equipment identification method, equipment, storage medium and device
CN112433936A (en) Test method, test device and storage medium
CN111538672A (en) Test case layered test method, computer device and computer-readable storage medium
CN111611465A (en) Product detection system, method, device, computer equipment and storage medium
CN114531340B (en) Log acquisition method and device, electronic equipment, chip and storage medium
CN113452533B (en) Charging self-inspection and self-healing method and device, computer equipment and storage medium
CN110838929A (en) System error checking method and system error checking device
CN114116783A (en) Data table operation request processing method and device, server and storage medium
CN111552634A (en) Method and device for testing front-end system and storage medium
CN114268445A (en) Authentication method, device and system for cloud mobile phone application, authentication module and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant