针对不同数据库的集成测试

integration tests against different databases

我正在研究 spwrap 以简化对存储过程的调用。

目前,我针对 HSQL 编写了几个自动化集成测试,它提供内存数据库模式(以及 travis-ci 上的 运行)。

我仍然需要针对其他 DBMS 编写更多集成测试,例如 MySQL、SQL Server、Oracle 等

根据此 answer, I can use MariaDB4j 进行 MySQL 内存测试。

但是其他 DBMS,特别是 SQL Server 和 Oracle 呢?

更新Is HSQLDB database compatibility sufficient?

一个可能的解决方案是在 docker/docker-compose 上 运行:

An important part of any Continuous Deployment or Continuous Integration process is the automated test suite. Automated end-to-end testing requires an environment in which to run tests. Compose provides a convenient way to create and destroy isolated testing environments for your test suite. By defining the full environment in a Compose file you can create and destroy these environments in just a few commands

https://docs.docker.com/compose/overview/#automated-testing-environments

顺便说一句,Travis-ci 支持 docker