Monday 29 September 2014

Overview of Database Testing

We all are aware of the importance of hardware and software.We all know that they both communicate with each other.But often we neglect the power of the intermediate that aids in the communication.This mediator is the database which stores all the data.It acts like a repository of data.Thus, it acts as an important component of quality assurance to ensure the smooth working of the whole system.Here comes, the role of database testing .
Since, I have just started, I would be sharing some key points on the same in a precise way to get a clear overview.

Role of DB Testing

To ensure that whatever data  we enter from the front end,gets stored properly at the back end
and Whenever we call that stored record via queries/commands from the front end it should show properly.


Importance of DB Testing 

  • It is the most important asset of any organisation.
  • If it malfunctions, it may cause
    • System deadlock
    • Data corruption
    • Data loss
    • Bad performance
Common Issues in Database

  • Data corruption: If data gets corrupt, the possible  reasons can be --
    •  Poor designing of it.
    • Designing  which  doesn’t scale.
  • Needless data.
  • Inconsistency of data. 
  • Denial of service attempts.  :
    • Leaving evidences for hacking
    • For Example --
      • Using SQL injection attacks one can do:
        • Data corruption.
        • Attempts for confidential data theft.
Key Areas in DB Testing

  • Data validity testing - 
    • Testing the correctness of data.
    • Lets Say -- 
      • In the weeks field,there is a validation from 1 to 7.In this case,it should not accept any value less than 1 and greater than 7.
      • Like wise,Name field cannot contain numbers.Only letters should be accepted.
  • Data integrity testing -  Data integrity ensures accuracy and consistency of data to maintain its quality in database.
    • For Example
      • if a student has some id say S_123,then another student with the same id should not be allowed in database.
  • Testing of procedure, trigger and functions
  • Performance test of database say time required for query execution.
  •  Security of data - 
    • Important details say passwords or debit card/credit card numbers should be in encrypted format instead of text.
    • Passwords for db should be such that no one can guess them. 


Testing of  a database?

Database can be tested through front end as well as back end.

  •  Database test from the front end - 
    • To query the database from the front end & then perform search for it.
    • To pick  any existing record, make some changes in it and then save the record.
    • To pick any record which is already there then perform operations like DELETE or REMOVE  by  confirming the deletion.
    • Repeat the  above test cases with invalid data as well ,just to check if it works as expected.
  • Database test from the back end - It has few things similar to  front end testing. Many test methods can be used for back end testing.However,Structural testing and functional testing works best for it.
    • Structural back end test - It basically involves testing the basic structure of database.Following things come under it :
      • Database schema testing -  includes database design, tables, table columns, column types, keys etc.
      • Stored procedure tests.
      • Trigger tests.
    • Functional back end test - focuses more on functionality and features of a back end and tests the following :
      • Testing basic features of database say --
        • While executing queries like UPDATE, INSERT and DELETE,data is updated,added and removed correctly from intended places according to the applied constraints.
      • Here again we will be checking the  data integrity by checking whether all the validations are working properly .
      • Testing of Login details say database access rights,proper login details check should be there  say user id and password,when a user tries to login to database .


Hope this should be  useful to you and would help to start with database testing.
Will be coming soon with more posts according to my learning from various sources....

Till then Happy Testing....:) :)  !!!!

4 comments:

  1. Good insight and valuable info for beginners...nice blog!

    ReplyDelete
  2. I always wanted to kickstart into db testing, surely now i know where to startup with :) Keep sharing!

    ReplyDelete
  3. Nice blog with valuable info....!!!!

    ReplyDelete