Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [6d2a0b] master /
History



File Date Author Commit
src 2011-10-31 domseichter domseichter [6d2a0b] Refactored tests to real tests and examples
.project 2011-10-31 unknown unknown [2d5381] Initial import of sources into Git repository o...
LICENSE 2011-10-31 unknown unknown [2d5381] Initial import of sources into Git repository o...
README 2011-10-31 unknown unknown [2d5381] Initial import of sources into Git repository o...
pom.xml 2011-10-31 domseichter domseichter [e53c3b] Changed Maven Site target to include more reports.

Read Me

TriggerUnit is an extension to DBUnit and JUnit4 to create unit tests for database triggers.
Database triggers are often a critical part of todays business applications, but they are usually not integrated into the software engineering process.
TriggerUnit tries to change that by providing an simple and powerful framework for database trigger testing. 
Database trigger unit tests are created using a simple jave framework based on DBUnit and JUnit.

Integrating development of database triggers into the software engineering process, gives advantages 
like running unit tests on continuous integration server or measuring test coverage of your triggers.
It also makes the quality of your SQL code more visible and lowers gaps between software developers (e.g. java code, c# code) and database developers.

The main goals of TriggerUnit are:
- Integration of database triggers into the software engineering process
- Allow test driven development of database triggers
- Provide a simple framework to create unit tests for database triggers
- Only minimal changes on test data when database schemas or business logic changes

Each test is executed in the following lifecycle on a real database
1. Connect to database
2. Initialize database schema with predefined test data (e.g. defined in XML)
3. Create SQL triggers in the database
4. Execute one insert/update/delete statement on the predefined data (should call trigger)
5. Check against expected data to see if the trigger did run correctly
6. Continue with next test case and step 1