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
Post a Comment