![]() Use random.choice(someList) and random.shuffle(someList) to assure referential integrity. So you might have ChildEntity picking a random element from ParentEntity to assure that the FK-PK relationship was correct. Instead of generating random keys, you want to make a random selection from the other entities. The document's structure can be explicitly created or imported from an existing SQL file. MyData = įor multiple entities, you have to work out the cardinality. Data Generator for SQL is a tool for software developers and quality assurance engineers who need to generate test SQL documents in bulk for software or service testing. Self.append( random.randrange( 100, 1000 ) ) Here's a stripped-down one-table-only version of a data generator that writes a CSV file. I actually don't like this as much, but you might. Use an ODBC connection to generate data directly into the database. Generate CSV files of data which you can load manually. Generally, you want to build an entity model of your own so that you can be sure you have ranges and key relationships correct. ![]() Looking at 3 and 4 together, you don't want simple reverse engineering - you want something you can control to produce realistic values. There are ways to discover the database metadata and constraints. The first two indicate that you want to produce script files that will load your data. For generating sample data, I use simple Python applications.Ī repeatable set of data that you can for performance testing and get consistent results.įollow all of the DB referential integrity rules and constraints.
0 Comments
Leave a Reply. |