jeudi 30 juillet 2015

Mocking JDBC connection in Scala

I'm trying to test out some Scala code that relies on a JDBC connection to an Oracle database. I would like to setup a mock database and fill it with dummy data to test my code on. I do not want to run a local sql server and am looking for a test framework that will allow me to mock everything so that my code can run on other systems without having to have a local sql server running.

I've looked into JOOQ (need a local sql connection), Acolyte (requires Scala 2.11 and you have to specify every query to be handled), DBUnit (Java only), ScalatestDB (outdated), but have found nothing that suits my needs.

Is there an easy way to mock my entire JDBC connection to test my code in Scala?

Aucun commentaire:

Enregistrer un commentaire