performance - Nhibernate Nunit - clear database between testcases -


we have rather extensive test suite takes forever execute. after each test has completed, database (mssql) needs emptied fresh next testcase. way temporarily removing foreign keys, truncate'ing tables, , re-adding fks.

this step takes somewhere between 2-3 seconds, according nhprofiler. time seemingly spent fk operations.

our current method not optimal, way should go improve performance ? number of elements deleted db insignificant compared number of operations fk removal/additions.

using in-memory sqlite database not option, code under test uses mssql specific operations.

you wrap in transaction , in end rollback everything. that's how it. allows run tests in parallel.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -