610 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
216
views
DBRider(DBUnit) won't insert data into test container in spring boot
Can anyone using DBRider / Test Container in spring boot give advice ?
I've been using DBRider/Testcontainer without any issue, but at some point , it doesn't work out.
It seesm ...
0
votes
0
answers
68
views
Using DBUnit in Spring Boot tests and rollback to keep the database clean
I was trying to test an API using DBUnit. Here are my steps to test:
1.Define initial data in initial-data.xml.
2.Define expected data in expected-data.xml.
3.Use MockMvc.perform to simulate an API ...
0
votes
1
answer
651
views
How to represent a bytes array with DB Rider in YAML configuration
I have a series of test cases using Spring Jdbc, Database Rider, and H2 — with Java 17.x. Everything works fine, but I can't find a way to represent a byte array in the YAML configuration file :/
This ...
user avatar
user4695271
6
votes
0
answers
674
views
Is There anyway i can use Dbunit with Junit5 while being in Spring 4?
am trying to migrate from Junit4 to Junit5 knowing that am working with Spring Mvc , version 4.3.5 and i wanna know if there s someway to work with dbUnit for my class Repository
I did my research and ...
0
votes
0
answers
218
views
Peculiar reset-behavior with H2/Spring in Tests
We have a microservice based on Spring Boot 2.7.6. For testing we employ dbunit/junit4 and a h2 database. We have some integrationtests which establish a database-baseline via a schema.sql and then ...
2
votes
0
answers
157
views
How to declare a sequence in DBUnit XML - in core Java
I need help to solve a unit testing problem using DBUnit. In my code I call nextvalue of the sequence.
This is failing as expected as my xml is not correct.
I have a schema /dtd as expected with table ...
-1
votes
1
answer
439
views
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 ...
0
votes
1
answer
578
views
DBRider: org.dbunit.database.AmbiguousTableNameException
I've migrated to Spring Boot 3, MariaDB 10.3 and DbRider 1.35.0 and I'm trying to run tests and I'm getting this weird error
@SpringBootTest(classes = { HibernateTestConfig.class, ...
0
votes
1
answer
308
views
How to avoid having constraint created by hibernate without having access to the entity
I have an entity where I cant have access to modify a wrong unique=true into the column definition
@Embeddable
class SomePk{
@Column(name="PERSON_ID", unique=true, nullable=false, ...
0
votes
1
answer
527
views
Use DBUnit in Spring without defined entities via "nativequery"
I am trying to use DBunit while testing a Spring controller. The tests fail to initialize because my dataset contains tables/columns which are not defined by an entity.
The queries are defined with ...
-1
votes
2
answers
397
views
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, ...
-1
votes
1
answer
4k
views
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....
0
votes
1
answer
247
views
XML field within the XML Dataset DBUnit
I'm fairly new at the dbUnit and I'm facing a bit of a problem. In my source table I have a column which is "XML_HEADER", the contents of this will always be in the XML format. Now, I am ...
0
votes
1
answer
870
views
Problems with integration tests after upgrading H2 database from 1.4.200 to 2.1.210
Recently I have upgraded H2 database in our SpringBoot project from version 1.4.200 to 2.1.210. It is used for testing purposes only.
For integration testing I am using dbunit 2.4.9 hibernate 5.3.10.
...
0
votes
1
answer
208
views
How to insert type Date into xml file for sql table
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<ROLE ID="1" ROLENAME = "Admin"/>
<ROLE ID="2" ROLENAME="Guest"...