Prepare performance test data with data Factory

Source: Internet
Author: User

Original article:

Http://qa.taobao.com /? P = 6247

 

Data Factory: Data factory, DF for short. Is a fast and easy-to-Generate Test Data Tool. DF supports Oracle, DB2, SQL-server, Sybase, and ODBC. DF supports MySQL through ODBC. The following describes how to insert a large amount of data into the MySQL Association Table through DF.

1. the download and installation of DF and ODBC are not described here. Prerequisites: DF and ODBC have been successfully installed. Create two tables, pet1 and pet2.

The ID of pet1 is associated with the ID of pet2.

2. Open DF, select ODBC, and click Next.

3. Select DBC administrator and ODBC file source.

4. Enter the MySQL account/password and click Next.

5. Select the table for data insertion: pet1 & pet2. pull from the left border to the right border, and click "Next"

6. Enter the Script Name, wuche, and click Next.

6. Click "finish" to exit script wizard.

7. after exiting script wizard, the operation interface of DF is displayed. Click pet1 and enter 100000 in records in the right border. check the create temporary data table to create a temporary table to transfer associated data.

8. Select the ID column under pet1. Select "123 insert sequential values" for ption ". This indicates creating the sequence number in the order of 123.

Width indicates the length of a field. You must enter a number greater than the number of digits. For example, if you create 100000 data records and the width input is greater than or equal to 5.

9. Selected column: Name. By default, the attribute of name can be used. For more information about each option, see the help documentation.

10. This step is critical. Because the ID of pet2 is associated with the ID of pet1, the ID column of pet2 is selected. Ption: insert value from data table.

Data :~ Pet1. field: ID. That is to say, the ID of pet2 is automatically associated with the ID of pet1, and the width is the same as that of pet1.

11. After these settings are complete, click "run" in the toolbar to execute the script. It takes 55 seconds to insert 10 million data records. Fast ~

12. to verify whether the data is actually inserted into MySQL, go and see ~~ We found that MySQL really has 10 million data records.

Conclusion: Using DF, we can quickly construct a large amount of basic data for performance testing, which helps us prepare the preliminary data for performance testing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.