문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top