There are a already a bunch of related questions and answers, but I will share what I did for myself: using jcabi. It's not in-memory
, but it starts a real live mysql instance and tears it down after the test.
Another thing: you would then have integration test
for this, not unit test
.
Read about the difference and see if you like this.
testing mysql etl using java and junit tests
Вопрос
I would like to test an etl process I have built out in java to load data up in mysql. Basically I would like to create an in memory database of mysql and then load data then run queries against it to make sure I have what I think I have. What is the current best practice for doing this? Thanks!
Решение
Не связан с StackOverflow