VulcanAnalytics / DBTester

Simplified MSSQL database testing library
GNU General Public License v3.0
1 stars 2 forks source link

Execution of individual tests takes too long #46

Open darrencomeau opened 5 years ago

darrencomeau commented 5 years ago

Each test execution will take ~ 1 second in one project.

This is too long, can the performance be improved?

darrencomeau commented 5 years ago

Found a significant speed improvement by removing the ClearTable method from a test framework hook script. (previous 4min execution takes 20 seconds)

Used the ExecuteStatementWithoutResult method and a simple delete statement instead.

Profiler showed some excessive queries against metadata

darrencomeau commented 5 years ago

Updated the method to remove object existence checking and metadata check for foreign key constraint, instead attempting a truncate and reverting to a delete if an error is raised.