VS Tools for DB Professional - Does it make sense to generate test data?
The new VS for DB Professionals supports generating test data for your data model.
For each column, you can specify the Generator you want to use, and you have a bunch of predefined ones (numbers in a range, strings that comply with a regular expression, values from a list, etc, etc, etc), with a lot of sophisticated features like using different distribution algorithms for the data, or read an existing table to find patterns there to then generate the test data (like 'the CustomerName has between 10 and 15 characters with an average of 12').
Now, as they are inserting data in the database tables directly, they are bypassing your business logic layer. Unless you have all the validations and triggers in the database, the data you have in your tables won't be consistent, and in that case is difficult to use it as a set of data that I can use for my tests.
Additionally, there are scenarios where creating test data is very difficult. If you have a table with the product Inventory, and each time you create an Invoice you check if there is enough inventory, and after that you decrease it, you need to make sure that in your test data, the Invoices you create don't make the Inventory go negative, because in that case your constraints will fail. In real world applications this kind of scenarios happens all the time. Unless we have a model where we can declare that, which is not trivial, I don't see a way to solve this issue.
So, I think the data generator feature it's a little naive, and I'm not sure if it can applied it in the real world. I hope I'm wrong because it looks cool ;).