How to do database unit testing?

前端 未结 7 1062
时光取名叫无心
时光取名叫无心 2021-01-30 00:15

I have heard that when developing application which uses a database you should do database unit testing. What are the best practices in database unit testing? What are the prima

7条回答
  •  余生分开走
    2021-01-30 00:45

    As for JVM development, unit tests can benefit from JDBC abstraction: as soon as you know which JDBC data are raised by DB access, these JDBC data can be 'replayed'.

    Thus DB access case can be 'reproduced' for testing, without the target DB: no test/data isolation complexity, ease continuous integration.

    My framework Acolyte is an helpful framework in this way (including studio GUI tool to 'record' DB result): https://github.com/cchantep/acolyte

提交回复
热议问题