I'm writing an autotest(with java maven+junit+cucumber)
Now I try to make some delete queries to db after the end, but face some problems:
I know there is some hibernate thing but I have never used it and Im not sure if It can make what I need
Im looking for some options were I can save how db was before test then do test and then revert all what happend to db so it is same as it was before test
There are 3 ways to do that. Probably both are not „the best”, but works.
import.sql
file. You need to recreate database before each test. This solution is ancient, and difficult to maintain in an environment with multiple tests.