database-testing

Database integration tests

When you are doing integration tests with either just your data access layer or the majority of the application stack. What is the best way prevent multiple tests from clashing with each other if they are run on the same database? ...

Can I flush my NHibernate session and get a new session without committing the transaction?

I'm using Castle ActiveRecord for persistence, and I'm trying to write a base class for my persistence tests which will do the following: Open a transaction for each test case and roll it back at the end of the test case, so that I get a clean DB for each test case without me having to rebuild the schema for each test case. Provide the...

DbUnit how to guard against multiple tests running at the same time?

I am working on a test environment for a project, and am looking into using DbUnit.NET to do a lot of the database interaction testing. I do have one very big question though: We are running against Oracle, and setting up a seperate test DB instance for every developer really isn't feasible (especially since we only have 1 DBA who is al...

What is good way of doing Database Unit testing.

We are using Power Designer for Database Modelling and whenever something is changed in model (column name, datatypes etc) have go back and test all depended stored procedures and fix them accordingly. What would be the best tool to do unit testing of database. Thanks ...

What is the best way to do testing database (MYSQL spesific)

Right now i'm on testing something in a database. It's a wordpress database. i have to write and delete and do other operation on it. As you know it, it has indexing mechanism that will always make every new post inherit the next highest possible ID. Please consider that this database is a copying of used database. it has been written b...

How to delete all database data with NHibernate?

Is it possible to delete all data in the database using NHibernate. I want to do that before starting each my unittests. Currently I drop my database and create it again but this is not acceptable solution for me. ========================================================== ok, here are the results. I am testing this on one database (Post...

How to populate a test database in Android?

I have a test class that extends ProviderTestCase2<>. I would like to populate this test class database with data from some .db files. Is there some particular method to push some .db file into the Mock Context of a ProviderTestCase2? Otherwise which way is the easier to populate the database from the .db file?! Thank you very much!!...

How can I specify the database password when running database unit tests during the build?

I'm trying to integrate database unit tests into the build process (Visual Studio 2005, TFS, VS for Database Professionals, MS SQL Server 2005). The build is running on a dedicated build server. When the tests (that work perfectly locally) start running on the server, I get a "login failed" error because the database password I save in T...