When I run test in IntelliJ, it works well, but if I run it by command line like
gradle test
or gradle clean test
it rerurns java.io.FileNotFoundException
String FILE_PATH = "sample/src/test/resources/"
IDataSet insertDataSet = new FlatXmlDataSet(new FileInputStream(FILE_PATH + "com/sample/mst.xml"));
Project structure is:
TestProject
You should change file loading code to:
getClass().getClassLoader().getResourceAsStream("mst.xml")