mardi 14 juillet 2020

Self-contained integration tests with .NET Framework & SQL Server

I'm trying to introduce integration tests for (NHibernate-based) Repositories in a (classic) .NET Framework based legacy application. The tests will depend on an SQL Server instance. The main goal is to reduce turnaround time for tedious manual testing of new code.

Now here's my problem: I'd like the tests to be self-contained, i.e. the tests shouldn't need to assume that SQL Server is installed on the host or some shared remote system. But there does not seem to be an easy way to use SQL Server in some sort of embedded manner. LocalDB doesn't fit the bill because it still requires SQL Server binaries to be installed.

A Docker-based approach as has been suggested in various places doesn't seem practical either, it would just replace one external dependency (SQL Server) with another (Docker engine), while further complicating things. Plus, by far not all devs in my team are comfortable with Docker yet.

So it seems I am at an impasse.

Can anyone think of an alternative, practical approach?

Aucun commentaire:

Enregistrer un commentaire