Questions tagged [dbunit]

DbUnit is a JUnit extension targeted at database-driven projects that, among other things, puts your database into a known state between test runs.

DbUnit is a JUnit extension targeted at database-driven projects that, among other things, puts your database into a known state between test runs.

614 questions
0
votes
1 answer

ReplacementDataSet with Maven DBUnit plugin

I'd like to use a ReplacementDataSet with DbUnit so that at build time I can parse my testdata.xml file and filter some data values. E.g., it would be nice to be able to do something like this: ReplacementDataSet rds = new…
MTR
  • 1,411
  • 4
  • 14
  • 23
0
votes
1 answer

DBUNIT :Verify XML data with Values in DB2 database using DBunit

I have a Huge XML with 1000s of records . Our Job loads these items into db2 database. And after that we manually check whether all records made it to the db and all columns are populated as that of XML values. I heard that DBUnit can simply…
0
votes
1 answer

Dbunit throws NullPointerException for onSetup()

I'm trying to get a handle on using dbunit and junit. The tests are basic junit tests not involving a database. The class fails before it ever gets there though. When the onSetup() method from IDatabaseTester is called, it throws a…
djeikyb
  • 4,470
  • 3
  • 35
  • 42
0
votes
1 answer

Spring AbstractTransactionalDataSourceSpringContextTests - Preventing database rollback after each Junit test

I have a test class that extends AbstractTransactionalDataSourceSpringContextTests. I did not write this class, and need to make a small change. I'd like to see what would happen if i prevented the recreation of the test database (using DbUnit)…
Dominic Bou-Samra
  • 14,799
  • 26
  • 100
  • 156
-1
votes
1 answer

phpunit/dbunit not installing for PHP8.1

Previously I am using phpunit/dbunit version 3.0.3 for PHP7 version, Now I have upgraded PHP to 8.1 version, and I am unable to upgrade the dbunit to the PHP8.1 supporting version. I am getting the below error and my composer.json file is below.…
Chitrasen
  • 49
  • 1
  • 6
-1
votes
1 answer

How to set current date in yaml file

I am creating a dataset in yml format to initialize a table in a postgresql database - id : 5 description : "test5" is_deleted : false last_redaction_date : 2021-12-13 15:09:52.715570 persist_date : 2022-03-02 15:09:52.715570 …
-1
votes
1 answer

Syntax error in SQL statement running JPA query

I have this JPA query in a Spring MvC project @Query(value = "with\n" + " jupiter_courante ( \n" + " jupiter_id\n" + ")" + "as (\n" + " select pa.jupiter_id from\n" + "jupiter_microfusa…
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
-1
votes
1 answer

Is prefix a reserved keyword in mysql

Is 'prefix' a reserved keyword in 'mysql', since I get the following error when I try to populate sample data using dbunit for a table containing column called 'prefix' Embedded error: user.PREFIX - (Non-uppercase input column: prefix) in…
Jason
  • 12,229
  • 20
  • 51
  • 66
-1
votes
1 answer

CI / TFS and SQL Server database testing : schema validation with unit tests

What are best practices to perform the Schema-Validation in SQL Server ? I need to test whether a views, stored-procedure, trigger of function points to an existent and working table (or any other objects) or not, and need to perform this check…
-1
votes
1 answer

How do i "run" a dbunity test?

I am relatively new on unity testing and just started working with dbUnit. I wrote a test class, along with the test methods. However, I have't figured out yet how to "run" my test case class. How can I do that? I mean, how do I execute my test…
-1
votes
2 answers

XML attribute double value

I'm trying to use DBUnit to test my repository service. I have this xml that show the expected result: id= String , description =…
Koen Demonie
  • 539
  • 1
  • 7
  • 24
-1
votes
1 answer

Cross database in memory unit testing

Objective:Unit Testing DAO layer using any in memory database(HSQL/Derby?) My end database is Sybase, so the query uses cross database joins. Eg. of the query : select table1.col1, table2.col2 from db1..table1, db2..table2 where…
Achow
  • 8,600
  • 6
  • 39
  • 49
-2
votes
2 answers

DBUnit delete data from postrgess partition table java

We have a table invoice_meta_data which is partitioned into invoice_meta_data_10m invoice_meta_data_20m Now when I try to delete the data using DatabaseOperation.DELETE.execute(connection, invoiceDataSet); at…
sadath pasha
  • 49
  • 11
-5
votes
1 answer

"java.lang.NullPointerException" error in my generic Dao while configuring unitary testing with DBUnit

I receive the "java.lang.NullPointerException" error in the following line: miIdioma=miDao.find(Idioma.class, "playa"); miIdioma is an object from de class "Idioma" which is composed by the atrributes "palabra" and "idioma" The Dao file is called…
birdman
  • 211
  • 1
  • 5
  • 13
1 2 3
40
41