CN112948275A - Test data generation method, device, equipment and storage medium - Google Patents
Test data generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112948275A CN112948275A CN202110461528.9A CN202110461528A CN112948275A CN 112948275 A CN112948275 A CN 112948275A CN 202110461528 A CN202110461528 A CN 202110461528A CN 112948275 A CN112948275 A CN 112948275A
- Authority
- CN
- China
- Prior art keywords
- target
- script
- input control
- input
- result
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 107
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 238000013515 script Methods 0.000 claims abstract description 207
- 238000004519 manufacturing process Methods 0.000 claims abstract description 131
- 238000012544 monitoring process Methods 0.000 claims abstract description 66
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 22
- 230000002159 abnormal effect Effects 0.000 claims abstract description 20
- 238000001514 detection method Methods 0.000 claims abstract description 19
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004458 analytical method Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 15
- 238000011161 development Methods 0.000 abstract description 3
- 238000005516 engineering process Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 238000011990 functional testing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000007781 pre-processing Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 238000004140 cleaning Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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)
- Stored Programmes (AREA)
Abstract
The application relates to a data processing technology, and provides a test data generation method, a test data generation device, computer equipment and a storage medium, wherein the test data generation method comprises the following steps: acquiring target service scenes in a preset system, and acquiring an input control of each target service scene; acquiring an incidence relation between input controls and constructing a text logic tree; combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script; acquiring a text description document corresponding to the text logic tree, and calling a preset algorithm to analyze the text description document to obtain a target weight of each input control; selecting a target text to be input with a target weight value larger than a preset weight threshold value, and setting a monitoring node corresponding to an input control; executing the target number making script to obtain a number making result, and calling a monitoring node to detect whether the number making result corresponding to the target input control is abnormal or not; and when the detection result of the monitoring node is normal, determining that the number is complete. This application can improve the speed and the accuracy of making the number, promotes the rapid development in wisdom city.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a test data generation method and apparatus, a computer device, and a storage medium.
Background
In the testing process of the internet product or other software systems, test data is usually generated in advance, and the internet product or software system to be tested is tested by using the test data so as to achieve the testing purpose.
In the process of implementing the invention, the inventor finds that the prior art has at least the following technical problems: existing solutions for generating test data are generally: specially developing a test data generation script, and further automatically generating the test data through the developed script. However, internet products or software systems generally include a plurality of service scenarios, and most of the existing test data generation schemes (also called number generation schemes) create a test data generation script (also called number generation script) for each service scenario individually, which results in a large number of and dispersion of test data generation scripts and fails to ensure the speed and accuracy of test data generation.
Therefore, it is necessary to provide a test data generation method, which can improve the rate and accuracy of test data generation.
Disclosure of Invention
In view of the above, it is desirable to provide a test data generation method, a test data generation apparatus, a computer device and a storage medium, which can improve the speed and accuracy of test data generation.
A first aspect of an embodiment of the present application provides a test data generation method, where the test data generation method includes:
acquiring target service scenes in a preset system, and acquiring input controls corresponding to texts to be input of each target service scene to obtain an input control set;
analyzing and acquiring the incidence relation among each input control in the input control set, and constructing a text logic tree according to the incidence relation;
determining a public manufacture number script and a non-public manufacture number script corresponding to the text logic tree, and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script;
acquiring a text description document corresponding to the text logic tree, and calling a preset algorithm to analyze the text description document to obtain a target weight of each input control;
selecting a target input control with the target weight value larger than a preset weight threshold value, and setting a monitoring node corresponding to the target input control;
executing the target number making script to obtain a number making result, and calling the monitoring node to detect whether the number making result corresponding to the target input control is abnormal or not;
and when the monitoring node detects that the number making result corresponding to the target input control is normal, determining that the number making is finished.
Further, in the test data generation method provided in the embodiment of the present application, the acquiring an input control corresponding to a text to be input of each target service scenario includes:
acquiring a target page corresponding to the target service scene and a page layout file corresponding to the target page;
analyzing the page layout file to obtain attribute information of each control in the target page;
detecting whether the attribute information contains a preset input control attribute;
and when the detection result shows that the attribute contains the preset input control attribute, determining that the control corresponding to the input control attribute is the input control.
Further, in the method for generating test data provided in the embodiment of the present application, the analyzing and obtaining an association relationship between each input control in the input control set includes:
acquiring a preset interface document corresponding to the target service scene;
analyzing the preset interface document to obtain an execution logic between input controls corresponding to the text to be input;
and determining the incidence relation among the input controls according to the execution logic.
Further, in the above test data generation method provided in the embodiment of the present application, the constructing a text logic tree according to the association relationship includes:
analyzing the incidence relation to obtain the input and output relation between the input controls;
determining a first text to be input corresponding to the first input control as an output element and determining a second text to be input corresponding to the second input control as an input element according to the input-output relationship;
and constructing a text logic tree by taking the output element as a father node and the input element as a child node.
Further, in the method for generating test data provided in an embodiment of the present application, the determining a public manufacture script and a non-public manufacture script corresponding to the text logic tree, and combining the public manufacture script and the non-public manufacture script to obtain a target manufacture script includes:
acquiring a preset number making script library, and selecting a public number making script from the preset number making script library;
determining a target test point corresponding to the target service scene, and acquiring a test requirement document corresponding to the target test point;
generating a non-public manufacture number script corresponding to the target test point according to the test requirement document and a preset manufacture number script template;
and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script.
Further, in the above test data generation method provided in the embodiment of the present application, the setting a monitoring node corresponding to the target input control includes:
acquiring a business rule of the target input control;
traversing a mapping relation between a preset service rule and an alarm rule according to the service rule to obtain a target alarm rule;
and setting a monitoring node according to the service rule and the target alarm rule.
Further, in the method for generating test data provided in the embodiment of the present application, the invoking the monitoring node to detect whether the number-making result corresponding to the target input control is abnormal includes:
acquiring a format result, a content result and a continuity result of the target input control;
comparing and analyzing the format result, the content result and the continuity result with a preset target service rule respectively to obtain comparison results;
detecting whether a result which does not meet the target service rule exists in the comparison result;
when the detection result is that the result which does not meet the target service rule exists in the comparison result, determining that the number making result of the target input control is abnormal;
and when the detection result is that the result which does not meet the target service rule does not exist in the comparison result, determining that the number making result of the target input control is normal.
A second aspect of the embodiments of the present application further provides a test data generating apparatus, where the test data generating apparatus includes:
the system comprises a scene acquisition module, a scene acquisition module and a text input module, wherein the scene acquisition module is used for acquiring target service scenes in a preset system and acquiring input controls corresponding to texts to be input of each target service scene to obtain an input control set;
the relation analysis module is used for analyzing and acquiring the incidence relation among all the input controls in the input control set and constructing a text logic tree according to the incidence relation;
the script determining module is used for determining a public manufacture number script and a non-public manufacture number script corresponding to the text logic tree, and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script;
the weight value obtaining module is used for obtaining a text description document corresponding to the text logic tree and calling a preset algorithm to analyze the text description document to obtain a target weight value of each input control;
the node setting module is used for selecting a target input control with the target weight value larger than a preset weight threshold value and setting a monitoring node corresponding to the target input control;
the abnormity detection module is used for calling the monitoring node to detect whether the number making result of the target input control is abnormal or not;
and the number determining module is used for determining that the number is finished when the monitoring node detects that the number result corresponding to the target input control is normal.
A third aspect of embodiments of the present application further provides a computer device, where the computer device includes a processor, and the processor is configured to implement the test data generation method according to any one of the above items when executing a computer program stored in a memory.
The fourth aspect of the embodiments of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any one of the above-mentioned test data generation methods.
According to the test data generation method, the test data generation device, the computer equipment and the computer readable storage medium provided by the embodiment of the application, firstly, incidence relation analysis is carried out on an input control set corresponding to a target service scene in a preset system, a text logic tree is constructed, then, a target manufacture script corresponding to the text logic is determined, and by establishing an integrated manufacture script corresponding to a plurality of target service scenes, the construction rate of the manufacture script can be improved, so that the manufacture efficiency is improved; in addition, the method realizes the automatic setting of the number making script by combining the public number making script and the non-public number making script, can improve the setting efficiency of the number making script and further improve the number making efficiency; in addition, the method calls a preset algorithm to analyze the text description document to obtain the target weight of each input control, and sets a monitoring node for the target input control with the target weight larger than a preset weight threshold value, so that the method can ensure the normal number making result of the important text and ensure the accuracy of the number making. The application can be applied to each function module in wisdom cities such as wisdom government affairs, wisdom traffic, for example, the test data generation module of wisdom government affairs etc. can promote the rapid development in wisdom city.
Drawings
Fig. 1 is a flowchart of a test data generation method according to an embodiment of the present application.
Fig. 2 is a structural diagram of a test data generating apparatus according to a second embodiment of the present application.
Fig. 3 is a schematic structural diagram of a computer device provided in the third embodiment of the present application.
The following detailed description will further illustrate the present application in conjunction with the above-described figures.
Detailed Description
In order that the above objects, features and advantages of the present application can be more clearly understood, a detailed description of the present application will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present application, and the described embodiments are a part, but not all, of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
The test data generation method provided by the embodiment of the invention is executed by computer equipment, and correspondingly, the test data generation device runs in the computer equipment.
Fig. 1 is a flowchart of a test data generation method according to a first embodiment of the present application. As shown in fig. 1, the test data generation method may include steps, and the order of the steps in the flowchart may be changed and some may be omitted according to different requirements.
S11, acquiring target service scenes in a preset system, and acquiring input controls corresponding to texts to be input of each target service scene to obtain an input control set.
In at least one embodiment of the present application, the predetermined system may be an internet product or other software system, for example, the predetermined system may be a sponsor access system. The preset system may include a plurality of target service scenarios, where the target service scenario may refer to different task processing modules of the preset system, and may be represented as different task processing pages in the preset system, for example, the target service scenario may include a data storage scenario, a financial accounting scenario, a credential preparation scenario, and the like, which is not limited herein. And each target service scene comprises a plurality of input controls and texts to be input, wherein the texts to be input refer to texts input into the input controls. And acquiring an input control set corresponding to the text to be input of each target business scene, wherein the input control set refers to a data set of the input controls.
The target service scenario may refer to different task processing modules of the preset system, and in order to ensure that different tasks can complete a specified target, functional tests need to be performed on the different tasks. Since different tasks process different data, data corresponding to the functional test task needs to be generated at the time of the functional test.
Optionally, the acquiring the input control of each target service scenario includes:
acquiring a target page corresponding to the target service scene and a page layout file corresponding to the target page;
analyzing the page layout file to obtain attribute information of each control in the target page;
detecting whether the attribute information contains a preset input control attribute;
and when the detection result shows that the attribute contains the preset input control attribute, determining that the control corresponding to the input control attribute is the input control.
Each target service scene may correspond to 1 or more target pages, and the target pages may be HTML pages. The target page includes a plurality of controls, for example, the target page may include a click control, an input control, and other controls. Different controls have unique corresponding control attributes, and the control can be determined to belong to a click control or an input control through the control attributes. The target page is correspondingly provided with a page layout file, and the page layout file can comprise control attributes and control layout information. The page layout file may be comprised of frame layout code characterizing a page layout style and control code for laying out controls, wherein the code for laying out controls is populated in the frame layout code. The control codes contain attribute codes of controls, the controls comprise clicking controls, inputting controls and the like, and the control codes contain clicking control codes and inputting control codes. The click control code carries a key code for identifying the click attribute, the input control code carries a key code for identifying the input attribute, and the attribute information of each control can be obtained by analyzing the key code corresponding to each control. Illustratively, the analyzing the page layout file to obtain the attribute information of each control in the target page includes: analyzing the page layout file to obtain a control code of each control in the target page; acquiring attribute codes in the control codes; detecting whether the attribute codes carry key codes or not; and when the detection result is that the key code is carried in the attribute code, determining the attribute information of the control corresponding to the key code.
S12, analyzing and obtaining the incidence relation among each input control in the input control set, and constructing a text logic tree according to the incidence relation.
In at least one embodiment of the present application, an association relationship exists between each input control in the input control set, and the association relationship may include a parallel relationship and a call relationship. Illustratively, the input control set may include a funder a, a credit increase mode b, a borrowing state c, a loan amount d, and a financial accounting result e, where the financial accounting result e is obtained by comprehensively analyzing the funder a, the credit increase mode b, the borrowing state c, and the loan amount d, and then the correlation between the financial accounting result e and the funder a, the credit increase mode b, the borrowing state c, and the loan amount d is a call relationship; the fund party a, the credit increase mode b, the borrowing state c and the loan amount d are in parallel relation. The incidence relation can be determined by analyzing a preset interface document. The text logic tree is of a tree structure, and refers to a data structure with one-to-many tree relationship among data elements.
Optionally, the analyzing and obtaining the association relationship between each input control in the input control set includes:
acquiring a preset interface document corresponding to the target service scene;
analyzing the preset interface document to obtain an execution logic between input controls corresponding to the text to be input;
and determining the incidence relation among the input controls according to the execution logic.
The preset interface document comprises attribute information and execution codes of all controls of a target page, and execution logic between input controls can be determined according to the execution codes. The execution logic may refer to an operation relationship between input controls corresponding to the text to be input, and the execution logic may be identified by an operation symbol, where different operation symbols correspond to different operation relationships between the input controls. For example, the operation symbol may be an arithmetic operation symbol such as "+", "-", "/" and "═ and the like, and the operation symbol may also be"? "and": "the conditional operation notation is not limited herein. And the execution logic and the association relationship have a corresponding relationship, and the execution logic can determine the association relationship between each input control determined by the execution logic by inquiring the corresponding relationship.
In at least one embodiment of the present application, the input and output relationship between the input controls can be obtained according to the association relationship. Taking the example that the input control set may include a fund party a, a credit increase mode b, a borrowing state c, a loan amount d, and a financial accounting result e, wherein the financial accounting result e is obtained by comprehensively analyzing the fund party a, the credit increase mode b, the borrowing state c, and the loan amount d. Therefore, the fund party a, the credit increase mode b, the borrowing state c and the loan amount d are all second texts to be input corresponding to the second input control and serve as input elements, and the financial accounting result e is a first text to be input corresponding to the first input control and serves as an output element. The output elements are used as father nodes of the logic tree, and the input elements are used as child nodes of the logic tree to construct the text logic tree.
Optionally, the constructing a text logic tree according to the association relationship includes:
analyzing the incidence relation to obtain the input and output relation between the input controls;
determining a first text to be input corresponding to the first input control as an output element and determining a second text to be input corresponding to the second input control as an input element according to the input-output relationship;
and constructing a text logic tree by taking the output element as a father node and the input element as a child node.
And S13, determining a public manufacture number script and a non-public manufacture number script corresponding to the text logic tree, and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script.
In at least one embodiment of the present application, the target number script refers to an execution script for performing number processing on each target service scenario in the preset system, and the target number script is composed of the common number script and the non-common number script. The target number script can be preset by system personnel or can be automatically set by the system. The public manufacture number script refers to a manufacture number script which can be reused in different service scenes, and the non-public manufacture number script refers to a manufacture number script which is unique to each service scene. The public manufacture script can be obtained from manufacture scripts of related systems, and the non-public manufacture script can be obtained by adjusting according to the manufacture scripts. This application through the combination public number script with the mode of non-public number script realizes making the automatic setting of number script, can improve the efficiency of setting up of number script, and then improves the number efficiency of making.
Optionally, the determining a public manufacture script and a non-public manufacture script corresponding to the text logic tree includes:
acquiring a preset number making script library, and selecting a public number making script from the preset number making script library;
determining a target test point corresponding to the target service scene, and acquiring a test requirement document corresponding to the target test point;
generating a non-public manufacture number script corresponding to the target test point according to the test requirement document and a preset manufacture number script template;
and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script.
The preset number script library comprises public number scripts which are stored in advance and are required by testing of a plurality of other systems, and the other systems are close to the target service scene in the preset system. The public numbering script is different from a non-public numbering script by a preset identifier, the preset identifier is a preset mark for identifying the public script, and the preset identifier can be a digital identifier, a letter identifier or a color identifier. It can be understood that the position of the public manufacture number script in a complete manufacture number script is generally determined, and when a preset identifier is added to the public manufacture number script, the script position information of the public manufacture number script can be carried in the preset identifier. For example, the script position information may be a beginning portion or an end portion of the full manufacture script. The target test point refers to a preset interface to be tested of the preset system, and a test requirement document exists for each target test point. The test requirement document is a document which is preset by system personnel and comprises test basic information, and a test requirement data list corresponding to the target test point can be extracted by analyzing the test requirement document. In an embodiment, the manufacture script template has content items to be filled, the test requirement data list has a corresponding relationship with the content items to be filled, and the test requirement data list is filled into the corresponding content items to be filled by inquiring the corresponding relationship, so that the non-public manufacture script corresponding to the target test point can be generated. The corresponding relationship may be determined by establishing a label, the test requirement data list with the same label and the content item to be filled have a corresponding relationship, and the label may be a color label, a numeric label, or a letter label.
Wherein the combining the public manufacture script and the non-public manufacture script to obtain the target manufacture script may include: determining script position information according to the public number script carrying a preset identifier; and setting the public manufacture number script at the beginning part and the ending part according to the script position information, and filling the non-public manufacture number script in the middle part. It is to be understood that, after the combining the common manufacture script and the non-common manufacture script to obtain the target manufacture script, the method further includes: sending the combined target manufacture number script to a preset contact person, and determining whether the combination mode of the target manufacture number script is accurate or not by the preset contact person; when the determination result is that the combination mode of the target manufacture number script is not accurate, the preset contact person modifies the target manufacture number script; and when the determination result is that the combination mode of the target manufacture number script is accurate, the target manufacture number script does not need to be modified.
S14, obtaining a text description document corresponding to the text logic tree, and calling a preset algorithm to analyze the text description document to obtain a target weight of each input control.
In at least one embodiment of the present application, the text description document is stored in a target node of a blockchain, and is used for describing an effect of an input control on a service scenario. The different weights correspond to the importance degree of the input control to the service scene, and the greater the weight is, the higher the importance degree of the input control to the service scene is; the smaller the weight, the less important the input control is to the business scenario. The preset algorithm is a preset algorithm used for obtaining a target weight of each input control, and the preset algorithm can be a TD-IDF algorithm.
Optionally, the analyzing the text description document by using a preset algorithm to obtain the target weight of each input control includes:
preprocessing the text description document to obtain a normalized target text description document;
processing the target text description document based on a preset TD-IDF algorithm, and calculating the word frequency and the reverse file frequency of each input control;
and determining the target weight of the input control according to the word frequency and the reverse file frequency.
The preprocessing refers to cleaning the text description document to remove links, invalid characters and invalid sentences in the text description document.
S15, selecting the target input control with the target weight value larger than the preset weight threshold value, and setting the monitoring node corresponding to the target input control.
In at least one embodiment of the present application, the preset weight threshold is a preset threshold, and the selected target input control with the target weight greater than the preset weight threshold has a higher importance degree to a service scene, and a success rate of making the target input control needs to be ensured. The number of the target input controls may be 1, or may be multiple. When the number of the target input controls is multiple, a monitoring node may be set for each target input control, or monitoring nodes may be set for all the target input controls in a unified manner, which is not limited herein.
Optionally, the setting a monitoring node corresponding to the target input control includes:
acquiring a business rule of the target input control;
traversing a mapping relation between a preset service rule and an alarm rule according to the service rule to obtain a target alarm rule;
and setting a monitoring node according to the service rule and the target alarm rule.
The business rules may be stored in a Redis (key-value pair storage system) system, a corresponding relationship exists between the target input control and the business rules, and the business rules corresponding to the target input control can be obtained by querying the corresponding relationship. The business rule refers to a data rule to be followed by a target text to be input corresponding to the target input control, and the business rule may include a format rule, a content rule and a continuity rule. The format rule refers to the format requirement of the target text to be input, such as the requirements of field length, field type and the like; the content rule refers to the content requirement of the target text to be input, for example, for a certain target text to be input, the corresponding input text should be two contents of yes and no; the continuity rule means that the number making process aiming at the target text to be input needs to be continuous and avoids interruption. The alarm rule comprises a notification object, a notification mode, the maximum alarm sending times and customized alarm prompt information. According to the method and the device, the corresponding alarm rules are set according to different business rules, so that the alarm problem can be more effectively and specifically reflected.
Illustratively, the setting a monitoring node according to the business rule and the target alarm rule includes: analyzing the service rule to obtain a target monitoring item; determining the target alarm rule corresponding to the target monitoring item; and creating a monitoring script corresponding to the monitoring node according to the target monitoring item and the target alarm rule. And the target monitoring item represents an index needing to be monitored. When the business rule includes a format rule, a content rule, and a continuity rule of the target text to be input, the target monitoring item may correspond to a format item, a content item, and a continuity item of the text to be input. It can be understood that, when the monitoring node monitors that at least one of the format rule, the content rule and the continuity rule does not conform to the business rule, the target monitoring item is set to be in an alarm state, and an alarm message is sent according to the target alarm rule.
And S16, executing the target number making script to obtain a number making result, and calling the monitoring node to detect whether the number making result corresponding to the target input control is abnormal.
In at least one embodiment of the present application, the target number script is executed to obtain a number result, where the number result may include a format result, a content result, and a continuity result, and the monitoring node compares the number result with a preset service rule to determine whether the number result of the target input control is abnormal.
Optionally, the invoking the monitoring node to detect whether the number making result of the target input control is abnormal includes:
acquiring a format result, a content result and a continuity result of the target input control;
comparing and analyzing the format result, the content result and the continuity result with a preset target service rule respectively to obtain comparison results;
detecting whether a result which does not meet the target service rule exists in the comparison result;
when the detection result is that the result which does not meet the target service rule exists in the comparison result, determining that the number making result of the target input control is abnormal;
and when the detection result is that the result which does not meet the target service rule does not exist in the comparison result, determining that the number making result of the target input control is normal.
And S17, when the monitoring node detects that the number result corresponding to the target input control is normal, determining that the number is complete.
In at least one embodiment of the present application, when the monitoring node detects that the number result of the target input control is normal, it determines that the number is complete. When the monitoring node detects that the number making result of the target input control is abnormal, the method further comprises the following steps: and acquiring and deleting test data corresponding to abnormal number making results.
According to the test data generation method provided by the embodiment of the application, firstly, the incidence relation analysis is carried out on the input control set corresponding to the target service scene in the preset system, the text logic tree is constructed, then the target manufacture script corresponding to the text logic is determined, and the construction rate of the manufacture script can be improved by establishing the integrated manufacture script corresponding to a plurality of target service scenes, so that the manufacture efficiency is improved; in addition, the method realizes the automatic setting of the number making script by combining the public number making script and the non-public number making script, can improve the setting efficiency of the number making script and further improve the number making efficiency; in addition, the method calls a preset algorithm to analyze the text description document to obtain the target weight of each input control, and sets a monitoring node for the target input control with the target weight larger than a preset weight threshold value, so that the method can ensure the normal number making result of the important text and ensure the accuracy of the number making. This application can be applied to in each functional module in wisdom cities such as wisdom government affairs, wisdom traffic, for example the computer lab monitoring module of wisdom government affairs etc. can promote the rapid development in wisdom city.
Fig. 2 is a structural diagram of a test data generating apparatus according to a second embodiment of the present application.
In some embodiments, the test data generating device 20 may include a plurality of functional modules composed of computer program segments. The computer program of each program segment in the test data generation apparatus 20 may be stored in a memory of a computer device and executed by at least one processor to perform the functions of test data generation (described in detail in fig. 1).
In this embodiment, the test data generating apparatus 20 may be divided into a plurality of functional modules according to the functions performed by the apparatus. The functional module may include: the system comprises a scene obtaining module 201, a relation analyzing module 202, a script determining module 203, a weight obtaining module 204, a node setting module 205, an anomaly detecting module 206 and a number determining module 207. A module as referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in a memory. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The scene obtaining module 201 may be configured to obtain target service scenes in a preset system, and acquire an input control corresponding to a text to be input of each target service scene to obtain an input control set.
In at least one embodiment of the present application, the predetermined system may be an internet product or other software system, for example, the predetermined system may be a sponsor access system. The preset system may include a plurality of target service scenarios, where the target service scenario may refer to different task processing modules of the preset system, and may be represented as different task processing pages in the preset system, for example, the target service scenario may include a data storage scenario, a financial accounting scenario, a credential preparation scenario, and the like, which is not limited herein. And each target service scene comprises a plurality of input controls and texts to be input, wherein the texts to be input refer to texts input into the input controls. And acquiring an input control set corresponding to the text to be input of each target business scene, wherein the input control set refers to a data set of the input controls.
The target service scenario may refer to different task processing modules of the preset system, and in order to ensure that different tasks can complete a specified target, functional tests need to be performed on the different tasks. Since different tasks process different data, data corresponding to the functional test task needs to be generated at the time of the functional test.
Optionally, the acquiring the input control of each target service scenario includes:
acquiring a target page corresponding to the target service scene and a page layout file corresponding to the target page;
analyzing the page layout file to obtain attribute information of each control in the target page;
detecting whether the attribute information contains a preset input control attribute;
and when the detection result shows that the attribute contains the preset input control attribute, determining that the control corresponding to the input control attribute is the input control.
Each target service scene may correspond to 1 or more target pages, and the target pages may be HTML pages. The target page is correspondingly provided with a page layout file, and the page layout file can comprise control attributes and control layout information. The page layout file may be comprised of frame layout code characterizing a page layout style and control code for laying out controls, wherein the code for laying out controls is populated in the frame layout code. The control codes contain attribute codes of controls, the controls comprise clicking controls, inputting controls and the like, and the control codes contain clicking control codes and inputting control codes. The click control code carries a key code for identifying the click attribute, the input control code carries a key code for identifying the input attribute, and the attribute information of each control can be obtained by analyzing the key code corresponding to each control. Illustratively, the analyzing the page layout file to obtain the attribute information of each control in the target page includes: analyzing the page layout file to obtain a control code of each control in the target page; acquiring attribute codes in the control codes; detecting whether the attribute codes carry key codes or not; and when the detection result is that the key code is carried in the attribute code, determining the attribute information of the control corresponding to the key code.
The target page includes a plurality of controls, for example, the target page may include a click control, an input control, and other controls. Different controls have unique corresponding control attributes, and the control can be determined to belong to a click control or an input control through the control attributes. The attribute of the control corresponding to the text to be input is an input control attribute, the text box to be input of the target page can be determined by detecting whether the target page contains a preset input control attribute, and the content information corresponding to the text box to be input is obtained and used as the text to be input.
The relationship analysis module 202 may be configured to analyze and obtain an association relationship between each input control in the input control set, and construct a text logic tree according to the association relationship.
In at least one embodiment of the present application, an association relationship exists between each input control in the input control set, and the association relationship may include a parallel relationship and a call relationship. Illustratively, the input control set may include a funder a, a credit increase mode b, a borrowing state c, a loan amount d, and a financial accounting result e, where the financial accounting result e is obtained by comprehensively analyzing the funder a, the credit increase mode b, the borrowing state c, and the loan amount d, and then the correlation between the financial accounting result e and the funder a, the credit increase mode b, the borrowing state c, and the loan amount d is a call relationship; the fund party a, the credit increase mode b, the borrowing state c and the loan amount d are in parallel relation. The incidence relation can be determined by analyzing a preset interface document. The text logic tree is of a tree structure, and refers to a data structure with one-to-many tree relationship among data elements.
Optionally, the analyzing and obtaining the association relationship between each input control in the input control set includes:
acquiring a preset interface document corresponding to the target service scene;
analyzing the preset interface document to obtain an execution logic between input controls corresponding to the text to be input;
and determining the incidence relation among the input controls according to the execution logic.
The preset interface document comprises attribute information and execution codes of all controls of a target page, and execution logic between input controls can be determined according to the execution codes. The execution logic may refer to an operation relationship between input controls corresponding to the text to be input, and the execution logic may be identified by an operation symbol, where different operation symbols correspond to different operation relationships between the input controls. For example, the operation symbol may be an arithmetic operation symbol such as "+", "-", "/" and "═ and the like, and the operation symbol may also be"? "and": "the conditional operation notation is not limited herein. And the execution logic and the association relationship have a corresponding relationship, and the execution logic can determine the association relationship between each input control determined by the execution logic by inquiring the corresponding relationship. In at least one embodiment of the present application, the input and output relationship between the input controls can be obtained according to the association relationship. Taking the example that the input control set may include a fund party a, a credit increase mode b, a borrowing state c, a loan amount d, and a financial accounting result e, wherein the financial accounting result e is obtained by comprehensively analyzing the fund party a, the credit increase mode b, the borrowing state c, and the loan amount d. Therefore, the fund party a, the credit increase mode b, the borrowing state c and the loan amount d are all second texts to be input corresponding to the second input control and serve as input elements, and the financial accounting result e is a first text to be input corresponding to the first input control and serves as an output element. The output elements are used as father nodes of the logic tree, and the input elements are used as child nodes of the logic tree to construct the text logic tree.
Optionally, the constructing a text logic tree according to the association relationship includes:
analyzing the incidence relation to obtain the input and output relation between the input controls;
determining a first text to be input corresponding to the first input control as an output element and determining a second text to be input corresponding to the second input control as an input element according to the input-output relationship;
and constructing a text logic tree by taking the output element as a father node and the input element as a child node.
The script determining module 203 may be configured to determine a public manufacture script and a non-public manufacture script corresponding to the text logic tree, and combine the public manufacture script and the non-public manufacture script to obtain a target manufacture script.
In at least one embodiment of the present application, the target number script refers to an execution script for performing number processing on each target service scenario in the preset system, and the target number script is composed of the common number script and the non-common number script. The target number script can be preset by system personnel or can be automatically set by the system. The public manufacture number script refers to a manufacture number script which can be reused in different service scenes, and the non-public manufacture number script refers to a manufacture number script which is unique to each service scene. The public manufacture script can be obtained from manufacture scripts of related systems, and the non-public manufacture script can be obtained by adjusting according to the manufacture scripts. This application through the combination public number script with the mode of non-public number script realizes making the automatic setting of number script, can improve the efficiency of setting up of number script, and then improves the number efficiency of making.
Optionally, the determining a public manufacture script and a non-public manufacture script corresponding to the text logic tree includes:
acquiring a preset number making script library, and selecting a public number making script from the preset number making script library;
determining a target test point corresponding to the target service scene, and acquiring a test requirement document corresponding to the target test point;
generating a non-public manufacture number script corresponding to the target test point according to the test requirement document and a preset manufacture number script template;
and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script.
The preset number script library comprises public number scripts which are stored in advance and are required by testing of a plurality of other systems, and the other systems are close to the target service scene in the preset system. The public numbering script is different from a non-public numbering script by a preset identifier, the preset identifier is a preset mark for identifying the public script, and the preset identifier can be a digital identifier, a letter identifier or a color identifier. It can be understood that the position of the public manufacture number script in a complete manufacture number script is generally determined, and when a preset identifier is added to the public manufacture number script, the script position information of the public manufacture number script can be carried in the preset identifier. For example, the script position information may be a beginning portion or an end portion of the full manufacture script. The target test point refers to a preset interface to be tested of the preset system, and a test requirement document exists for each target test point. The test requirement document is a document which is preset by system personnel and comprises test basic information, and a test requirement data list corresponding to the target test point can be extracted by analyzing the test requirement document. In an embodiment, the manufacture script template has content items to be filled, the test requirement data list has a corresponding relationship with the content items to be filled, and the test requirement data list is filled into the corresponding content items to be filled by inquiring the corresponding relationship, so that the non-public manufacture script corresponding to the target test point can be generated. The corresponding relationship may be determined by establishing a label, the test requirement data list with the same label and the content item to be filled have a corresponding relationship, and the label may be a color label, a numeric label, or a letter label.
Wherein the combining the public manufacture script and the non-public manufacture script to obtain the target manufacture script may include: determining script position information according to the public number script carrying a preset identifier; and setting the public manufacture number script at the beginning part and the ending part according to the script position information, and filling the non-public manufacture number script in the middle part. It is to be understood that, after the combining the public manufacture script and the non-public manufacture script to obtain the target manufacture script, the script determining module 203 further includes: sending the combined target manufacture number script to a preset contact person, and determining whether the combination mode of the target manufacture number script is accurate or not by the preset contact person; when the determination result is that the combination mode of the target manufacture number script is not accurate, the preset contact person modifies the target manufacture number script; and when the determination result is that the combination mode of the target manufacture number script is accurate, the target manufacture number script does not need to be modified.
The weight obtaining module 204 may be configured to obtain a text description document corresponding to the text logic tree, and invoke a preset algorithm to analyze the text description document to obtain a target weight of each input control.
In at least one embodiment of the present application, the text description document is stored in a target node of a blockchain, and is used for describing an effect of an input control on a service scenario. The different weights correspond to the importance degree of the input control to the service scene, and the greater the weight is, the higher the importance degree of the input control to the service scene is; the smaller the weight, the less important the input control is to the business scenario. The preset algorithm is a preset algorithm used for obtaining a target weight of each input control, and the preset algorithm can be a TD-IDF algorithm.
Optionally, the analyzing the text description document by using a preset algorithm to obtain the target weight of each input control includes:
preprocessing the text description document to obtain a normalized target text description document;
processing the target text description document based on a preset TD-IDF algorithm, and calculating the word frequency and the reverse file frequency of each input control;
and determining the target weight of the input control according to the word frequency and the reverse file frequency.
The preprocessing refers to cleaning the text description document to remove links, invalid characters and invalid sentences in the text description document.
The node setting module 205 may be configured to select a target input control with the target weight greater than a preset weight threshold, and set a monitoring node corresponding to the target input control.
In at least one embodiment of the present application, the preset weight threshold is a preset threshold, and the selected target input control with the target weight greater than the preset weight threshold has a higher importance degree to a service scene, and a success rate of making the target input control needs to be ensured. The number of the target input controls may be 1, or may be multiple. When the number of the target input controls is multiple, a monitoring node may be set for each target input control, or monitoring nodes may be set for all the target input controls in a unified manner, which is not limited herein.
Optionally, the setting a monitoring node corresponding to the target input control includes:
acquiring a business rule of the target input control;
traversing a mapping relation between a preset service rule and an alarm rule according to the service rule to obtain a target alarm rule;
and setting a monitoring node according to the service rule and the target alarm rule.
The business rules may be stored in a Redis (key-value pair storage system) system, a corresponding relationship exists between the target input control and the business rules, and the business rules corresponding to the target input control can be obtained by querying the corresponding relationship. The business rule refers to a data rule to be followed by a target text to be input corresponding to the target input control, and the business rule may include a format rule, a content rule and a continuity rule. The format rule refers to the format requirement of the target text to be input, such as the requirements of field length, field type and the like; the content rule refers to the content requirement of the target text to be input, for example, for a certain target text to be input, the corresponding input text should be two contents of yes and no; the continuity rule means that the number making process of the text to be input aiming at the target needs to be continuous. The alarm rule comprises a notification object, a notification mode, the maximum alarm sending times and customized alarm prompt information. According to the method and the device, the corresponding alarm rules are set according to different business rules, so that the alarm problem can be more effectively and specifically reflected.
Illustratively, the setting a monitoring node according to the business rule and the target alarm rule includes: analyzing the service rule to obtain a target monitoring item; determining the target alarm rule corresponding to the target monitoring item; and creating a monitoring script corresponding to the monitoring node according to the target monitoring item and the target alarm rule. And the target monitoring item represents an index needing to be monitored. When the business rule includes a format rule, a content rule, and a continuity rule of the target text to be input, the target monitoring item may correspond to a format item, a content item, and a continuity item of the text to be input. It can be understood that, when the monitoring node monitors that at least one of the format rule, the content rule and the continuity rule does not conform to the business rule, the target monitoring item is set to be in an alarm state, and an alarm message is sent according to the target alarm rule.
The anomaly detection module 206 may be configured to invoke the monitoring node to detect whether an anomaly exists in the result of the number of artifacts of the target input control.
In at least one embodiment of the present application, the number-of-manufacture result may include a format result, a content result, and a continuity result, and the monitoring node compares the number-of-manufacture result with a preset business rule, so as to determine whether the number-of-manufacture result of the target input control is abnormal.
Optionally, the invoking the monitoring node to detect whether the number making result of the target input control is abnormal includes:
acquiring a format result, a content result and a continuity result of the target input control;
comparing and analyzing the format result, the content result and the continuity result with a preset target service rule respectively to obtain comparison results;
detecting whether a result which does not meet the target service rule exists in the comparison result;
when the detection result is that the result which does not meet the target service rule exists in the comparison result, determining that the number making result of the target input control is abnormal;
and when the detection result is that the result which does not meet the target service rule does not exist in the comparison result, determining that the number making result of the target input control is normal.
The number determining module 207 may be configured to determine that the number is complete when the monitoring node detects that the number result of the target input control is normal.
In at least one embodiment of the present application, when the monitoring node detects that the number result of the target input control is normal, it determines that the number is complete. When the monitoring node detects that the number result of the target input control is abnormal, the number determining module 207 further includes: and acquiring and deleting test data corresponding to abnormal number making results.
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present application. In the preferred embodiment of the present application, the computer device 3 includes a memory 31, at least one processor 32, at least one communication bus 33, and a transceiver 34.
It will be appreciated by those skilled in the art that the configuration of the computer device shown in fig. 3 is not a limitation of the embodiments of the present application, and may be a bus-type configuration or a star-type configuration, and that the computer device 3 may include more or less hardware or software than those shown, or a different arrangement of components.
In some embodiments, the computer device 3 is a device capable of automatically performing numerical calculation and/or information processing according to instructions set or stored in advance, and the hardware includes but is not limited to a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The computer device 3 may also include a client device, which includes, but is not limited to, any electronic product capable of interacting with a client through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a digital camera, etc.
It should be noted that the computer device 3 is only an example, and other existing or future electronic products, such as those that may be adapted to the present application, are also included in the scope of the present application and are incorporated herein by reference.
In some embodiments, the memory 31 has stored therein a computer program which, when executed by the at least one processor 32, implements all or part of the steps of the test data generation method as described. The Memory 31 includes a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an electronically Erasable rewritable Read-Only Memory (Electrically-Erasable Programmable Read-Only Memory (EEPROM)), an optical Read-Only disk (CD-ROM) or other optical disk Memory, a magnetic disk Memory, a tape Memory, or any other medium readable by a computer capable of carrying or storing data.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In some embodiments, the at least one processor 32 is a Control Unit (Control Unit) of the computer device 3, connects various components of the entire computer device 3 by using various interfaces and lines, and executes various functions and processes data of the computer device 3 by running or executing programs or modules stored in the memory 31 and calling data stored in the memory 31. For example, the at least one processor 32, when executing the computer program stored in the memory, implements all or part of the steps of the test data generation method described in the embodiments of the present application; or to implement all or part of the functionality of the test data generation apparatus. The at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips.
In some embodiments, the at least one communication bus 33 is arranged to enable connection communication between the memory 31 and the at least one processor 32 or the like.
Although not shown, the computer device 3 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 32 through a power management device, so as to implement functions of managing charging, discharging, and power consumption through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The computer device 3 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a computer device, or a network device) or a processor (processor) to execute parts of the methods according to the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or that the singular does not exclude the plural. A plurality of units or means recited in the specification may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.
Claims (10)
1. A test data generation method, characterized by comprising:
acquiring target service scenes in a preset system, and acquiring input controls corresponding to texts to be input of each target service scene to obtain an input control set;
analyzing and acquiring the incidence relation among each input control in the input control set, and constructing a text logic tree according to the incidence relation;
determining a public manufacture number script and a non-public manufacture number script corresponding to the text logic tree, and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script;
acquiring a text description document corresponding to the text logic tree, and calling a preset algorithm to analyze the text description document to obtain a target weight of each input control;
selecting a target input control with the target weight value larger than a preset weight threshold value, and setting a monitoring node corresponding to the target input control;
executing the target number making script to obtain a number making result, and calling the monitoring node to detect whether the number making result corresponding to the target input control is abnormal or not;
and when the monitoring node detects that the number making result corresponding to the target input control is normal, determining that the number making is finished.
2. The method for generating test data according to claim 1, wherein the collecting the input control corresponding to the text to be input of each target service scenario comprises:
acquiring a target page corresponding to the target service scene and a page layout file corresponding to the target page;
analyzing the page layout file to obtain attribute information of each control in the target page;
detecting whether the attribute information contains a preset input control attribute;
and when the detection result shows that the attribute contains the preset input control attribute, determining that the control corresponding to the input control attribute is the input control.
3. The method according to claim 1, wherein the analyzing and obtaining the association relationship between each of the input controls in the input control set comprises:
acquiring a preset interface document corresponding to the target service scene;
analyzing the preset interface document to obtain an execution logic between input controls corresponding to the text to be input;
and determining the incidence relation among the input controls according to the execution logic.
4. The method of generating test data according to claim 3, wherein the constructing a text logic tree according to the association relationship comprises:
analyzing the incidence relation to obtain the input and output relation between the input controls;
determining a first text to be input corresponding to the first input control as an output element and determining a second text to be input corresponding to the second input control as an input element according to the input-output relationship;
and constructing a text logic tree by taking the output element as a father node and the input element as a child node.
5. The method of claim 1, wherein the determining a common and non-common number script corresponding to the text logic tree, and combining the common number script and the non-common number script to obtain a target number script comprises:
acquiring a preset number making script library, and selecting a public number making script from the preset number making script library;
determining a target test point corresponding to the target service scene, and acquiring a test requirement document corresponding to the target test point;
generating a non-public manufacture number script corresponding to the target test point according to the test requirement document and a preset manufacture number script template;
and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script.
6. The method according to claim 1, wherein the setting of the monitoring node corresponding to the target input control includes:
acquiring a business rule of the target input control;
traversing a mapping relation between a preset service rule and an alarm rule according to the service rule to obtain a target alarm rule;
and setting a monitoring node according to the service rule and the target alarm rule.
7. The method for generating test data according to claim 1, wherein the invoking the monitoring node to detect whether the number making result corresponding to the target input control is abnormal comprises:
acquiring a format result, a content result and a continuity result of the target input control;
comparing and analyzing the format result, the content result and the continuity result with a preset target service rule respectively to obtain comparison results;
detecting whether a result which does not meet the target service rule exists in the comparison result;
when the detection result is that the result which does not meet the target service rule exists in the comparison result, determining that the number making result of the target input control is abnormal;
and when the detection result is that the result which does not meet the target service rule does not exist in the comparison result, determining that the number making result of the target input control is normal.
8. A test data generation apparatus, characterized by comprising:
the system comprises a scene acquisition module, a scene acquisition module and a text input module, wherein the scene acquisition module is used for acquiring target service scenes in a preset system and acquiring input controls corresponding to texts to be input of each target service scene to obtain an input control set;
the relation analysis module is used for analyzing and acquiring the incidence relation among all the input controls in the input control set and constructing a text logic tree according to the incidence relation;
the script determining module is used for determining a public manufacture number script and a non-public manufacture number script corresponding to the text logic tree, and combining the public manufacture number script and the non-public manufacture number script to obtain a target manufacture number script;
the weight value obtaining module is used for obtaining a text description document corresponding to the text logic tree and calling a preset algorithm to analyze the text description document to obtain a target weight value of each input control;
the node setting module is used for selecting a target input control with the target weight value larger than a preset weight threshold value and setting a monitoring node corresponding to the target input control;
the abnormity detection module is used for calling the monitoring node to detect whether the number making result of the target input control is abnormal or not;
and the number determining module is used for determining that the number is finished when the monitoring node detects that the number result corresponding to the target input control is normal.
9. A computer device, characterized in that the computer device comprises a processor for implementing the test data generation method according to any one of claims 1 to 7 when executing a computer program stored in a memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a test data generation method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110461528.9A CN112948275A (en) | 2021-04-27 | 2021-04-27 | Test data generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110461528.9A CN112948275A (en) | 2021-04-27 | 2021-04-27 | Test data generation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112948275A true CN112948275A (en) | 2021-06-11 |
Family
ID=76233566
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110461528.9A Pending CN112948275A (en) | 2021-04-27 | 2021-04-27 | Test data generation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112948275A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656295A (en) * | 2021-08-10 | 2021-11-16 | 上海浦东发展银行股份有限公司 | Automatic generation method and device of test data, electronic equipment and storage medium |
CN114020611A (en) * | 2021-10-28 | 2022-02-08 | 平安银行股份有限公司 | Test data monitoring processing method and device, computer equipment and storage medium |
CN114025027A (en) * | 2021-11-02 | 2022-02-08 | 浙江三维万易联科技有限公司 | Data transmission script running method and device, storage medium and electronic device |
CN114281707A (en) * | 2022-01-12 | 2022-04-05 | 平安普惠企业管理有限公司 | Number making method, service application testing method and related equipment thereof |
CN116541305A (en) * | 2023-06-26 | 2023-08-04 | 京东方艺云(杭州)科技有限公司 | Abnormality detection method and device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012064136A (en) * | 2010-09-17 | 2012-03-29 | Nippon Telegr & Teleph Corp <Ntt> | Test data generation method, test data generation device, and test data generation program |
US20120173587A1 (en) * | 2010-12-30 | 2012-07-05 | International Business Machines Corporation | Test data generation and scale up for database testing using unique common factor sequencing |
CN108984712A (en) * | 2018-07-06 | 2018-12-11 | 深圳前海微众银行股份有限公司 | Counting method, equipment and readable storage medium storing program for executing are made based on business scenario |
US20190179732A1 (en) * | 2017-12-08 | 2019-06-13 | Cognizant Technology Solutions India Pvt. Ltd. | System and method for automatically generating software testing scripts from test cases |
CN110058990A (en) * | 2019-03-12 | 2019-07-26 | 平安普惠企业管理有限公司 | Performance test methods and device, computer equipment, storage medium |
CN110399309A (en) * | 2019-08-02 | 2019-11-01 | 中国工商银行股份有限公司 | A kind of test data generating method and device |
CN111221726A (en) * | 2019-12-25 | 2020-06-02 | 平安普惠企业管理有限公司 | Test data generation method and device, storage medium and intelligent equipment |
US20210089435A1 (en) * | 2019-09-19 | 2021-03-25 | Sap Se | Open Data Protocol Performance Test Automation Intelligence (OPT-AI) |
-
2021
- 2021-04-27 CN CN202110461528.9A patent/CN112948275A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012064136A (en) * | 2010-09-17 | 2012-03-29 | Nippon Telegr & Teleph Corp <Ntt> | Test data generation method, test data generation device, and test data generation program |
US20120173587A1 (en) * | 2010-12-30 | 2012-07-05 | International Business Machines Corporation | Test data generation and scale up for database testing using unique common factor sequencing |
US20190179732A1 (en) * | 2017-12-08 | 2019-06-13 | Cognizant Technology Solutions India Pvt. Ltd. | System and method for automatically generating software testing scripts from test cases |
CN108984712A (en) * | 2018-07-06 | 2018-12-11 | 深圳前海微众银行股份有限公司 | Counting method, equipment and readable storage medium storing program for executing are made based on business scenario |
CN110058990A (en) * | 2019-03-12 | 2019-07-26 | 平安普惠企业管理有限公司 | Performance test methods and device, computer equipment, storage medium |
CN110399309A (en) * | 2019-08-02 | 2019-11-01 | 中国工商银行股份有限公司 | A kind of test data generating method and device |
US20210089435A1 (en) * | 2019-09-19 | 2021-03-25 | Sap Se | Open Data Protocol Performance Test Automation Intelligence (OPT-AI) |
CN111221726A (en) * | 2019-12-25 | 2020-06-02 | 平安普惠企业管理有限公司 | Test data generation method and device, storage medium and intelligent equipment |
Non-Patent Citations (1)
Title |
---|
侯莹;洪征;潘;吴礼发;: "基于模型的Fuzzing测试脚本自动化生成", 计算机科学, no. 03 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656295A (en) * | 2021-08-10 | 2021-11-16 | 上海浦东发展银行股份有限公司 | Automatic generation method and device of test data, electronic equipment and storage medium |
CN113656295B (en) * | 2021-08-10 | 2024-06-07 | 上海浦东发展银行股份有限公司 | Automatic generation method and device of test data, electronic equipment and storage medium |
CN114020611A (en) * | 2021-10-28 | 2022-02-08 | 平安银行股份有限公司 | Test data monitoring processing method and device, computer equipment and storage medium |
CN114020611B (en) * | 2021-10-28 | 2024-11-01 | 平安银行股份有限公司 | Test data monitoring processing method and device, computer equipment and storage medium |
CN114025027A (en) * | 2021-11-02 | 2022-02-08 | 浙江三维万易联科技有限公司 | Data transmission script running method and device, storage medium and electronic device |
CN114025027B (en) * | 2021-11-02 | 2023-10-03 | 三维通信股份有限公司 | Method and device for running data transmission script, storage medium and electronic device |
CN114281707A (en) * | 2022-01-12 | 2022-04-05 | 平安普惠企业管理有限公司 | Number making method, service application testing method and related equipment thereof |
CN116541305A (en) * | 2023-06-26 | 2023-08-04 | 京东方艺云(杭州)科技有限公司 | Abnormality detection method and device, electronic equipment and storage medium |
CN116541305B (en) * | 2023-06-26 | 2023-12-15 | 京东方艺云(杭州)科技有限公司 | Abnormality detection method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112948275A (en) | Test data generation method, device, equipment and storage medium | |
CN112445854B (en) | Multi-source service data real-time processing method, device, terminal and storage medium | |
CN112698971B (en) | Parameter conversion method, device, equipment and medium based on rule engine | |
CN112256886B (en) | Probability calculation method and device in atlas, computer equipment and storage medium | |
CN111754123B (en) | Data monitoring method, device, computer equipment and storage medium | |
CN111949708B (en) | Multi-task prediction method, device, equipment and medium based on time sequence feature extraction | |
CN112559831A (en) | Link monitoring method and device, computer equipment and medium | |
CN111931471A (en) | Form collection method and device, electronic equipment and storage medium | |
CN114881616A (en) | Business process execution method and device, electronic equipment and storage medium | |
CN112015663A (en) | Test data recording method, device, equipment and medium | |
CN111694844A (en) | Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment | |
CN113806434A (en) | Big data processing method, device, equipment and medium | |
CN114201328A (en) | Fault processing method and device based on artificial intelligence, electronic equipment and medium | |
CN112102011A (en) | User grade prediction method, device, terminal and medium based on artificial intelligence | |
WO2023040145A1 (en) | Artificial intelligence-based text classification method and apparatus, electronic device, and medium | |
CN112818028B (en) | Data index screening method and device, computer equipment and storage medium | |
CN114201212A (en) | Configuration file processing method and device, computer equipment and storage medium | |
CN111950707B (en) | Behavior prediction method, device, equipment and medium based on behavior co-occurrence network | |
CN113268695A (en) | Data embedding point processing method and device and related equipment | |
CN113434542A (en) | Data relation identification method and device, electronic equipment and storage medium | |
CN112541640A (en) | Resource authority management method and device, electronic equipment and computer storage medium | |
CN111651452A (en) | Data storage method and device, computer equipment and storage medium | |
CN117194382A (en) | Middle-stage data processing method and device, electronic equipment and storage medium | |
CN116823437A (en) | Access method, device, equipment and medium based on configured wind control strategy | |
CN114239538A (en) | Assertion processing method and device, computer equipment and storage medium |
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 | ||
AD01 | Patent right deemed abandoned | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20240628 |