Thank you for your continuous support.
I'm struggling with how to use DBUnit, so I'd like to ask for your advice.
You can compare the actual table with the data specified in Excel in DBUnit, but
Is it possible to retrieve and compare the specified records from the real table?
★How to compare the actual table in DBUnit with the data specified in Excel
IDataSet databaseDataSet=connection.createDataSet();
// Retrieving actual data from DB
ITable actualTable=databaseDataSet.getTable("M_KEIYAKU");
// acquisition of expected value data
IDataSet expectedDataSet=newXlsDataSet(
new File("src/M_TEST.xlsx"));
ITable expectedTable=expectedDataSet.getTable("M_KEIYAKU");
// Comparison of expectations and actual data
Assertion.assertEquals (expectedTable, actualTable);
Why do you want to do it?
when performing multiple test patterns
At the end of each test, the test data was deleted and the data was consistent.
I'd like to check the data after the test.
Now I know how to implement it.
https://www.ibm.com/developerworks/jp/java/library/j-dbunit/
List 2.DbUnit Query Capabilities
578 Understanding How to Configure Google API Key
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.