Monday, May 11, 2009

Manual database testing using stored procedures

I am working in a project where we use web services and only 10% of the testing include front end testing. if we say as a non technical tester then there is a request and a response. The request is in form of XML having sets of data and response is also in form of XML. so here in such cases we need to test the internal behaviors of the application. we need to verify the data inserted to the appropriate destination in database. We need to test the functions working fine or not.
To test such applications a tester should be smart enough in identifying the scenarios which covers the testing of every functionality.

Now one and major part of this testing is to test in back end. the data inserted from from end is properly gone to the correct place. we do it manually. for this we need to know:
1- Detail knowledge of application.
2- Good knowledge of database used(overview of database used, good in query, datamodel, reltionship used).
3- Sound skills to identify the scenarios which covers all the functionality.(some time we need to identify the case which really come into action in production only. for this testers some times need to change from code to execute such scenarios.)

so doing verification of data we generally use some query to fetch data from database. We have sets of statement here.
I would always prefer to make some stored procedure which realy help in excecuting the queruies.

I wil give an simple example here which may help you that how to used stored procedure while testing with database.

I am taking an example here which allow a user to to register with a application by sending a request in form of XML. after registerting this the request will give you a key and using that key you can see the result which the application provide.
The flow of the request will be like:
1- The set of user data inserted
2- A key provided to user as in response
3- User again send a request using this key
4-user information recieved in form of XML.

so here the testing will include
1- wheather user data inserted in proper place in database.
2- The information recieved by user is correct or not.
for this we can make some quesries to fetch the data(it can be manually checked but that will take much time and will not be compatible.)

here we can also make some strored procesure(hope you undersatand basic of stored procesure how to create , how to execute).

suppose I want the user data from user table corresponding to a user id. for this you can write a procesure in a way...

1- Open a new query prompt
2- Write..
create procedure userdetail
{
@user_id numeric(10)
}
as
select * from USER
where USER_ID= @user_id

3- Execute this query
4- Now you can see this procesure in you list.
5- now to execute this you can use

exec userdetail '2001'

or simple go to the listing of procesures and execute there by clicking the option in right click.
you will find a window whete to pass user_id.


this is a simple procedure i used here. in same way we can test by passing inputs .

14 comments :

  1. Vishal,
    Would you be able to let me know how you perform web services testing as a technical tester as i'm new to testing web services.
    Your reply would be greatly appreciated.
    This is email ID ,please send me ur reply to the mail.Padmachalla1@gmail.com
    Thankyou
    Padma

    ReplyDelete
  2. hi Vishal,

    I would like to know more about database testing using selenium as i am new to automation testing. whatever u know about selenium(entire tool) kindly reply me. It's very useful for me in future to learn the tool properly. This is my mail id sandeep.a@qcon.in


    thank u

    sandeep


    waiting for ur reply................

    ReplyDelete
  3. Hi vishal,


    How r U? Could u send me some stored procedures which we are using while we did manual testing.

    Regards
    Soujanya

    ReplyDelete
  4. @ Saumya,

    there are no as such SP which are common for testing. its depend on your functionality what you want to test. in case i send you mine SP ..i don't see they will help you.

    ReplyDelete
  5. Hi,

    How do we use stored procedure using JMeter...

    ReplyDelete
  6. Hi vishal

    How r u? i am a fresher in testing can u send me some notes . Like data base testing ,manual testing and it's type.
    My email id - parshantchoudhary@gmail.com

    Thanks and Regards..
    Prashant Choudhary

    ReplyDelete
  7. Hi Vishal,

    I am a manual tester. Can you please guide me how learn store procedure?

    thanks
    bibhas

    ReplyDelete
  8. @ Bibhas, just google it. in same way you learn other things.:P

    follow any tutorial on Sp and practice them. here i am providing u a link where the basic is give...

    http://www.sql-server-performance.com/2003/stored-procedures-basics/

    ReplyDelete
  9. rahavendran:can u send me the documentation for this project..my id is rahavendran10@gmail.com.it wil be helpful for me ....

    ReplyDelete
  10. Hi vishal

    How r u? i am a fresher in testing can u send me some notes . Like data base testing ,manual testing,Automation Testing and it's type and also some interview related questions plzzzzzz.
    My email id - sona.bansal90@gmail.com

    Thanks and Regards.
    Kanchan Bansal

    ReplyDelete
  11. Hi Vishal,

    I m a new mannual testing as a fresher, can you send me on my e-mail id, some tips to how to crake the interview. Thanks
    sanjeev_manish59@rediffmail.com

    Thanks & Regards,

    Sanjeev mishra

    ReplyDelete
  12. hi Vishal iam fresher send me material related to testing

    vikalp.smartx@gmail.com

    ReplyDelete
  13. I do not create a lot of responses, but i did a few searching and
    wound up here "Manual database testing using stored procedures".
    And I do have some questions for you if it's allright. Is it just me or does it look as if like some of the responses appear as if they are left by brain dead individuals? :-P And, if you are posting at other sites, I'd like to follow
    anything new you have to post. Would you list of all of all your communal sites like your linkedin
    profile, Facebook page or twitter feed?

    Here is my homepage - bmi Chart For Women
    My website: bmi chart for women

    ReplyDelete
  14. Thank you for any other excellent article. Where else could anyone get that kind of info in such an ideal method of writing?
    I have a presentation next week, and I am on the look for such
    information.

    Feel free to visit my homepage - know more about

    ReplyDelete