dbunit Questions

2

Solved

What are some best practices/principles to follow, beyond those recommended on the actual dbunit site, that can greatly speed up tests as well as keep them maintainable? I long for a library like f...
Calves asked 10/12, 2011 at 5:45

4

Solved

In my project, I've used spring, jpa with PostgreSQL DB, I've lots of table in DB and I need to have Unit testing of all of them. Is there any framework which just rollback all the transactions af...
Delude asked 4/8, 2011 at 12:2

1

Does anyone have a link to a good, working tutorial or book on how to get started with adding the DBUnit layer to my PHPUNit tests? I've tried following the code in protected function getD...
Allowable asked 25/8, 2010 at 18:34

2

Solved

I am new to automated testing and dbUnit. So I would appreciate your advice. I am going to create a test suite, that will run the following way: create an in-memory H2 database run DDL scripts t...
Newsmagazine asked 28/9, 2010 at 14:16

1

I tried to export a dataset from an oracle database by a set of primery keys using: TablesDependencyHelper.getDataset(connection, fullTableName , new TreeSet(Arrays.asList( new BigDecimal[]{new...
Fraase asked 15/10, 2010 at 16:52

2

Solved

I try to load a table, that have an identity column, with DB Unit. I want to be able to set the id value myself (I don't want the database generate it for me). Here is a minimal definition of my ...
Leeds asked 17/11, 2010 at 14:57

3

Solved

     Before we start I know a fair few people consider tests that hit the database not "unit tests". Maybe "integration tests" would be a better name. Either way developer ...
Gusman asked 28/8, 2009 at 9:55

2

Solved

I've seen some people use the maven-sql-plugin to do this. But it seems like a task that is better suited for DBUnit....perhaps at the beginning of an entire test suite. What's the best practice h...
Schoenfelder asked 3/6, 2010 at 23:18

1

How to insert line break in dbunit dataset? Like this: <user id="1" story="first line second line third line"/> If I do it in this way field story in db appears divided by spaces only ...
Uraninite asked 6/5, 2010 at 12:4

1

Solved

I have seen a couple of question regarding creating datasets in DbUnit here on StackOverflow, but all of them were regarding export data from existing tables. My question is, can DBUnit create som...
Fenland asked 4/3, 2010 at 14:56

2

Solved

I am using DbUnit together with Unitils, which works great most of the time. Today I found a strange problem. Situation is: I use Hibernate, and have id with "increment" generator: <id...
Wallinga asked 9/2, 2010 at 9:49

1

Solved

I use DbUnit for unit-testing of my DAO objects. It works great so far. I have a problem, I have field ob type byte[] which is stored as BLOB in the database. The column is not-null. How can I spe...
Escutcheon asked 21/1, 2010 at 8:47

5

Solved

I just realized that DBUnit doesn't create tables by itself (see How do I test with DBUnit with plain JDBC and HSQLDB without facing a NoSuchTableException?). Is there any way for DBUnit to automa...
Floranceflore asked 7/10, 2009 at 12:25

1

Solved

I want to create a test table that is empty. Using the Example from digitalsandwich, I want something like: require_once 'PHPUnit/Extensions/Database/TestCase.php'; class BankAccountDBTest extends...
Panlogism asked 1/10, 2009 at 16:29

© 2022 - 2024 — McMap. All rights reserved.