Data Generator (Not Promoted)
During the functional testing of a program, a large amount of test data complying with specific rules needs to be inserted into the database. DAS can help you generate test data based on specific rules. This section describes how to generate test data on the DAS console.
Procedure
- Log in to the DAS console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner, and under Databases, click Data Admin Service.
- In the navigation pane on the left, choose Development Tool.
You can also click Go to Development Tool on the overview page.
- Locate the DB instance that you want to log in to and click Log In in the Operation column.
- On the top menu bar, choose Data Scheme > Data Generator.
- On the displayed page, click Create Task.
Figure 1 Creating a data generation task
- In the displayed dialog box, configure required parameters
Figure 2 Configuring task parameters
- Conflict Policy
If you select Skip, the system skips data rows in conflict and continues generating data.
If you select Replace, the system replaces existing rows with new ones that have the same primary key.
- Generation Mode
You can set the rules for randomly generated data based on the column settings. For example, if the column type is time, you can set the start time, end time, and format, or select Based on current time.
- Conflict Policy
- Click Preview to check whether the data that will be generated can meet your requirements. If not, adjust the generation rules.
Figure 3 Data preview
- Click Generate.
Figure 4 Test data generation progress
- In the task list, locate the created task and click Details.
You can also delete the task as required.Figure 5 Task list
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot