in reply to Re: DBIx::Class Randomise datbase primary keys for testing.
in thread DBIx::Class Randomise datbase primary keys for testing.
If one creates a complete database scheme just for testing, as done in the original post, inserting a random number of dummy records into each of the tables could be sufficient. On a RDBMS with real sequences (like Oracle), creating the sequences in a way that they start at a random number should give a similar effect.
A different approach, again needing sequences, would be to use a single sequence to generate all IDs, at least for the test database. That would reliably detect that special problem of using IDs from a wrong table.
Alexander
|
|---|