mardi 14 janvier 2020

best practice for db integration tests

I have a lot of integration/unit tests in my project which use the db, and I want to know what is the best practice for running tests on DB (including unit tests developers run localy). Meanwhile I saw several concepts:

  1. one db test, which all the tests, from all developers, connect to.

  2. one db for each running test, which created at the start of the test, and droped at the end of the test (the worse concept in my opinion, because it is slow)

  3. one db for each developer, which the tests will run on.

  4. one db for each feature issue. (seams to be the best option).

what is the best practice among these options (or more options if there are)?

And is there a good framework for this best practice (We use java, maven and postgresql)?

Aucun commentaire:

Enregistrer un commentaire