Is it bad practice to run tests on a database instead of on fake repositories?

前端 未结 11 1356
傲寒
傲寒 2020-12-10 04:01

I know what the advantages are and I use fake data when I am working with more complex systems.

What if I am developing something simple and I can easily set up my e

11条回答
  •  不知归路
    2020-12-10 04:22

    It rather depends on whether the DB is automatically set up by the test, also whether the database is isolated from other developers.

    At the moment it may not be a problem (e.g. only one developer). However (for manual database setup) setting up the database is an extra impediment for running tests, and this is a very bad thing.

提交回复
热议问题