Wednesday, January 14, 2009

QA: back end testing

Generally tester prefer to test front end of a site. but for a bug free and high performance of your application, we need to test its back end.
In fact Back end/database testing is a separate area of testing which it a kind of white box testing. But we can cover some of this in out QA/ testing. Now the question is , How and what?
Is this possible to do this manually?
Yes, at least doing some thing is better than avoiding . In my projects I always prefer to do database testing. Testing the front end of a site, should not be considered only. We need to practice back end testing also. I manage to write some SQL queries and execute them manually. This is all depend on you depth knowledge of the application database. the relations among various tables. Write yoy test cases and implement them into queries.
will be pointing out some case here . Basic thing is that , to test back end we need to be strong in database. To test application we need to gain knowledge of the data model and the relation ship among the different tables. If you are new to this job you can take help from your team mates to get in touch with database.
There are some tools to test database. but in most case working in small project or middle organization, you are not facilitated with this. In such case we need to practice it manually. I will cover all this later here in this post only.
just have look here why we need to test database in more....
If your data server's slow then there is no chances that your front-end coding will improve things. The most common reason must be Poorly optimized table indexes. so in this case we need to test Index.

The list of things we generally cover in database testing:
1. Data integrity-The complete data belonging to each entity should be stored in the database. There should not be any missing data
2. Correctness of the data stored in the database- The data stored should be correct and stored in right place.
3. Data type testing
4. Data size testing- Generally we test Data size only at the front end, but it is essential to test it at back end separately
5. Database performance
6. Data security
7. In case of data migration check Correctness and completeness of data
8- If you are good in database also test for Stored procedure. in this we need to test Every Stored Procedure separately. which may cover:
-. The no. of arguments being passed
-. The data type of each of the arguments being passed
-. The order of the arguments being passed
-. The return value
-. The data type of the return value

9. Input Item verification- In this we verify the input items like text box, combination box, active X controls. generally ask you developer to test this during unit testing.

As in point 5 , it is pointed out that we need to test for performance. So what can we check in database. we measure the executing time to see the performance. Also check the indexing . The poor indexing may cause your application slowness. So always there should be a proper Indexing for better performance.

I am pointing out a simple example here that how can we verify the database entries manually.
Suppose We have a registration form . so in from end we only have a UI where there must be some input fields and a submit button. Most common test is to fill the form and verify weather that user is created or not. but we don't know what is going on in database. so taking this example we first gain full knowledge of our database. Which field is mapped with which table and what are the columns where data will be inserted.
once you are familiar with the data model , we can write some queries using various tables and columns joining.
Now First thing to do- check in front end(execute all test case)
and second- test back end same thing by executing the queries to insure that the data is inserted in right table and the data is correct.

This is not the end in fact, there is lots to do.
Please share your experience and come with the more ideas.

22 comments :

  1. Very good article indeed. I'm intersted in Database Testing and I need to know more about it. Can you please, elaborate more about Database Testing.

    Bajrang Badaik

    ReplyDelete
  2. It's fine article:How will you verify data integrity can you explain it with some examples?
    e-mail: Viswanath.madisetty@gmail.com

    ReplyDelete
  3. your explanation is good but it will be good if you explain how to optimize the table indexes,performance tuning and how to go about data migration check

    ReplyDelete
  4. Hi Vishal,
    Very nice article. really this is very informative. can you send me some more details related to setting up sand boxes for db test and start with Schema verification and testing db performance. Please send me information to sameerreddyp@gmail.com.

    ReplyDelete
  5. Hi Vishal
    Its really more specific and easily undestandable. Could you help me out providing some back end test case sample to jmtn2006@gmail.com thanks Sarwar

    ReplyDelete
  6. Hi Vishal,

    Very informative article. Can you send me some more stuff on back end testing, which iam very much interested in learning.

    Please send the information to anilv.btech@gmail.com

    ReplyDelete
  7. Hi Vishal,

    Thanks for such an excellent article which was quite easy to understand.

    I would request you to be my mentor since i have just stepped into testing and want to learn and master it under your visionary path.

    Please email me the rest of the article at prashantkumar@live.ca

    Thanks a ton,

    Prashant

    ReplyDelete
  8. Hi Vishal:

    Very good detailed and easy to understand article on this topic, luv to read more on this with some practicle examples, if u can forward more on my emai id: vkasera.anjali@gmail.com

    ReplyDelete
  9. Hi Vishal:

    Very good detailed and easy to understand article on this topic, luv to read more on this with some practicle examples, if u can forward more on my emai id: gupta.vanu@gamil.com
    Thanks

    ReplyDelete
  10. Very good blog,do you have more post like this on testing.Love to read it.
    Thanks

    ReplyDelete
  11. thank you very much for the good article, very helpful for beginners.

    ReplyDelete
  12. Hi It was very nice to see ur article and i wish if u could give me some more details related to setting up sand boxes for db test and start with Schema verification and testing db performance.
    mails me at kandulaj@gmail.com

    ReplyDelete
  13. awesome....useful

    ReplyDelete
  14. Well explained! Thanks!!

    ReplyDelete
  15. The main aim of automated testing is to reduce the amount of manual work in testing software and reporting for bugs.STC Technologies

    ReplyDelete
  16. Hi Vishal,
    Your article is too good to understand..
    Please send me some Faq's for the Interview
    email- anand.bholane@gmail.com

    ReplyDelete
  17. Hi Vishal,
    Your article is too good to understand..
    Please send me some Faq's for the Interview
    email- anand.bholane@gmail.com

    ReplyDelete
  18. Hello Vishal,

    I am very new to the database testing.Your article made the things very easier to understand.
    Can you help me by giving more examples for database testing?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete