esting principally consists of two key activities they are 1) Organising Sandboxes 2) Developing Test Cases.
1): Organizing Sandboxes: Database testing involves the need of a copy of databases which are called sandboxes.
These sandboxes are of following three types
a) Functionality Sandbox: In this the new functionality of database will be checked and reflected in the existing functionality. Then the tested sandbox will pass to the next stage, which is an integrated sandbox.
b) Integrated Sandbox: In this stage all the sandboxes will be got integrated and then test the system.
c) QA sandbox: After the system is tested, sandboxes are sent for acceptance testing. This will ensure the quality of the database.
2) Development of test cases: The step by step process for the development of test cases is as under:
The first step is setting up of the test cases: Set up the database to a known state.
The sources of test data are
1) External test data.
2) Test scripts.
3) Test data with known values.
4) Real world data.
The second step is running the test cases: The test cases are then run. The running of the database test cases is analogous to usual development testing.
Traditional Approach of Test Case Execution:
Test cases are executed on the client side. The results which produced are then validated against expected values.
Advantages of Traditional Approach: It is simple and no programming skill is required. It not only addresses the functionality of stored procedures, rules, triggers and data integrity but also the functionality of application as a whole.
Disadvantages of Traditional Approach:
1) Sometimes the results after test case execution do no necessarily indicate that the data itself is properly written to a record in the table.
2) When wrong results are sent back after the execution of test cases, it doesn't necessarily mean that the error is a database error.
3) A crucial danger with database testing and with regression testing in specific is coupling between tests. If we put the database in to a known state, run several tests against that known states, before setting it, then those tests are potentially coupled to one another.
Advanced Approach of Test Case Execution:
First of all we need to do a schematic preparation for Testing, which involves:
Generate a list of stored procedures, triggers, defaults, rules and so on. This will help us to have a good handle on the scope of testing required for database testing.
Thereafter we can follow the following points:
1. Generate a scheme for test case table. Analyzing the scheme will help us determine the following:
- Can any field be marked as NULL?
- Boundary values.
- Constraints.
- Connectivity of various variables?
- Is there any look Up table available to check?
- What are user defined data types?
- What are primary key and foreign key relationships among tables?
- What is the primary function of each function? Does it read data and produce outputs, write data or both?
- What are the accepted parameters?
- What are the return values?
- When is the stored procedure called and by whom?
- When is a trigger fired?
Third step is to Check the results: Actual database test results and expected database test results are compared.
No comments:
Post a Comment