Create an in-memory database structure from an Oracle instance

后端 未结 4 754
一生所求
一生所求 2021-01-30 10:56

I have an application where many \"unit\" tests use a real connection to an Oracle database during their execution.

As you can imagine, these tests take too muc

4条回答
  •  误落风尘
    2021-01-30 11:34

    As long as your tests clean up after themselves (as you already seem to know how to set up), there's nothing wrong with running tests against a real database instance. In fact it's the approach I usually prefer, because you'll be testing something as close to production as possible.

    The incompatibilities seem small, but really end up biting back not so long afterwards. In a good case, you may get away with some nasty sql translation / extensive mockery. In bad cases, parts of the system will be just impossible to test, which I think is an unacceptable risk for business-critical systems.

提交回复
热议问题