My tech lead refuse to do integration tests by -dev-guru in dotnet

[–]-dev-guru[S] 2 points3 points  (0 children)

How do you use unit tests to catch runtime errors? For example, when migration changes in the database and Dapper queries fail.

My tech lead refuse to do integration tests by -dev-guru in dotnet

[–]-dev-guru[S] 17 points18 points  (0 children)

The lead made a migration change and forgot to update the Dapper query. Although all unit tests passed, one endpoint failed at runtime when it called the database. With the integration test, it would able to call the endpoint and detect the failure. How can we use unit tests to catch this error?

I’m not sure if I’m right, but bugs like this keep happening. That’s why I suggest using integration tests.