CN115292179A - Test data generation method and device, electronic equipment and storage medium - Google Patents

Test data generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115292179A
CN115292179A CN202210943220.2A CN202210943220A CN115292179A CN 115292179 A CN115292179 A CN 115292179A CN 202210943220 A CN202210943220 A CN 202210943220A CN 115292179 A CN115292179 A CN 115292179A
Authority
CN
China
Prior art keywords
data
configuration
information
test data
configuration item
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
Application number
CN202210943220.2A
Other languages
Chinese (zh)
Inventor
段志勇
王杰
程强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202210943220.2A priority Critical patent/CN115292179A/en
Publication of CN115292179A publication Critical patent/CN115292179A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a test data generation method and device, electronic equipment and a storage medium. Receiving data configuration triggering operation and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item; receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item; receiving data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space. The test data can be generated and stored in the preset storage space based on the configured parameters determined by the parameter configuration operation of the information configuration item, so that the labor is saved, the test data can be generated through simple interaction, and the generation efficiency of the test data is improved.

Description

Test data generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of big data processing technologies, and in particular, to a method and an apparatus for generating test data, an electronic device, and a storage medium.
Background
With the rapid development of science and technology, various application technologies are emerging continuously, and before the application technologies are oriented to the market, the integrity of the function implementation of the application technologies should be analyzed, so that a large amount of test data needs to be applied to effectively process and analyze the application technologies.
However, for the requirement of a large amount of test data, the real data available for limited authorization is often very limited. At present, a group of simulation data is often written manually, the process is time-consuming and labor-consuming, and a certain error often exists in a data format, so that the error rate of test data is high, and the generation efficiency of the test data is low.
Disclosure of Invention
The invention provides a method and a device for generating test data, electronic equipment and a storage medium, and aims to solve the problem of low test data generation efficiency.
According to an aspect of the present invention, a method for generating test data is provided, wherein the method includes:
receiving data configuration triggering operation and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item;
receiving a parameter configuration operation aiming at least one information configuration item, and showing configured parameters corresponding to the information configuration item;
receiving data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space.
According to another aspect of the present invention, there is provided a test data generating apparatus, wherein the apparatus comprises:
the data configuration information display module is used for receiving data configuration triggering operation and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item;
the configured parameter display module is used for receiving a parameter configuration operation aiming at least one information configuration item and displaying a configured parameter corresponding to the information configuration item;
and the test data storage module is used for receiving data generation triggering operation used for generating test data, generating the test data based on the configured parameters and storing the test data in a preset storage space.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a method of generating test data according to any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a method for generating test data according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, data configuration information is displayed by receiving data configuration triggering operation, wherein the data configuration information comprises at least one information configuration item; further, receiving a parameter configuration operation for at least one information configuration item, and displaying configured parameters corresponding to the information configuration item; the configuration format of the configuration parameters can be preset according to requirements, so that common data format errors are reduced. And further, receiving a data generation trigger operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space. The storage space is preset, so that the test data can be automatically stored in the preset storage space after being generated. The technical problem that the generation efficiency of the test data is low is solved, the test data can be automatically generated and stored in the preset storage space based on the configured parameters determined by the parameter configuration operation of the information configuration items, compared with the process of manually constructing the data, the requirement on the specialty of a user is low, the audience is wide, manpower is saved, the test data can be generated through simple interaction with the user, and the technical effect of improving the generation efficiency of the test data is achieved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for generating test data according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating test data according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for generating test data according to a third embodiment of the present invention;
fig. 4 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention;
fig. 5 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention;
fig. 6 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention;
fig. 7 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention;
fig. 8 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention;
fig. 9 is a schematic structural diagram of a test data generating apparatus according to a fourth embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, which provides a method for generating test data.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a method for generating test data according to an embodiment of the present invention, where this embodiment is applicable to a situation where an application test requires a large amount of test data but actual data is insufficient and simulated test data needs to be generated, and the method may be executed by a device for generating test data, which may be implemented in a hardware and/or software manner, and the device for generating test data may be configured in the generation of test data. As shown in fig. 1, the method includes:
s110, receiving a data configuration triggering operation, and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item.
Wherein, the data configuration triggering operation may be understood as a triggering operation for starting to configure the generation parameters of the test data. The manner in which the data configuration triggers the operation may be varied. For example, a preset data configuration control may be triggered, or a preset sound or gesture may be input.
The data configuration information may be understood as information that needs to be configured when generating test data. The information configuration item may be understood as specific configuration information for configuring each item of test data in the data configuration information. It is to be understood that there may be one or more of the information configuration items for configuring the test data. There may be associations between different said information configurations or may be independent of each other. Optionally, there may be a hierarchical containment relationship between the information configuration items. When there are multiple information configuration items, the arrangement position of each information configuration item may be preset according to a requirement, and is not specifically limited herein. Illustratively, a plurality of information configuration items with association are arranged in the same row or column and can be placed in sequence according to a hierarchical inclusion relationship; and the plurality of unrelated information configuration items are arranged in different rows or columns. Illustratively, the information configuration items may be relationship classification configuration items, relationship code configuration items, source data set configuration items, a-object configuration items, and B-object configuration items. The related relation classification configuration items, the relation configuration items and the relation code configuration items can be placed in the same row or column according to the hierarchy in sequence to improve the experience of a user, and the related A object configuration items and the related B object configuration items are placed in the same row or column; it will be appreciated that the area in which the information arrangement items are located may be the same row or column with the same number of the information arrangement items to make the interface more neat.
In the embodiment of the present invention, the information configuration item may be preset according to an actual application requirement, and is not specifically limited herein. For example, the information configuration item may be a data format configuration item or a data type configuration item.
S120, receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item.
The parameter configuration operation may be understood as an operation of configuring parameters for an information configuration item. The configuration operation mode may be various, for example, the configuration parameters may be manually input, or the configuration parameters may be selected from a preset option list.
Wherein, the configured parameter can be understood as a configuration parameter corresponding to the information configuration item determined based on the parameter configuration operation.
For example, there may be one or more configuration parameters corresponding to each of the information configuration items. The configuration parameters corresponding to each information configuration item may be preset according to a requirement, and are not specifically limited herein. It can be understood that the configuration parameters of the associated information configuration items have relevance, and after the configuration parameters of the information configuration items at the previous level are determined, the configuration parameters of the corresponding information configuration items at the next level are correspondingly changed. For example, the configuration parameter corresponding to the relationship classification configuration item may be a relationship between parents or a relationship between the same regions, and in the case that the configured parameter of the relationship classification configuration item is a relationship between the parents and the next hierarchy, the configuration parameter corresponding to the relationship configuration item of the next hierarchy may be a mother, a father or a grandfather. In the case that the configured parameters of the relationship classification configuration items are in the same regional relationship, the configuration parameters corresponding to the relationship configuration items of the next level may be the same province, the same city, the same district, or the like.
Specifically, the parameters are configured for at least one information configuration item to meet the personalized parameter configuration requirements of the user, and further, after the configuration parameters of each information configuration item are determined to be completed, the configured parameters corresponding to each information configuration item are displayed, so that the user can visually know the configuration result.
S130, receiving a data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space.
Wherein the test data may be understood as data that is generated based on the configured parameters and that is available for application testing. It will be appreciated that the type of test data generated may be varied according to different test requirements.
Wherein the data generation trigger operation may be understood as a trigger operation for indicating the start of generating test data. The manner in which the data generation triggers the operation may be varied. For example, a data generation control is triggered, a preset data configuration control is triggered, or a preset sound or gesture is input.
The preset storage space may be understood as a preset space for storing the test data. In the embodiment of the present invention, the storage space may be preset according to a requirement, and is not specifically limited herein. Illustratively, the storage space may be a memory or a hard disk. It is understood that the test data may be generated for different scenarios, configured for different time periods, and of different types. Therefore, in order to facilitate the application of the test data, the data can be respectively stored in corresponding different storage spaces through different preset storage paths according to different requirements. For example, according to different scenarios, the test data applied to the first application scenario may be stored in the first storage space, and the test data applied to the second application scenario may be stored in the second storage space; alternatively, the test data generated in the first time period is stored in the third storage space, and the test data generated in the second time period is stored in the fourth storage space. According to different requirements, data are stored in corresponding different storage spaces through different preset storage paths, so that the data can be conveniently extracted by a user, and the experience of the user is improved.
Specifically, after the parameter configuration of the information configuration item is completed, a data generation triggering operation is executed, the test data is generated based on the configured parameter, and the test data is stored in a preset storage space.
According to the technical scheme of the embodiment of the invention, data configuration information is displayed by receiving data configuration triggering operation, wherein the data configuration information comprises at least one information configuration item; further, receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item; the configuration format of the configuration parameters can be preset according to requirements, so that common data format errors are reduced. And further, receiving a data generation trigger operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space. The storage space is preset, so that the test data can be automatically stored in the preset storage space after being generated. The technical problem that the generation efficiency of the test data is low is solved, the test data can be automatically generated and stored in the preset storage space based on the configured parameters determined by the parameter configuration operation of the information configuration items, compared with the process of manually constructing the data, the requirement on the specialty of the user is low, the audience is wide, the test data can be generated through simple interaction with the user, and the effect of improving the generation efficiency of the test data is realized.
Example two
Fig. 2 is a flowchart of a test data generation method according to a second embodiment of the present invention, where the present embodiment receives a parameter configuration operation for at least one information configuration item, and shows further details of a configured parameter corresponding to the information configuration item. As shown in fig. 2, the method includes:
s210, receiving a data configuration triggering operation, and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item.
In the embodiment of the present invention, optionally, the information configuration item includes a condition configuration item and a numerical configuration item. The condition configuration item can be understood as an information configuration item with configuration parameters as condition options. The value configuration item may be understood as an information configuration item in which the configuration parameter is a value. For example, the configuration parameter of the condition configuration item may be a condition for restricting how the test data is constructed, selected from preset condition options. The configuration parameter of the numerical configuration item may be a specific value meeting the format requirement of the configuration parameter based on the input of the numerical entry box.
S220, receiving a condition configuration operation aiming at least one condition configuration item, and displaying a condition configuration parameter corresponding to the condition configuration item.
The condition configuration operation may be understood as an operation of configuring parameters for the condition configuration item. The condition configuration parameter may be understood as a configuration parameter corresponding to the condition configuration item determined based on the condition configuration operation.
And S230, receiving form construction triggering operation acting on the condition form construction control, and displaying the numerical configuration item corresponding to the condition configuration parameter.
The condition form construction control can be understood as a control for constructing a numerical configuration item corresponding to the condition configuration parameter. The form construction triggering operation may be understood as a triggering operation of constructing a numerical configuration item corresponding to the conditional configuration parameter.
S240, receiving the value configuration operation aiming at the value configuration item, and displaying the value configuration parameter corresponding to the value configuration item.
The value configuration operation may be understood as an operation of performing parameter configuration on the value configuration item. The numerical configuration parameter may be understood as a configuration parameter corresponding to the numerical configuration item determined based on the numerical configuration operation.
Specifically, configuring condition configuration parameters for all the condition configuration items, and after configuration is completed, displaying the condition configuration parameters corresponding to the condition configuration items; further, triggering the condition form construction control, and displaying the numerical value configuration item corresponding to the condition configuration parameter. And further, configuring the numerical configuration parameters for all the numerical configuration items, and displaying the numerical configuration parameters corresponding to the numerical configuration items after configuration is completed.
And S250, receiving a data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space.
According to the technical scheme of the embodiment of the invention, the condition configuration operation aiming at least one condition configuration item is received, and the condition configuration parameters corresponding to the condition configuration item are displayed; further, receiving a form construction triggering operation of a control which acts on a condition and is constructed, and displaying a numerical value configuration item corresponding to the condition configuration parameter; and further, receiving a numerical value configuration operation aiming at the numerical value configuration item, and displaying the numerical value configuration parameter corresponding to the numerical value configuration item. The format error generated by the test data is reduced, and the accuracy of the test data is ensured.
EXAMPLE III
Fig. 3 is a flowchart of a method for generating test data according to a third embodiment of the present invention, where the present embodiment further details the data configuration information by performing a trigger operation for receiving data configuration according to the third embodiment. As shown in fig. 3, the method includes:
s310, responding to an interface display triggering operation for entering a data construction interface, and displaying the data construction interface, wherein the data construction interface comprises at least one data type determination control.
The data construction interface is understood to be an interface for constructing test data. The interface presentation trigger operation may be understood as a trigger operation that can enter the data construction interface. Optionally, the interface presentation triggering operation may be a control for triggering entry into the data construction interface. Specifically, a control entering the data construction interface is triggered, the control enters the data construction interface, and the data construction interface is displayed.
The data type determination control can be understood as a control of a data construction interface for determining the test data type. It is understood that the constructed test data type includes at least one type, and the data type determination control of the data construction interface for determining the test data type includes at least one type. For example, the types of the test data may include a relational test data, a single object test data, and the like. The data type determination controls of the data construction interface for determining the test data type may include a relational test data determination control and a single object test data determination control, among others. It is to be understood that the type and number of the test data type and the corresponding data type determination control are preset according to requirements, and are not specifically limited herein.
S320, receiving a type determination triggering operation acting on the data type determination control, and displaying data configuration information corresponding to the data construction type corresponding to the data type determination control.
Wherein the type determination trigger operation may be understood as a trigger operation for determining a data construction type. The data construction type may be understood as the type of the test data constructed. Specifically, the control triggering operation acting on the data type determination control further displays data configuration information corresponding to the data construction type corresponding to the data type determination control. Illustratively, the control trigger operation includes a click operation (such as a single click operation or a double click operation) or a press operation (such as a long press operation or a short press operation), and the like.
Optionally, the displaying of the data configuration information corresponding to the data structure type corresponding to the data type determination control includes:
displaying data configuration information corresponding to the data construction type corresponding to the data type determination control in a preset display area of the data construction interface; alternatively, the first and second electrodes may be,
and jumping to a data configuration interface from the data construction interface, and displaying data configuration information corresponding to the data construction type corresponding to the data type determination control on the data configuration interface.
The preset display area can be understood as an area for configuring test data information. In the embodiment of the present invention, the data type determination control and the data configuration information corresponding to the data structure type corresponding to the data type determination control may be located in the same operation interface. Further, the data construction interface may include a first display area and a second display area, where the first display area may be used to display the data type determination control, and the second display area may be used to display data configuration information corresponding to the data construction type corresponding to the data type determination control. Specifically, the data type determination control in the first display area is triggered, and data configuration information corresponding to the data structure type corresponding to the data type determination control is displayed in the first display area. In the embodiment of the present invention, the area positions, sizes, and the like of the first display area and the second display area on the data structure interface may be preset according to requirements, and are not specifically limited herein.
The data configuration interface may be understood as an interface for configuring test data information. In the embodiment of the present invention, the data type determination control and the data configuration information corresponding to the data structure type corresponding to the data type determination control may be located in different operation interfaces. Specifically, the data type determination control of the data construction interface is triggered, the data construction interface jumps to a data configuration interface, and data configuration information corresponding to the data construction type corresponding to the data type determination control is displayed on the data configuration interface.
Optionally, a data configuration interface may be displayed on the data configuration interface in a form of a pop-up window, and then, data configuration information corresponding to the data configuration type corresponding to the data type determination control is displayed on the data configuration interface. It should be noted that the position and the size of the window popped up on the data configuration interface may be set according to actual requirements, and are not specifically limited herein.
It is to be understood that, for generating different types of test data, the data configuration information corresponding to the data construction type corresponding to the data type determination control may be different.
Optionally, the data type determination control includes a control for constructing relationship type data between two or more objects, and the condition configuration item includes at least a data relationship configuration item, a first data construction rule configuration item, and a relationship dependent data configuration item.
Specifically, for the control for constructing the relational data between two or more objects, a trigger operation is executed, a construction interface of the relational data is entered, the corresponding condition configuration item is displayed, and further, a parameter is configured for the condition configuration item to generate the relational test data.
Wherein, the data relationship configuration item can be understood as a configuration item for configuring a data relationship between two or more objects. Wherein the data relationship may be understood as a relationship existing between test data of two or more objects. Further, the configuration parameter of the data relationship configuration item may be a relationship or a local relationship.
The first data construction rule configuration item can be understood as a configuration item for configuring a relational test data construction rule. Wherein, the first data construction rule can be understood as a rule for constructing relation dependent data configuration items of relation type data. Optionally, the first data construction rule may determine, through the configured parameter of the first data construction rule configuration item, the corresponding relationship dependent data configuration item to apply to different construction scenarios and test scenarios. It is to be understood that the first data structuring rule may be preset according to requirements, and is not specifically limited herein.
The relationship-dependent data configuration item can be understood as data which is used for determining whether a set data relationship exists between two or more objects, and can be used for representing association information of the two or more objects. Typically, the relational dependency data configuration item is the numerical configuration item.
Optionally, the data type determination control includes a control for constructing test data of a single object, and the condition configuration item includes at least a second data construction rule configuration item, a data format change rule configuration item, and a construction object configuration item.
Specifically, for the control for constructing the test data of the single object, a trigger operation is executed, a construction interface of the test data of the single object is entered, the corresponding condition configuration item is displayed, and further, a parameter is configured for the condition configuration item to generate the test data of the single object.
The second data construction rule configuration item may be understood as a configuration item of a construction rule for configuring test data of a single object. Wherein the second data construction rule can be understood as a rule for restricting how test data of a single object is constructed. Optionally, the second data construction rule may determine a corresponding construction object configuration item through a configured parameter of the second data construction rule configuration item, so as to apply to different construction scenarios and test scenarios. It is understood that the second data structuring rule may be preset according to requirements, and is not limited in detail herein.
The data format change rule configuration item may be understood as a configuration item for configuring the test data change rule. The data format change rule may be understood as a data format change rule that changes configuration parameters in the test data when the test data is constructed. Optionally, the data format change rule may be a change of a data format. For example, for the configured parameters, when generating the test data, the digital form and the literal form of the configured parameters may be exchanged, or the configured parameters may be encrypted, or the configured parameters may be interfered in a preset manner (e.g., adding interference characters, etc.). It can be understood that the different forms of test data generated by different data form change rules can be beneficial to testing the recognition capability of the tested application, so as to improve the application effect of the test data.
Wherein, the object configuration item can be understood as a specific object or a specific parameter type of a configuration required by the test data for constructing a single object.
S330, receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item.
S340, receiving a data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space.
Optionally, for the relational test data, the generating the target data based on the configured parameters includes: determining the configured parameters of the relation dependent data configuration items to be configured as the data configuration rules of the test data based on the configured parameters of the first data configuration rule configuration items; generating test data based on the configured information of the relationship dependent data configuration item, the configured information of the data relationship configuration item and the data construction rule.
Optionally, for test data of a single object, the generating target data based on the configured parameters includes: determining the configured parameters of the configuration object configuration item to be configured as the data configuration rules of the test data based on the configured parameters of the second data configuration rule configuration item; determining a data change form adopted by the configured information of the configuration item of the construction object when constructing the test data based on the data form change rule configuration item pair; generating test data based on the configured information of the configuration object configuration item, the data construction rule and the data variation form.
Specifically, the configured parameters of the configuration item of the configuration object are determined according to the configured parameters of the configuration item of the second data configuration rule, and the configured parameters are determined as the data configuration rules of the test data; further, the configured parameters of the data format change rule configuration items are used as data change formats adopted by the configured information of the configuration object configuration items when the test data are constructed; still further, test data is generated based on the configured information, the data construction rules, and the data variations.
According to the technical scheme of the embodiment of the invention, the data construction interface is displayed by responding to the interface display triggering operation for entering the data construction interface, wherein the data construction interface comprises at least one data type determination control; further, receiving a type determination trigger operation acting on the data type determination control, and displaying data configuration information corresponding to the data construction type corresponding to the data type determination control. The method and the device can construct different types of data under different application scenes, and improve the diversity of test data and the application universality of the test data.
Fig. 4 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention; fig. 5 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention; fig. 6 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention; fig. 7 is a schematic view of a scenario for executing the test data generation method according to the embodiment of the present invention; fig. 8 is a schematic scene diagram of a method for generating test data according to an embodiment of the present invention.
The embodiment of the invention provides a method for constructing relationship data according to character relationship data generated by a test scene. For example, test data of two persons is constructed, a parent-child relationship is required to exist between the two persons, and the construction steps are shown in fig. 8:
1. determining the configuration parameters of the conditional configuration items. According to the scene construction requirements of the test data, construction relationship data is selected at the left side of a data construction interface (see figure 4), and the relatives are selected at the options of a page (relationship classification); mother is selected in the column of relation, the relation code is automatically completed, and the source data set is automatically completed.
2. Configuration parameters of conditional configuration items for constructing the numerical configuration items are determined. Selecting relation dependent data of an object A for constructing a mother-child relation, wherein the information of the object A is a necessary item; and selecting the relation dependent data of the B object for constructing the existing parent-child relation, wherein the information of the B object is a necessary item.
3. And triggering a numerical configuration item generation control. Click [ build condition form ] button.
4. And inputting configuration parameters of the numerical configuration items. And inputting the numerical values corresponding to the A object and the B object in the generated numerical value configuration item.
5. And triggering the test data generation control. After the test simulation data generation requirement is selected, after the specific numerical values of two object information are input in the page middle menu, a button (generating simulation data) is clicked.
6. The test data is stored. And generating a file package under the project file directory, wherein the data in the file package is a test data package with a parent-child relationship, and the file package can be used in a test scene for testing whether two persons have the parent-child relationship. As shown in fig. 5, the test data may be stored into the file package data-1.Zip based on the project file directory after the test data is generated.
The present embodiment provides a method for constructing object data, for example, test data of each object is constructed, and the construction steps are as follows:
1. determining the configuration parameters of the conditional configuration items. In the data construction interface (see fig. 6), selecting one data set in a [ source data set ] drop-down box as a data construction rule for generating test data of a single object; one data set is selected in the drop down menu as a data form change rule for generating test data of a single object.
2. Configuration parameters of conditional configuration items used to construct the numerical configuration items are determined. An attribute field is selected in the drop-down box as a construction object for generating test data of a single object.
3. And triggering a numerical value configuration item generation control. Click button [ build condition form ].
4. And inputting configuration parameters of the numerical configuration items. A simulation parameter corresponding to the selected attribute field is input.
5. And triggering the test data generation control. After completion of the filling, click a button [ generate simulation data ].
6. The test data is stored. And generating a data packet file data-2.Zip of a construction object under the project directory. As shown in fig. 7, the generated data packet data-2.Zip may be automatically stored into a preset storage space.
Example four
Fig. 9 is a schematic structural diagram of a test data generation apparatus according to a fourth embodiment of the present invention. As shown in fig. 9, the apparatus includes: a data configuration information presentation module 410, a configured parameter presentation module 420 and a test data storage module 430.
The data configuration information presentation module 410 is configured to receive a data configuration trigger operation, and present data configuration information, where the data configuration information includes at least one information configuration item; the configured parameter showing module 420 is configured to receive a parameter configuring operation for at least one information configuration item, and show a configured parameter corresponding to the information configuration item; the test data storage module 430 is configured to receive a data generation trigger operation for generating test data, generate test data based on the configured parameters, and store the test data in a preset storage space.
According to the technical scheme of the embodiment of the invention, data configuration information is displayed by receiving data configuration triggering operation, wherein the data configuration information comprises at least one information configuration item; further, receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item; the configuration format of the configuration parameters can be preset according to requirements, so that common data format errors are reduced. And further, receiving a data generation trigger operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space. The storage space is preset, so that the test data can be automatically stored in the preset storage space after being generated. The technical problem that the generation efficiency of the test data is low is solved, the test data can be automatically generated and stored in the preset storage space based on the configured parameters determined by the parameter configuration operation of the information configuration items, compared with the process of manually constructing the data, the requirement on the specialty of a user is low, the audience is wide, manpower is saved, the test data can be generated through simple interaction with the user, and the technical effect of improving the generation efficiency of the test data is achieved.
Optionally, the information configuration item includes a condition configuration item and a value configuration item;
the configured parameter presentation module 420 is configured to:
receiving a condition configuration operation aiming at least one condition configuration item, and showing condition configuration parameters corresponding to the condition configuration item;
receiving form construction triggering operation acting on the condition form construction control, and displaying a numerical value configuration item corresponding to the condition configuration parameter;
receiving a value configuration operation aiming at the value configuration item, and displaying the value configuration parameter corresponding to the value configuration item.
Optionally, the data configuration information displaying module 410 includes: the data construction interface display sub-module and the data configuration information display sub-module.
The data construction interface display submodule is used for responding to an interface display triggering operation for entering a data construction interface and displaying the data construction interface, wherein the data construction interface comprises at least one data type determination control;
and the data configuration information display submodule is used for receiving a type determination triggering operation acted on the data type determination control and displaying the data configuration information corresponding to the data construction type corresponding to the data type determination control.
Optionally, the data configuration information displaying sub-module is configured to:
displaying data configuration information corresponding to the data construction type corresponding to the data type determination control in a preset display area of the data construction interface; alternatively, the first and second electrodes may be,
and jumping to a data configuration interface from the data construction interface, and displaying data configuration information corresponding to the data construction type corresponding to the data type determination control on the data configuration interface.
Optionally, the data type determination control includes a control for constructing relational data between two or more objects, and the conditional configuration item includes at least a data relation configuration item, a first data construction rule configuration item, and a relation dependent data configuration item.
Optionally, the data type determination control includes a control for constructing test data of a single object, and the condition configuration items include at least a second data construction rule configuration item, a data form change rule configuration item, and a construction object configuration item.
Optionally, the test data storage module 430 includes:
determining the configured parameters of the configuration object configuration items to be configured as the data configuration rules of the target data based on the configured parameters of the second data configuration rule configuration items;
determining a data change form adopted by the configured information of the configuration item of the configuration object when the target data is constructed based on the data form change rule configuration item pair;
generating test data based on the configured information of the configuration object configuration item, the data construction rule and the data variation form.
The test data generation device provided by the embodiment of the invention can execute the test data generation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
FIG. 10 illustrates a schematic diagram of an electronic device 10 that may be used to implement embodiments of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 10, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the generation method of test data.
In some embodiments, the method of generating test data may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the above described method of generating test data may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of generating test data in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for generating test data, comprising:
receiving data configuration triggering operation and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item;
receiving a parameter configuration operation aiming at least one information configuration item, and displaying configured parameters corresponding to the information configuration item;
receiving data generation triggering operation for generating test data, generating the test data based on the configured parameters, and storing the test data in a preset storage space.
2. The method of claim 1, wherein the information configuration items comprise a condition configuration item and a value configuration item;
the receiving a parameter configuration operation for at least one information configuration item, and presenting configured parameters corresponding to the information configuration item, includes:
receiving a condition configuration operation aiming at least one condition configuration item, and showing condition configuration parameters corresponding to the condition configuration item;
receiving form construction triggering operation acting on the condition form construction control, and displaying a numerical value configuration item corresponding to the condition configuration parameter;
receiving a value configuration operation aiming at the value configuration item, and displaying the value configuration parameter corresponding to the value configuration item.
3. The method of claim 2, wherein receiving the data configuration trigger operation to present data configuration information comprises:
responding to an interface display triggering operation for entering a data construction interface, and displaying the data construction interface, wherein the data construction interface comprises at least one data type determination control;
receiving a type determination triggering operation acted on the data type determination control, and displaying data configuration information corresponding to a data construction type corresponding to the data type determination control.
4. The method of claim 3, wherein said presenting data configuration information corresponding to a data construction type corresponding to the data type determination control comprises:
displaying data configuration information corresponding to the data construction type corresponding to the data type determination control in a preset display area of the data construction interface; alternatively, the first and second electrodes may be,
and jumping to a data configuration interface from the data construction interface, and displaying data configuration information corresponding to the data construction type corresponding to the data type determination control on the data configuration interface.
5. The method of claim 3, wherein the data type determination control comprises a control for constructing relational data between two or more objects, and wherein the conditional configuration items comprise at least a data relational configuration item, a first data construction rule configuration item, and a relational dependency data configuration item.
6. The method of claim 3, wherein the data type determination control comprises a control for constructing test data for a single object, and wherein the conditional configuration items comprise at least a second data construction rule configuration item, a data form change rule configuration item, and a constructed object configuration item.
7. The method of claim 6, wherein generating target data based on the configured parameters comprises:
determining that the configured parameters of the configuration object configuration items are configured as the data configuration rules of the test data based on the configured parameters of the second data configuration rule configuration items;
determining a data change form adopted by the configured information of the configuration item of the construction object when constructing the test data based on the data form change rule configuration item pair;
generating test data based on the configured information of the configuration object configuration item, the data construction rule and the data variation form.
8. An apparatus for generating test data, comprising:
the data configuration information display module is used for receiving data configuration triggering operation and displaying data configuration information, wherein the data configuration information comprises at least one information configuration item;
the configured parameter display module is used for receiving parameter configuration operation aiming at least one information configuration item and displaying the configured parameter corresponding to the information configuration item;
and the test data storage module is used for receiving data generation triggering operation used for generating test data, generating the test data based on the configured parameters and storing the test data in a preset storage space.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of generating test data of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the method of generating test data according to any one of claims 1 to 7 when executed.
CN202210943220.2A 2022-08-08 2022-08-08 Test data generation method and device, electronic equipment and storage medium Pending CN115292179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210943220.2A CN115292179A (en) 2022-08-08 2022-08-08 Test data generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210943220.2A CN115292179A (en) 2022-08-08 2022-08-08 Test data generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115292179A true CN115292179A (en) 2022-11-04

Family

ID=83828170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210943220.2A Pending CN115292179A (en) 2022-08-08 2022-08-08 Test data generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115292179A (en)

Similar Documents

Publication Publication Date Title
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN114328452A (en) Data auditing method, device, platform, electronic equipment and storage medium
CN117033309A (en) Data conversion method and device, electronic equipment and readable storage medium
CN115186738B (en) Model training method, device and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN114995875A (en) Page component configuration method and device, electronic equipment and storage medium
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN115249043A (en) Data analysis method and device, electronic equipment and storage medium
CN115618777A (en) File generation method, device, equipment and storage medium
CN109542729A (en) Device performance parameters data analysing method and device
CN115510212A (en) Text event extraction method, device, equipment and storage medium
CN115292179A (en) Test data generation method and device, electronic equipment and storage medium
CN115169316A (en) Data processing template generation method and device, electronic equipment and storage medium
CN114756468A (en) Test data creating method, device, equipment and storage medium
CN114780550A (en) Automatic updating method, device, equipment and medium for element positioning path
CN114995728A (en) Rule configuration method and device, electronic equipment and storage medium
CN115098405B (en) Software product evaluation method and device, electronic equipment and storage medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN114416678A (en) Resource processing method, device, equipment and storage medium
CN118057384A (en) Method, device, equipment and medium for constructing petrophysical modeling flow
CN115658988A (en) Chart configuration method and device, electronic equipment and storage medium
CN118193389A (en) Test case generation method, device, equipment, storage medium and product
CN115576480A (en) Freely combined matrix questionnaire scoring and configuration method and device
CN113467985A (en) Function checking method and device, electronic 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