jeudi 14 juin 2018

Simultaneous integration test using the same SQL database best practices

My .NET application talks to a SQL DB and I'm trying to develop an integration test for the application. Right now the way I do it is to clean up the SQL DB during the test setup phrase, i.e every time I run the test, the test will start off with a clean db.

However, if 2 people run the same time roughly at the same time, I might run into trouble since both people are reading and writing the same DB at the same time.

I did some research, looks like the best way is to provision a new DB in the setup and delete the db during teardown.

I wonder if there is a simpler approach? Thanks.

Aucun commentaire:

Enregistrer un commentaire