Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Referring to fig. 1, fig. 1 is a schematic flow chart of a test data generating method according to an embodiment of the present invention. The method can be operated in terminals such as smart phones (such as Android phones, IOS phones and the like), tablet computers, notebook computers, smart devices and the like. As shown in fig. 1, the method includes the following steps S101 to S105.
S101, if an operation instruction for generating an HTML page is received, generating a corresponding HTML page, wherein the HTML page comprises a plurality of input boxes and an output text box, different input boxes are used for correspondingly inputting different form parameters, and the form parameters at least comprise form data.
In the embodiment of the present invention, when an operation instruction for generating an HTML page is received, an HTML page matched with the operation instruction is generated, specifically, a corresponding HTML file may be generated according to the operation instruction, and the HTML file is opened and displayed in a browser by starting the browser, so as to obtain the HTML page matched with the operation instruction. The HTML page may include a plurality of input boxes, where different form parameters are input in different input boxes, specifically, what is input in one input box is content corresponding to the same form parameter.
The table data is data values which should be input in the HTML page, and all the data values can be located in the input boxes corresponding to the table data. For example, when the table parameter includes table data, that is, the table data is one of the table parameters, the content input in the input box corresponding to the table data at this time is the corresponding data value, and the data value may be set accordingly.
S102, creating an Excel worksheet matched with the HTML page, wherein the Excel worksheet comprises a plurality of preset data values.
In the embodiment of the present invention, in order to enable the input of the corresponding data value in the input box corresponding to the table data in the HTML page, an Excel worksheet matched with the HTML page needs to be created, and meanwhile, the Excel worksheet includes a plurality of preset data values, and the preset data values can be set correspondingly according to the requirements of the user, that is, the characteristics of all the preset data values all conform to the characteristics of the table data in the HTML page, so that all the preset data values are conveniently imported into the input box corresponding to the table data in the HTML page.
S103, importing the preset data value in the Excel worksheet into an input box corresponding to the sheet data in the HTML page.
In the embodiment of the present invention, the Excel worksheet is matched with the HTML page, so that the characteristics of the data values in the Excel worksheet are consistent with the characteristics of the data values to be input in the input box corresponding to the table data in the HTML page, and at this time, the data values preset in the Excel worksheet may be imported into the input box corresponding to the table data in the HTML page.
And S104, if a data analysis instruction is received, generating a corresponding number making script in the output text box according to the table parameters in the HTML page.
In the embodiment of the present invention, when a data analysis instruction is received, a corresponding number script may be obtained according to a table parameter in the HTML page, for example, according to a data value input in an input box corresponding to table data in the HTML page, and the number script may be output in an output text box. Of course, in the embodiment of the present invention, the table parameter includes not only the table data, but also the table name, the table description information, and other parameters, and if the table parameter includes the above parameters, the generated corresponding manufacture script also includes the information related to the characteristics of the table name and the table description information, so as to generate more accurate test data quickly.
And S105, calling and running the manufacture script to generate corresponding test data.
In the embodiment of the invention, after the number making script is called, the number making script needs to be operated, and at the moment, the test data meeting the corresponding conditions can be generated according to the information included in the number making script.
As a further embodiment, the step S105 further comprises, before:
and S105, 105a, acquiring the manufacture number script to store correspondingly. In order to facilitate more reasonable application of the generated number script, the generated number script may be obtained and stored in a preset location. When the calling is needed, the calling can be carried out by finding the preset position, and then the corresponding test data can be obtained by running the called number making script.
In summary, the embodiment of the invention can generate a more concise and perfect-performance number making script, and meanwhile, the number making script can quickly and accurately generate corresponding test data, thereby improving the test efficiency in the project test process.
Referring to fig. 2, fig. 2 is a schematic flow chart of a test data generating method according to another embodiment of the invention. The method can be operated in terminals such as smart phones (such as Android phones, IOS phones and the like), tablet computers, notebook computers, smart devices and the like. As shown in fig. 2, the steps of the method include S201 to S205.
S201, if an operation instruction for generating an HTML page is received, generating a corresponding HTML page, wherein the HTML page comprises a plurality of input boxes and an output text box, different input boxes are used for correspondingly inputting different form parameters, and the form parameters at least comprise form data.
S201a, the table parameters further include a table name, table description information, a table type, and a data operation type, and the preset table name, the preset table description information, the preset table type, and the preset data operation type are correspondingly input into the input boxes respectively corresponding to the table name, the table description information, the table type, and the data operation type.
The table names are known table names in the Hive database, so that test data generated by a subsequent test data generation tool after being called can meet the requirements of the Hive database in testing. The table description information may include field names, field types, and whether there are partitions, etc. The table type may include types of a table, a view and the like, the user may make a corresponding selection according to the needs of the user, and the data operation type may include an input operation or an overlay operation and the like.
In order to make the HTML page have more contents related to the test data, it is necessary to set a table parameter corresponding to each input box, for example, a preset indication may be correspondingly input in the input box corresponding to the table name, preset table description information may be correspondingly input in the input box corresponding to the table description information, a preset table type may be correspondingly input in the input box corresponding to the table type, and a preset data operation type may be correspondingly input in the input box corresponding to the data operation type.
S202, creating an Excel worksheet matched with the HTML page, wherein the Excel worksheet comprises a plurality of preset data values.
S203, importing the preset data value in the Excel worksheet into an input box corresponding to the sheet data in the HTML page.
Further, as shown in fig. 3, the table description information of the Excel worksheet is matched with the table description information of the HTML page, the table description information includes a field name, a field type, and whether or not there is a partition, and the field name, the field type, and whether or not there is a partition are all located in the input box corresponding to the table description information.
In order to enable the information in the HTML page to be more matched with the information in the Excel worksheet, so as to generate a more accurate build script, at this time, the sheet description information of the Excel worksheet needs to be matched with the sheet description information of the HTML page. That is, the field name of the Excel worksheet is matched with the field name in the HTML page, the field type of the Excel worksheet is matched with the field type in the HTML page, whether the Excel worksheet has a partition or not is also matched with the field type in the HTML page, and the like.
The field name refers to the name of each column in a data table in the database, and each column in the data table is called a field. The field types mainly comprise character types, text types, numerical types, logic types, date types and the like, and different field types are used for storing different types of data. In addition, the partition is to divide a table data into a plurality of subsets, namely, to divide a data file into a plurality of data files, however, the storage of the files can depend on a file group or a plurality of file groups, because a plurality of file groups can improve the access concurrency of the database, different partitions can be configured into different disks for storage and processed by a plurality of CPUs, thereby improving the efficiency; after partitioning, the table is still an integral table, but the table data is stored in a plurality of positions in a hashed manner, so that whether partitioning exists can be judged according to the number of data values input into the input box corresponding to the table data, for example, when the number of data values input into the input box corresponding to the table data is greater than a preset value, corresponding partitioning can be performed according to a preset rule, and when the number of data values input into the input box corresponding to the table data is less than or equal to the preset value, partitioning is not performed.
In one embodiment, the step S203 may include the following steps S301 to S303.
S301, copying the Excel worksheet to obtain preset data values under all field names in the Excel worksheet, and determining whether the field types of the preset data values and the partitions are matched with the field types in the input box corresponding to the table description information in the HTML page and whether the partitions are matched with the field types in the input box corresponding to the table description information in the HTML page.
In the embodiment of the present invention, in order to enable the data values in the Excel worksheet to be accurately imported into the input boxes corresponding to the sheet data in the HTML page, each field name in the Excel worksheet corresponds to a column of data values, so that the Excel worksheet needs to be copied to obtain the preset data values under all field names in the Excel worksheet. Meanwhile, the field type of the preset data value and whether the partition is matched with the field type in the input box corresponding to the table description information in the HTML page, so that the data value imported into the HTML page can further accord with the set table description information in the HTML page, and the generated number making script for making the test data is faster and more accurate.
S302, all field names in the HTML page are set in an input box corresponding to the table data.
In the embodiment of the present invention, in order to accurately import the data value under each field name in the Excel worksheet into the corresponding input box, all the field names in the Excel worksheet need to be set in the input box corresponding to the sheet data in the HTML page.
And S303, correspondingly importing the preset data values under all the field names in the obtained Excel worksheet into the input box corresponding to the sheet data according to all the field names set in the input box corresponding to the sheet data in the HTML page.
In the embodiment of the invention, the input box corresponding to the table data in the HTML page is provided with the same field name as that in the Excel worksheet, that is, the data value under each field name is imported to the corresponding field name in the input box corresponding to the table data, so that all the data values set in the Excel worksheet are imported to the input box corresponding to the table data in the HTML page.
And S204, if a data analysis instruction is received, generating a corresponding number making script in the output text box according to the table parameters in the HTML page.
In the embodiment of the invention, if a data analysis instruction is received, an HQL statement can be generated, that is, a corresponding number script is generated, where the number script may include test data for generating a condition that satisfies a limitation set in the number script, and the limitation may include a table name, table description information, table data, a table type, a data operation type, and the like, so that the test data satisfies a requirement in a Hive database test process, and the number script also performs corresponding output and saving through an output text box in an HTML page, so as to be called and run when needed subsequently.
Further, as shown in fig. 4, the step S204 specifically includes: steps S401 to S402.
S401, if a data analysis instruction is received, information in an input box corresponding to the form parameters in the HTML page is obtained.
In the embodiment of the present invention, when a data analysis instruction is received, information in an input box corresponding to indication, table description information, table data, a table type, a data operation type, and the like in the HTML page may be acquired.
S402, generating a corresponding number making script according to the information in the input box corresponding to the acquired form parameters in the HTML page.
In the embodiment of the present invention, the table name in the HTML page may be analyzed, so that when the generated number script is called to run, the table name of the generated data value may be consistent with the table name in the HTML page. Similarly, the table description information is analyzed, so that the characteristics of the generated data value, such as the field name, the field type, whether the partition is available and the like, can be consistent with the table description information in the HTML page when the generated number script is called to run. In addition, the table data is analyzed, namely the data content copied to the input box corresponding to the table data is analyzed, so that the generated data value can have the same characteristics and rules as the data content when the generated number script is called to run, and the requirement that a great amount of test data is needed by the Hive database is met.
Correspondingly, the table type and the data operation type in the HTML page may also be analyzed respectively, so that the table type and the data operation type of the generated data value are correspondingly consistent with the table type and the data operation type in the HTML page when the generated number script is called to run. Therefore, through the analysis and the processing, the test data generated by the manufactured script after being called completely accords with the characteristics required by the Hive database, and has better accuracy.
And S205a, acquiring the manufacture number script to be stored correspondingly.
And S205, calling and running the manufacture script to generate corresponding test data.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
Referring to fig. 5, in response to the above-mentioned test data generating method, an embodiment of the invention further provides a test data generating apparatus, where theapparatus 100 includes: a generatingunit 101, a creatingunit 102, an importingunit 103, aprocessing unit 104, and an executingunit 105.
The generatingunit 101 is configured to generate a corresponding HTML page if an operation instruction for generating the HTML page is received, where the HTML page includes a plurality of input boxes and an output text box, where different input boxes are used to correspondingly input different form parameters, and the form parameters at least include form data.
In the embodiment of the invention, when an operation instruction for generating the HTML page is received, the HTML page matched with the operation instruction is generated. The HTML page may include a plurality of input boxes, where different form parameters are input in different input boxes, specifically, what is input in one input box is content corresponding to the same form parameter.
The table data is data values which should be input in the HTML page, and all the data values can be located in the input boxes corresponding to the table data. For example, when the table parameter includes table data, that is, the table data is one of the table parameters, the content input in the input box corresponding to the table data at this time is the corresponding data value, and the data value may be set accordingly.
The creatingunit 102 is configured to create an Excel worksheet matched with the HTML page, where the Excel worksheet includes a plurality of preset data values.
In the embodiment of the present invention, in order to enable the input of the corresponding data value in the input box corresponding to the table data in the HTML page, an Excel worksheet matched with the HTML page needs to be created, and meanwhile, the Excel worksheet includes a plurality of preset data values, and the preset data values can be set correspondingly according to the requirements of the user, that is, the characteristics of all the preset data values all conform to the characteristics of the table data in the HTML page, so that all the preset data values are conveniently imported into the input box corresponding to the table data in the HTML page.
The importingunit 103 is configured to import a preset data value in the Excel worksheet into an input box corresponding to the sheet data in the HTML page.
In the embodiment of the present invention, the Excel worksheet is matched with the HTML page, so that the characteristics of the data values in the Excel worksheet are consistent with the characteristics of the data values to be input in the input box corresponding to the table data in the HTML page, and at this time, the data values preset in the Excel worksheet may be imported into the input box corresponding to the table data in the HTML page.
Theprocessing unit 104 is configured to generate a corresponding number script in the output text box according to the table parameter in the HTML page if the data analysis instruction is received.
In the embodiment of the present invention, when a data analysis instruction is received, a corresponding number script may be obtained according to a table parameter in the HTML page, for example, according to a data value input in an input box corresponding to table data in the HTML page, and the number script may be output in an output text box. Of course, in the embodiment of the present invention, the table parameter includes not only the table data, but also the table name, the table description information, and other parameters, and if the table parameter includes the above parameters, the generated corresponding manufacture script also includes the information related to the characteristics of the table name and the table description information, so as to generate more accurate test data quickly.
The runningunit 105 is configured to invoke and run the manufacture script to generate corresponding test data.
In the embodiment of the invention, after the number making script is called, the number making script needs to be operated, and at the moment, the test data meeting the corresponding conditions can be generated according to the information included in the number making script.
As a further embodiment, theapparatus 100 further comprises:
thestorage unit 105a is used for acquiring the manufacture script to perform corresponding storage. In order to facilitate more reasonable application of the generated number script, the generated number script may be obtained and stored in a preset location. When the calling is needed, the calling can be carried out by finding the preset position, and then the corresponding test data can be obtained by running the called number making script.
In summary, the embodiment of the invention can generate a more concise and perfect-performance number making script, and meanwhile, the number making script can quickly and accurately generate corresponding test data, thereby improving the test efficiency in the project test process.
As can be seen from the above, in terms of hardware implementation, theabove generating unit 101, creatingunit 102, importingunit 103, processingunit 104, and runningunit 105 may be embedded in a hardware form or in a device independent of test data generation, or may be stored in a memory of the test data generation device in a software form, so that a processor calls and executes operations corresponding to the above units. The processor can be a Central Processing Unit (CPU), a microprocessor, a singlechip and the like.
Referring to fig. 6, in response to the above-mentioned test data generating method, another embodiment of the present invention further provides a test data generating apparatus, where theapparatus 200 includes: ageneration unit 201, aninput unit 201a, acreation unit 202, animport unit 203, aprocessing unit 204, and anexecution unit 205.
The generatingunit 201 is configured to generate a corresponding HTML page if an operation instruction for generating the HTML page is received, where the HTML page includes a plurality of input boxes and an output text box, where different input boxes are used to correspondingly input different form parameters, and the form parameters at least include form data.
Aninput unit 201a, configured to correspondingly input a preset table name, preset table description information, a preset table type, and a preset data operation type into input boxes respectively corresponding to the table name, the table description information, the table type, and the data operation type.
The table names are known table names in the Hive database, so that test data generated by a subsequent test data generation tool after being called can meet the requirements of the Hive database in testing. The table description information may include field names, field types, and whether there are partitions, etc. The table type may include types of a table, a view and the like, the user may make a corresponding selection according to the needs of the user, and the data operation type may include an input operation or an overlay operation and the like.
In order to make the HTML page have more contents related to the test data, it is necessary to set a table parameter corresponding to each input box, for example, a preset indication may be correspondingly input in the input box corresponding to the table name, preset table description information may be correspondingly input in the input box corresponding to the table description information, a preset table type may be correspondingly input in the input box corresponding to the table type, and a preset data operation type may be correspondingly input in the input box corresponding to the data operation type.
The creatingunit 202 is configured to create an Excel worksheet matched with the HTML page, where the Excel worksheet includes a plurality of preset data values.
The importingunit 203 is configured to import the preset data value in the Excel worksheet into the input box corresponding to the sheet data in the HTML page.
Further, as shown in fig. 7, the table description information of the Excel worksheet is matched with the table description information of the HTML page, the table description information includes a field name, a field type, and whether or not there is a partition, and the field name, the field type, and whether or not there is a partition are all located in the input box corresponding to the table description information.
In order to enable the information in the HTML page to be more matched with the information in the Excel worksheet, so as to generate a more accurate build script, at this time, the sheet description information of the Excel worksheet needs to be matched with the sheet description information of the HTML page. That is, the field name of the Excel worksheet is matched with the field name in the HTML page, the field type of the Excel worksheet is matched with the field type in the HTML page, whether the Excel worksheet has a partition or not is also matched with the field type in the HTML page, and the like.
The field name refers to the name of each column in a data table in the database, and each column in the data table is called a field. The field types mainly comprise character types, text types, numerical types, logic types, date types and the like, and different field types are used for storing different types of data. In addition, the partition is to divide a table data into a plurality of subsets, namely, to divide a data file into a plurality of data files, however, the storage of the files can depend on a file group or a plurality of file groups, because a plurality of file groups can improve the access concurrency of the database, different partitions can be configured into different disks for storage and processed by a plurality of CPUs, thereby improving the efficiency; after partitioning, the table is still an integral table, but the table data is stored in a plurality of positions in a hashed manner, so that whether partitioning exists can be judged according to the number of data values input into the input box corresponding to the table data, for example, when the number of data values input into the input box corresponding to the table data is greater than a preset value, corresponding partitioning can be performed according to a preset rule, and when the number of data values input into the input box corresponding to the table data is less than or equal to the preset value, partitioning is not performed.
Specifically, the importingunit 203 specifically includes: anacquisition unit 301, asetting unit 302, and anadjustment unit 303.
The obtainingunit 301 is configured to copy the Excel worksheet to obtain preset data values under all field names in the Excel worksheet, where a field type and whether a partition of the preset data values matches a field type and whether a partition of an input box corresponding to the table description information in the HTML page.
In the embodiment of the present invention, in order to enable the data values in the Excel worksheet to be accurately imported into the input boxes corresponding to the sheet data in the HTML page, each field name in the Excel worksheet corresponds to a column of data values, so that the Excel worksheet needs to be copied to obtain the preset data values under all field names in the Excel worksheet. Meanwhile, the field type of the preset data value and whether the partition is matched with the field type in the input box corresponding to the table description information in the HTML page, so that the data value imported into the HTML page can further accord with the set table description information in the HTML page, and the generated number making script for making the test data is faster and more accurate.
Thesetting unit 302 is configured to set all field names in the HTML page in an input box corresponding to the table data.
In the embodiment of the present invention, in order to accurately import the data value under each field name in the Excel worksheet into the corresponding input box, all the field names in the Excel worksheet need to be set in the input box corresponding to the sheet data in the HTML page.
The adjustingunit 303 is configured to correspondingly import the preset data values under all the field names in the obtained Excel worksheet into the input box corresponding to the table data according to all the field names set in the input box corresponding to the table data in the HTML page.
In the embodiment of the invention, the input box corresponding to the table data in the HTML page is provided with the same field name as that in the Excel worksheet, that is, the data value under each field name is imported to the corresponding field name in the input box corresponding to the table data, so that all the data values set in the Excel worksheet are imported to the input box corresponding to the table data in the HTML page.
Theprocessing unit 204 is configured to generate a corresponding number script in the output text box according to the table parameter in the HTML page if the data analysis instruction is received.
Further, as shown in fig. 8, theprocessing unit 204 specifically includes: a receivingunit 401 and a determiningunit 402.
The receivingunit 401 is configured to, if a data analysis instruction is received, obtain information in an input box corresponding to a form parameter in the HTML page.
In the embodiment of the present invention, when a data analysis instruction is received, information in an input box corresponding to indication, table description information, table data, a table type, a data operation type, and the like in the HTML page may be acquired.
The determiningunit 402 is configured to generate a corresponding manufacture script according to the information in the input box corresponding to the table parameter in the obtained HTML page.
In the embodiment of the present invention, the table name in the HTML page may be analyzed, so that when the generated number script is called to run, the table name of the generated data value may be consistent with the table name in the HTML page. Similarly, the table description information is analyzed, so that the characteristics of the generated data value, such as the field name, the field type, whether the partition is available and the like, can be consistent with the table description information in the HTML page when the generated number script is called to run. In addition, the table data is analyzed, namely the data content copied to the input box corresponding to the table data is analyzed, so that the generated data value can have the same characteristics and rules as the data content when the generated number script is called to run, and the requirement that a great amount of test data is needed by the Hive database is met.
Correspondingly, the table type and the data operation type in the HTML page may also be analyzed respectively, so that the table type and the data operation type of the generated data value are correspondingly consistent with the table type and the data operation type in the HTML page when the generated number script is called to run. Therefore, through the analysis and the processing, the test data generated by the manufactured script after being called completely accords with the characteristics required by the Hive database, and has better accuracy.
Theexecution unit 205 is configured to invoke and execute the manufacture script to generate corresponding test data.
As a further embodiment, theapparatus 200 further comprises:
thestorage unit 205a is configured to obtain the manufacture script for corresponding storage.
The above-described test data generation apparatus may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 9.
Fig. 9 is a schematic structural diagram of a test data generating apparatus according to the present invention. The device can be a terminal or a server, wherein the terminal can be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and a wearable device. The server may be an independent server or a server cluster composed of a plurality of servers. Referring to fig. 9, thecomputer apparatus 500 includes aprocessor 502, anonvolatile storage medium 503, aninternal memory 504, and anetwork interface 505, which are connected by asystem bus 501. Thenon-volatile storage medium 503 of thecomputer device 500 may store, among other things, anoperating system 5031 and acomputer program 5032, which, when executed, may cause theprocessor 502 to perform a test data generation method. Theprocessor 502 of thecomputer device 500 is used to provide computing and control capabilities that support the overall operation of thecomputer device 500. Theinternal memory 504 provides an environment for running a computer program in a non-volatile storage medium, which when executed by the processor, causes theprocessor 502 to perform a method of test data generation. Thenetwork interface 505 of thecomputer device 500 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein theprocessor 502 performs the following operations: if an operation instruction for generating an HTML page is received, generating a corresponding HTML page, wherein the HTML page comprises a plurality of input boxes and an output text box, different input boxes are used for correspondingly inputting different form parameters, and the form parameters at least comprise form data; creating an Excel worksheet matched with the HTML page, wherein the Excel worksheet comprises a plurality of preset data values; importing a preset data value in the Excel worksheet into an input box corresponding to the sheet data in the HTML page; if a data analysis instruction is received, generating a corresponding number making script in the output text box according to the table parameters in the HTML page; and calling and running the manufacture script to generate corresponding test data.
Theprocessor 502 also performs the following operations: and correspondingly inputting the preset table name, the preset table description information, the preset table type and the preset data operation type into input frames respectively corresponding to the table name, the table description information, the table type and the data operation type.
When theprocessor 502 executes the step of importing the preset data value in the Excel worksheet into the input box corresponding to the sheet data in the HTML page, the following operations are specifically executed: copying the Excel worksheet to obtain preset data values under all field names in the Excel worksheet; setting all field names in the HTML page in an input box corresponding to the table data; and correspondingly importing the preset data values under all the field names in the obtained Excel worksheet into the input box corresponding to the table data according to all the field names set in the input box corresponding to the table data in the HTML page.
When theprocessor 502 executes the step of generating the corresponding number script in the output text box according to the table parameter in the HTML page if the data analysis instruction is received, the following operations are specifically executed: if a data analysis instruction is received, acquiring information in an input box corresponding to form parameters in the HTML page; and generating a corresponding number making script according to the information in the input box corresponding to the acquired form parameters in the HTML page.
Theprocessor 502 also performs the following operations: and acquiring the manufacture number script to carry out corresponding storage.
Those skilled in the art will appreciate that the embodiment of the test data generation apparatus shown in fig. 9 does not constitute a limitation on the specific construction of the test data generation apparatus, and in other embodiments the test data generation apparatus may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the test data generating device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 9, and are not described herein again.
The present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of:
if an operation instruction for generating an HTML page is received, generating a corresponding HTML page, wherein the HTML page comprises a plurality of input boxes and an output text box, different input boxes are used for correspondingly inputting different form parameters, and the form parameters at least comprise form data; creating an Excel worksheet matched with the HTML page, wherein the Excel worksheet comprises a plurality of preset data values; importing a preset data value in the Excel worksheet into an input box corresponding to the sheet data in the HTML page; if a data analysis instruction is received, generating a corresponding number making script in the output text box according to the table parameters in the HTML page; and calling and running the manufacture script to generate corresponding test data.
The processor further implements the steps of: and correspondingly inputting the preset table name, the preset table description information, the preset table type and the preset data operation type into input frames respectively corresponding to the table name, the table description information, the table type and the data operation type.
The processor further implements the steps of: copying the Excel worksheet to obtain preset data values under all field names in the Excel worksheet; setting all field names in the HTML page in an input box corresponding to the table data; and correspondingly importing the preset data values under all the field names in the obtained Excel worksheet into the input box corresponding to the table data according to all the field names set in the input box corresponding to the table data in the HTML page.
The processor further implements the steps of: if a data analysis instruction is received, acquiring information in an input box corresponding to form parameters in the HTML page; and generating a corresponding number making script according to the information in the input box corresponding to the acquired form parameters in the HTML page.
The processor further implements the steps of: and acquiring the manufacture number script to carry out corresponding storage.
The foregoing storage medium of the present invention includes: various media that can store program codes, such as a magnetic disk, an optical disk, and a Read-Only Memory (ROM).
The elements of all embodiments of the present invention may be implemented by a general purpose integrated circuit, such as a CPU (central processing Unit), or by an ASIC (Application Specific integrated circuit).
The steps in the test data generation method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the test data generation terminal of the embodiment of the invention can be merged, divided and deleted according to actual needs.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.