Subscribe by Email


Showing posts with label RDBMS. Show all posts
Showing posts with label RDBMS. Show all posts

Friday, June 10, 2011

What are different ways to test databases?

Database testing should be kept simple. Database testing would include:

- Database Sandboxes
A sandbox is defined as a technical environment whose scope is well defined and respected. There are various types of sandboxes which can be used to work. In each sandbox, the database is copied. The new functionalities are implemented, existing functionality are refactored, validated in development sandbox and once you are satisfied with work, it gets shifted to project integration sandbox. In project integration sandbox, system is rebuild and tests are run to ensure nothing is wrong.
The advantage of sandboxes is that it helps to reduce the technical errors adversely affecting large number of people.

- Writing database tests
Writing database tests include setting up the test, running the tests using database regression testing tool and checking the results by comparing the current values against the results that you expected.

- Setting up strategies for database tests
To know the state of the database, put the database in known state before running the test suite. Common strategies for doing this is to start afresh and data reinitialization. Strategies for creating test data for writing database tests are having source test data, developing and maintaining test data creation scripts and self contained test cases.

- Database testing tools
There are two kind of database testing tools needed to test RDBMS: testing tools for interface tests and the other for internal database tests. Couple of things to remember here is that testing tools should support the language that you are developing in. Secondly, database should be put in a known state. Some database tetsing tools are:
Unit Testing Tools which enable you to regression test the database.
Load testing tools which simulate high usage loads on your database letting you know whether system's architecture can stand up to that level.
Test data generator are useful when large amounts of data is needed may be for stress and load testing.


Tuesday, June 7, 2011

What are Relational Database Management Systems? What is the need to test RDBMS?

Relational Database Management Systems cntains critical data which is updated by many applicatins and many end users. They provide important functionality as well. It is very important to test the functionality of relational database management systems. A regression suite should be made available and testing should be done on a regular basis.

The need to test a relational database management system is necessary because data is a very important asset and all the critical business related functionality is implemented in relational database management system. Generally, data professionals used to control changes and do formal testing but this approach did not proved to be efficient so because of the current approaches not being very efficient, there arises the need for relational database management system testing. Also, testing is a way to provide feedback that could be used to identify defects.

RDBMS testing should test the following :
- Black box testing at the interface which includes data values being persisted, data values being retrieved and stored functions and procedures.
- White box or clear box testing tests within the database. It includes scaffolding code which supports refactoring, unit tests, existence tests for database schema elements, view definitions, referential integrity rules, data invariants involving coloumns, data invariants for single column.

A test-first development(TFD) approach is used by agile software developers where a test is written before writing enough production code to fulfill that test.
- Add a test.
- Run the tests
- If it passes, again add a test otherwise make a little change and again run the tests.
- If it fails, again make a little change and run the tests.
- If it passes, the development stops.
- Once the test passes, again start over.

Test Driven Development(TDD) combines test first development and refactoring. When a new feature is implemented, the question whether this is the best design hwich enables the developer to add this feature is asked. If the answer is yes, then do the work and proceed. If the answer is no, design is refactored and then test first driven (TFD) is done.


Facebook activity