Ashu283

Hi,

Is it possible to make DB testing in data driven way

And how we can set testcondiions dynamically for dynamic test input, if it is possible



Re: Visual Studio Team System - Database Professionals Can we do Data Driven Database testing?

Jamie Laflen MSFT

Yes, you can use team test¡¯s data driven testing feature with the database unit testing API. To start with, write the test script as a parameterized SQL script. The Execute method allows you to supply additional DbParameter instances that supply data to the script at execution time. Today, without writing some code you cannot setup the test conditions to evaluate in/out or out parameters based on the data supplied by the TestContext. This is something we are looking at for the next release.

Thinking about this with v1, the key ¡°problem¡± is how to generically map columns in TestContext.DataRow to input, in/out, and output parameters. Using a column naming convention you could dynamically generate the in, in/out parameters to be supplied when calling Execute(¡­). After execution, you could write some code to evaluate the in/out and out parameters based on the expected values provided by the DataRow in the TestContext.






Re: Visual Studio Team System - Database Professionals Can we do Data Driven Database testing?

Ashu283

Thanks Jamie.