Download Database Regression Testing made easy with DbFit. Colin Moore-Hill

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Transcript
Database Regression Testing
made easy with DbFit.
Presented to the
BCS - SIGIST Conference, London : Dec 2008
Colin Moore-Hill
Senior Technical Test Analyst @ RWE IT UK
RWE IT UK
PAGE 1
Regression Testing Databases
Overview:
Introduction.
Database Regression testing.
>Why Test Databases
>How to test the database
DbFit
>Background
>Wiki design
An Act of Regression
>Worked Example of the Regression Testing
Closing
>Future Links and learning opportunities.
RWE IT UK
PAGE 2
Regression Testing Databases
Database Regression testing.
What! Test the Database? Why? That’s what DBA’s are for !!
DBA’s, no more than Developers, are human and prone to error and
while the examples shown later on are quite simple, some SQL queries
and commands can be programmed in themselves. Having a simple
repeatable test requiring little programming knowledge to create would
be of great assistance.
Why test the Database?
For a lot of businesses today, the data held on the database are the
most vital commercial asset they have. Business Critical functions will
run off this data so surely it is logical to have regression tests to
validate that the data is being stored correctly.
RWE IT UK
PAGE 3
Regression Testing Databases
Database Regression testing.
What should we Test.
There are two main areas of concern around the database:
White Box – Code internally within the Database.
Existence checks for database schema (Tables)
Triggers, Views Constraints, Referential Integrity and
Existing Data Quality.
Black Box – At the Interfaces
Stored Procedure
Functions
Data values - Persistence
Data values – Retrieved
RWE IT UK
PAGE 4
Regression Testing Databases
DbFit.
What is this Db FIT?
Developed out of the Fitnesse Acceptance testing framework for unit
testing and acceptance testing. It also gives DBA a neat tool to express
and manage tests in a relational language without knowledge of .net or
Java.
How is it Easier than unit testing?
As it is built on a Wiki interface, the creation of tests are quite straight
forward and could almost be written by business analysts or even the
client themselves.
Why do I promote its use?
Purely because I find it to be quite a useful tool and wish to spread the
word around
RWE IT UK
PAGE 5
Regression Testing Databases
DbFit in “An Act of Regression”.
Showing by example:
Testing the Metadata, The physical structure of the database
tables.
Testing the Business logic, Usually implemented through Stored
Procedures, Triggers and the Like.
Testing the Data, both derived and static
Easy Execution of Tests and Suites of tests.
RWE IT UK
PAGE 6
Regression Testing made easy with DbFit.
Home Page – DbFit
Server
Home Page of the DbFit Server
RWE IT UK
PAGE 7
Regression Testing made easy with DbFit.
Properties Page - DbFit Server
Properties Page - DbFit Server
Properties Page of the DbFit Server
RWE IT UK
PAGE 8
Regression Testing made easy with DbFit.
Quickly find out the structure of
Procedures and Tables.
Quickly find out the structure of Procedures and Tables.
RWE IT UK
PAGE 9
Regression Testing made easy with DbFit.
A complete Suite of tests
A complete Suite of tests
RWE IT UK
PAGE 10
Regression Testing made easy with DbFit.
A single Suite of tests
A single Suite of tests
RWE IT UK
PAGE 11
Regression Testing made easy with DbFit.
A single design of a test
A single design of a test
RWE IT UK
PAGE 12
Regression Testing made easy with DbFit.
Successful test for the structure of
the Database Metadata.
Successful test for the structure of the Database Metadata.
RWE IT UK
PAGE 13
Regression Testing made easy with DbFit.
A correction made to Test
A correction made to Test....(Int changed to a Char)
RWE IT UK
PAGE 14
Regression Testing made easy with DbFit.
Regression execution of the test,
showing the change as an error
Regression execution of the test shows the Change as an error
RWE IT UK
PAGE 15
Opportunities for futher knowledge:
» DbFit Homepage – Fitnesse.org
» In the Head Sessions – www.skillsmatter.com
» Gojko Adzic – gojko.net
» The Hairy Tester - HairyTester.mazota.com
RWE IT UK
PAGE 16
THANK YOU VERY MUCH
FOR YOUR ATTENTION.
Any Questions?
RWE IT UK
PAGE 17