Sie sind auf Seite 1von 13

1What we norma||y check for |n the Database 1est|ng?

uaLabase LesLlng lnvolves some lndepLh knowledge of Lhe glven appllcaLlon and requlres more deflned
plan of approach Lo LesL Lhe daLa key lssues lnclude
1) daLa lnLegrlLy
2) daLa valldlLy
3) daLa manlpulaLlon and updaLes
1esLer musL be aware of Lhe daLabase deslgn concepLs and lmplemenLaLlon rules
In DB Testing, basically all the events like Add, Delete, Update, Modify etc...
cbeck fot Joto poollty occotocy telloblllty tbtooqb tbe stooJotJ ptoceJote JefloeJ by tbe
otqoolzotloouotobose testloq meoos to cbeck tbe softwote Jotobose coooectloo ooJ olso weotbet lt
tettlve tbe Jeslte ootpot by fltloq so poety
What steps does a tester take |n test|ng Stored rocedures?
irst the tester should to go through the requirement, as to why the particular stored procedure
is written for.
Then check whether all the required indexes, foins, updates, deletions are correct comparing
with the tables mentions in the Stored Procedure. And also he has to ensure whether the Stored
Procedure follows the standard format like comments, updated by, etc.
Then check the procedure calling name, calling parameters, and expected reponses for different
sets of input parameters.
Then run the procedure yourself with database client programs like TOAD, or mysql, or Query
Analy:er
Rerun the procedure with different parameters, and check results against expected values.
inally, automate the tests with WinRunner.
3 now to check a tr|gger |s f|red or notwh||e do|ng Database test|ng?
t coo be vetlfleJ by poetyloq tbe commoo ooJlt loq wbete we coo oble to see tbe ttlqqets flteJ
now do you test whether the database |s updated as and when an |nformat|on are added |n the
front end?G|ve me an examp|e?
It depends on what level of testing you are doing.When you want to save something from front
end obviously, it has to store somewhere in the database
You will need to find out the relevant tables involved in saving the records.
Data Mapping from front end to the tables.Then enter the data from front end and save.
Go to database, fire queries to get the same date from the back end.
It depends on what level of testing you are doing.When you want to save something from front
end obviously, it has to store somewhere in the database
You will need to find out the relevant tables involved in saving the records.
Data Mapping from front end to the tables.Then enter the data from front end and save.
Go to database, fire queries to get the same date from the back end.
Ans2 ltst tbe testet sboolJ to qo tbtooqb tbe tepoltemeot os to wby tbe pottlcolot stoteJ ptoceJote ls
wtltteo fot
1beo cbeck wbetbet oll tbe tepolteJ loJexes jolos opJotes Jeletloos ote cottect compotloq wltb tbe
tobles meotloos lo tbe 5toteJ ltoceJote AoJ olso be bos to eosote wbetbet tbe 5toteJ ltoceJote follows
tbe stooJotJ fotmot llke commeots opJoteJ by etc
1beo cbeck tbe ptoceJote collloq oome collloq potometets ooJ expecteJ tepooses fot Jlffeteot sets of
lopot potometets
1beo too tbe ptoceJote yootself wltb Jotobose clleot ptoqtoms llke 1OAu ot myspl ot Ooety Aoolyzet
ketoo tbe ptoceJote wltb Jlffeteot potometets ooJ cbeck tesolts oqolost expecteJ voloes
loolly ootomote tbe tests wltb wlokoooet
What |s way of wr|t|ng testcases for database test|ng?
To write testcase for database its fust like functional testing.
1.Obfective.Write the obfective that you would like to test. eg. To check the shipment that i load
thru xml is getting inserted for perticular customer.
2.Write the method of input or action that you do. eg.Load an xml with all data which can be
added to a customer.
3.Expected .Input should be viewd in database. eg. The shipment should be loaded sucessfully
for that customer,also it should be seen in application.4.You can write ssuch type of testcases for
any functionality like update,delete etc.
You have to do the following for writing the database testcases.

1. irst of all you have to understand the functional requirement of the application throughly.
2. Then you have to find out the back end tables used, foined used between the tables, cursors
used (if any), tiggers used(if any), stored procedures used (if any), input parmeter used and
output parameters used for developing that requirement.
3. After knowing all these things you have to write the testcase with different input values for
checking all the paths of SP.

One thing writing test cases for backend testing not like functional testing. You have to use white
box testing techniques.
or writing database test cases.
1.You have to understand the functional requirement of the application thoroughly
2.You have to know the names of the tables and the column names where data is getting updated
for specific functionalities
3.You have to know the parent as well as the child tables associated with them 1beo test tbe
fooctlooollty of tbe oppllcotloo
5lmoltooeoosly stott wtltloq tbe u8 test coses wltb tbe poetles yoo bove oseJ ot tbe bockeoJ wblle
testloq tbe tobles ooJ stoteJ ptoceJotes yoo bove oseJ lo otJet to qet tbe JeslteJ tesolts 1tlqqets tbot
wete flteJ 8oseJ oo tbe stoteJ ptoceJote we coo koow tbe fooctlooollty fot o speclflc pelce of tbe
oppllcotloo 5o tbot we coo wtlte poetles teloteJ to tbot tom tbot we moke u8 testcoses olso

6 now to test a D1S package created for data |nsert update and de|ete? What shou|d be cons|dered |n
the above case wh||e test|ng |t?What cond|t|ons are to be checked |f the data |s |nserted updated or
de|eted us|ng a text f||es?
Data Integrity checks should be performed. I the database schema is 3rd normal form, then
that should be maintained. Check to see if any of the constraints have thrown an error. The most
important command will have to be the DELETE command. That is where things can go really
wrong.Most of all, maintain a backup of the previous database.
Write a query to find the second largest value in a given column of a table?
To find the second largest salary amount from employee table

select max(salary) from employees
where pin (select max(salary) from employees)
8 What is database testing and what we test in database testing?
Database testing involves some in depth knowledge of the given application and requires more
defined plan of approach to test the data. Key issues include.

1) Data Integrity
2) Data Jalidity
3) Data Manipulation and updates
Tester must be aware of the database design concepts and implementation rules.
Database testing involves some in depth knowledge of the given application and requires more
defined plan of approach to test the data. Key issues include.
1) Data Integrity
2) Data Jalidity
3) Data Manipulation and updates
Tester must be aware of the database design concepts and implementation rules.
What steps does a tester take in testing
Stored Procedures?
Testing the Stored Procedures is the good one.we are passing the Input parameters and easily
get the result(output) fast compare to testing the tough business logic in front end.

In SQL server we r using
exec ]procedure Name} input1,input2..
exec procedure name inputparameter1,inputerparameter2
What SQL statements have you used in Database Testing?
DDL( Data Definition Language) and DML(Data Manipulation Language) .DDL for creating
tables and database.DML for the manipulations like insert,alter, and delete operations.The most
important statement for database testing is the SELECT statement, which returns data rows from
one or multiple tables that satisfies a given set of criteria.
You may need to use other DML (Data Manipulation Language) statements like INSERT,
UPDATE and DELTE to manage your test data.
You may also need to use DDL (Data Definition Language) statements like CREATE TABLE,
ALTER TABLE, and DROP TABLE to manage your test tables.
You may also need to some other commands to view table structures, column definitions,
indexes, constraints and store procedures.
What is Database testing?
Data bas testing basically include the following.br~1)Data validity testing.br~2)Data
Integritity testingbr~3)Performance related to data base.br~4)Testing of Procedure,triggers
and functions.br~for doing data validity testing you should be good in SQL queriesbr~or
data integrity testing you should know about referintial integrity and different
constraint.br~or performance related things you should have idea about the table structure
and design.br~for testing Procedure triggers and functions you should be able to understand
the same.br~
Database tests are supported via ODBC using the following functions.
SQLOpen, SQLClose, SQLError, SQLRetrieve, SQLRetrieveToile, SQLExecQuery,
SQLGetSchema and SQLRequest.
You can carry out cursor type operations by incrementing arrays of returned datasets.

All SQL queries are supplied as a string. You can execute stored procedures for instance on SQL
Server you could use ?Exec MyStoredProcedure? and as long as that stored procedure is
registered on the SQL Server database then it should execute however you cannot interact as
much as you may like by supplying say in/out variables, etc but for most instances it will cover
your database test requirements

What SQL statements have you used in Database Testing?
The most important statement for database testing is the SELECT statement, which returns data
rows from one or multiple tables that satisfies a given set of criteria.
You may need to use other DML (Data Manipulation Language) statements like INSERT,
UPDATE and DELTE to manage your test data.
You may also need to use DDL (Data Definition Language) statements like CREATE TABLE,
ALTER TABLE, and DROP TABLE to manage your test tables.
You may also need to some other commands to view table structures, column definitions,
indexes, constraints and store procedures.
How to test a SQL Query in Winrunner? without using DataBase CheckPoints?
By writing scripting procedure in the TCL we can connect to the database and we can test data
base and queries.
The exact proccess should be.
1)connect to the database
dbconnect("query1",DRIJER]drivername},SERJERservername,
UIDuidname,PWDpassword,DBQdatabasename "),
2)Execute the query
dbexcecutequery("query1","write query u want to execute"),
-Condition to be mentioned-
3)disconnect the connection
dbdisconnect("query"),
How to Test database in Manually? Explain with an example?
Observing that opertaions, which are operated on front-end is effected on back-end or
not.br~The approach is as follows .br~While adding a record thr front-end check back-end
that addition of record is effected or not. So same for delete, update,...... Ex.Enter employee
record in database thr front-end and check if the record is added or not to the back-
end(manually). br~
What is data driven test?
An1:
Data driven test is used to test the multinumbers of data in a data-table, using this we can easy to
replace the paramerers in the same time from deferent locations.
e.g. using .xsl sheets.

An2:
Re-execution of our test with different input values is called Re-testing. In validate our Profect
calculations, test engineer follows retesting manner through automation tool.Re-teting is also
called DataDriven Test.There are 4 types of datadriven tests.
1) Dynamic Input submissiion ( key driven test) . Sometines a test engineer conducts retesting
with different input values to validate the calculation through dynamic submission.or this input
submission, test engineer use this function in TSL scriipt-- createinputdialog ("label"),
2) Data Driven iles Through LAT ILES ( .txt,.doc) . Sometimes testengineer conducts re-
testing depends on flat file contents. He collect these files from Old Jersion databases or from
customer side.
3)Data Driven Tests rom RONTEND GREAJES . Some times a test engineer create
automation scripts depends on frontend obfects values such as (a) list (b) menu (c) table (d) data
window (5) ocx etc.,
4)Data Driven Tests rom EXCEL SHEET . sometimes a testengineer follows this type of data
driven test to execute their script for multiple inputs. These multiple inputs consists in excel sheet
columns. We have to collect this testdata from backend tables .16. What we normally check for in
the Database Testing?
In DB testing we need to check for,
1. The field si:e validation
2. Check constraints.
3. Indexes are done or not (for performance related issues)
4. Stored procedures
5. The field si:e defined in the application is matching with that in the db.
we normally check the database connectivity with our application in database testing.
How the stored procedure is tested? Please explain with example?
The tester has to know the expected results of the stored procedure before testing it. Then the
tester can pass various parameters and check for the result. If the result is as expected then the
sproc is good.
As a tester I tested the stored procedure as specified below.

1. irst U should vierfy whether the developer using appropiate function or procedure in that
query as per functional specification.
2. Jerify the input parameters passing in that function or prodedure.
3.verify the order of parameters passing as per functional specifiations.
4.validate the output of the stored procedure by firing the query.
8 How to Test database in Manually? Explain with an example?
Database can be tested various ways,

If we are usein SQL server then opne the SQL query analy:er and write the queries to retrieve
the data. Then verify whether the expected result is correct or not. I not the data is not inserted
into database.
We can play with queries to insert, update and delete the data from the data base and check in
the front end of the application.
I it is Oracle then open the SQL plus and follow the same procedure. Most of the time we find
invalid data.
Same way we can test the stored procedure in sql query analy:er and check the result.
We can play with queries to insert, update and delete the data from the data base and check in
the front end of the application.
What is data driven test?
Re-execution of our test with different input values is called Re-testing. In validate our Profect
calculations, test engineer follows retesting manner through automation tool.Re-teting is also
called DataDriven Test.There are 4 types of datadriven tests. br~1) Dynamic Input
submissiion ( key driven test) . Sometines a test engineer conducts retesting with different input
values to validate the calculation through dynamic submission.or this input submission, test
engineer use this function in TSL scriipt-- createinputdialog ("label"),br~2) Data Driven
iles Through LAT ILES ( .txt,.doc) . Sometimes testengineer conducts re-testing depends on
flat file contents. He collect these files from Old Jersion databases or from customer side.
br~3)Data Driven Tests rom RONTEND GREAJES . Some times a test engineer create
automation scripts depends on frontend obfects values such as (a) list (b) menu (c) table (d) data
window (5) ocx etc., br~4)Data Driven Tests rom EXCEL SHEET . sometimes a testengineer
follows this type of data driven test to execute their script for multiple inputs. These multiple
inputs consists in excel sheet columns. We have to collect this testdata from backend tables .
br~
Now suppose i have records of employee table
1) I want to find the person who is having 22nd highest salary.
2)i want to delete a person with postion number 39 with comminsion < 1
3) Update rec no 45?
select empid,empname, sal from employee a where &n (select count(distinct(salary)) from
employee b where a.sal b.sal)
&n22 ( U will be asked to enter the number and then enter for which record u want to retrieve)
a.sal b.sal (this can be used to retrieve max record)
a.sal ~b.sal( this can be used to retrieve min record)select min(sal) from (select distinct sal
from employee order by sal desc) where rownum23
21. How to use sql queries in WinRunner/Q1P?
In QTP
using output databse check point and database check point ,
select sQL manual queries option
and enter the "select" queris to retrive data in the database and compare
the expected and actual
Is a "A fast database retrieval rate" a testable requirement?
No. I do not think so. Since the requirement seems to be ambiguous. The SRS should clearly
mention the performance or transaction requirements i.e. It should say like A DB retrival rate of
5 micro sec
23. What are the different stages involved in Database 1esting?
verify the data in the database w.r.t frontend transactions
verify the constraint (primary key,forien key ....)
verify the performance of the procedures
verify the triggrs (execution of triggers)
verify the transactions (begin,commit,rollback)
What we normally check for in the Database Testing?
In DB testing we need to check for,br~1. The field si:e validationbr~2. Check
constraints.br~3. Indexes are done or not (for performance related issues)br~4. Stored
proceduresbr~5. The field si:e defined in the application is matching with that in the db. br~
Is a "A fast database retrieval rate" a testable requirement?
No. I do not think so. Since the requirement seems to be ambiguous. The SRS should clearly
mention the performance or transaction requirements i.e. It should say like A DB retrival rate of
5 micro sec.
6 How do you test whether a database in updated when information is entered in the
front end?
It depend on your application interface..

1. If your application provides view functionality for the entered data, then you can verify that
from front end only. Most of the time Black box test engineers verify the functionality in this way.
2. If your application has only data entry from front end and there is no view from front end,
then you have to go to Database and run relevent SQL query.
How to test data loading in Data base testing?
You have to do the following things while you are involving in Data Load testing.

1. You have know about source data (table(s), columns, datatypes and Contraints)
2. You have to know about Target data (table(s), columns, datatypes and Contraints)
3. You have to check the compatibility of Source and Target.
4. You have to Open corresponding DTS package in SQL Enterprise Manager and run the DTS
package (If you are using SQL Server).
5. Then you should compare the columns data of Source and Target.
. You have to check the number to rows of Source and Target.
7. Then you have to update the data in Source and see the change is reflecting in Target or not.
8. You have to check about funk character and NULLs.
8 How to test a DTS package created for data insert update and delete? What should be
considered in the above case while testing it?What conditions are to be checked if the data
is inserted, updated or deleted using a text files?
Data Integrity checks should be performed. I the database schema is 3rd normal form, then
that should be maintained. Check to see if any of the constraints have thrown an error. The most
important command will have to be the DELETE command. That is where things can go really
wrong.
Most of all, maintain a backup of the previous database.
What are the different stages involved in Database Testing?
verify field level data in the database with respect to frontend transactions
verify the constraint (primary key,forien key ....)
verify the performance of the procedures
verify the triggrs (execution of triggers)
verify the transactions (begin,commit,rollback
verify field level data in the database with respect to frontend transactions
verify the constraint (primary key,forien key ....)
verify the performance of the procedures
verify the triggrs (execution of triggers)
verify the transactions (begin,commit,rollback)?
The most important statement for database testing is the SELECT statement, which returns data
rows from one or multiple tables that satisfies a given set of criteria.
You may need to use other DML (Data Manipulation Language) statements like INSERT,
UPDATE and DELTE to manage your test data.
You may also need to use DDL (Data Definition Language) statements like CREATE TABLE,
ALTER TABLE, and DROP TABLE to manage your test tables.
You may also need to some other commands to view table structures, column definitions,
indexes, constraints and store procedures.
How to test a SQL Query in Winrunner?without using DataBase CheckPoints?
To Haris statement I would like to add some more information.
The exact proccess which i have done was-
1)connect to the database
dbconnect("query1",DRIJER]drivername},SERJERservername,UIDuidname,PWDpas
sword,DBQdatabasename "),
2)Execute the query
dbexcecutequery("query1","write query u want to execute"),
-Condition to be mentioned-
3)disconnect the connection
dbdisconnect("query"),
32. How to 1est Database Procedures and 1riggers?
Before testing Data Base Procedures and Triggers, Tester should know that what is the Input
and out put of the procedures/Triggers, Then execute?Procedures and?Triggers, iI you get
answer that?Test Case will be?pass?other wise Iail.
These requirements should get Irom DEVELOPER
How can we write testcases from Requirements?
Do the Requirements represent exact Functionality of AU1?
Yes, Requirements should represent exact functionality of AUT.

irst of all you have to analyse the requirement very throughly in terms of functionality. Then
you have to think about suitable testcase design techniques (Black Box design techniques like
Equivalance Partitioning, Boundry Jalue Analysis, Error Guessing and Cause Effect Graphing)
for writing the testcase.
By these concepts you should write a testcase which should have the capability of finding the
absence of defects.
irst we have no the requirements of the application and Test design document its for BJA
&ECP positive ,negative& Boundary values for the test cases
How to test data loading in Data base testing?You have to do the following things while
you are involving in Data Load testing
1. You have know about source data (table(s), columns, datatypes and Contraints)
2. You have to know about Target data (table(s), columns, datatypes and Contraints)
3. You have to check the compatibility of Source and Target.
4. You have to Open corresponding DTS package in SQL Enterprise Manager and run the DTS
package (If you are using SQL Server).
5. Then you should compare the columns data of Source and Target.
. You have to check the number to rows of Source and Target.
7. Then you have to update the data in Source and see the change is reflecting in Target or not.
8. You have to check about funk character and NULLs.
How do you test whether a database in updated when information is entered in the
front end?
It depend on your application interface..

1. If your application provides view functionality for the entered data, then you can verify that
from front end only. Most of the time Black box test engineers verify the functionality in this way.
2. If your application has only data entry from front end and there is no view from front end,
then you have to go to Database and run relevent SQL query.
3. You can also use database checkpoint function in WinRunner.
6 How the data base testing is been performed in industry?

What is retrival rate testing in database testing and how its calculated?.
The following things need to do in database testing
* Check the ield Name
* Check the ield length
* Index
* Keys(unique,primary and foreign as per your requirement)
* Check and make sure that all data are placed in back end as you insert
* make sure the required calculation is done
* check the SP and Trigger
*calculate the query execution time
What is database testing and what we test in database testing?
Database testing involves some in depth knowledge of the given application and requires more
defined plan of approach to test the data.
Key issues include.
1) Data Integrity
2) Data Jalidity
3) Data Manipulation and updates
Tester must be aware of the database design concepts and implementation rules.
8 How to test a SQL Query in Winrunner? without using DataBase CheckPoints?
By writing scripting procedure in the TCL we can connect to the database and we can test data
base and queries.
The exact proccess should be.
1)connect to the database
dbconnect("query1",DRIJER]drivername},SERJERservername,
UIDuidname,PWDpassword,DBQdatabasename "),
2)Execute the query
dbexcecutequery("query1","write query u want to execute"),
-Condition to be mentioned-
3)disconnect the connection
dbdisconnect("query"),
How do you test whether the database is updated as and when an information are
added in the front end?Give me an example?
t depends on what level oI testing you are doing.When you want to save something Irom Iront
end obviously, it has to store somewhere in the database
You will need to Iind out the relevant tables involved in saving the records.Data Mapping Irom
Iront end to the tables.Then enter the data Irom Iront end and save. Go to database, Iire queries to
get the same date Irom the back end.
a Enter the records Irom Irontend screen.
bGo to the location where your database is located Ior your application|check in web.conIig Iile
Ior DB location|.
c Go to the particular table and view the records.
d To check the data updation, modiIy the data in Iront end screen.
ReIresh the table in the data base and check.
8 Is a A fast database retrieval rate a testable requirement?
No. do not think so. Since the requirement seems to be ambiguous. The SRS should clearly
mention the perIormance or transaction requirements i.e. t should say like 'A DB retrival rate oI
5 micro sec'.
What we normally check for in the Database Testing?
n DB testing we need to check Ior,br~1. The Iield size validationbr~2. Check
constraints.br~3. ndexes are done or not (Ior perIormance related issues)br~4. Stored
proceduresbr~5. The Iield size deIined in the application is matching with that in the db. br~
What is Database testing?
Data bas testing basically include the Iollowing.
Data validity testing.
Data ntegritity testing
PerIormance related to data base.
Testing oI Procedure,triggers and Iunctions.
Ior doing data validity testing you should be good in SQL queries
For data integrity testing you should know about reIerintial integrity and diIIerent constraint.
For perIormance related things you should have idea about the table structure and design.
Ior testing Procedure triggers and Iunctions you should be able to understand the same.
What we normally check for the Database Testing?
An
n DB testing we need to check Ior,
The Iield size validation
Check constraints.
ndexes are done or not (Ior perIormance related issues)
Stored procedures
The Iield size deIined in the application is matching with that in the db.

An
Database testing involves some indepth knowledge oI the given application and requires more
deIined plan oI approach to test the data. Key issues include :
data ntegrity
data validity
data manipulation and updates.

Tester must be aware oI the database design concepts and implementation rules
Explain Database testing?
An
here database testing means test engineer should test the data integrity, data accessing,query
retriving,modiIications,updation and deletion etc

An
Database tests are supported via ODBC using the Iollowing Iunctions:
SQLOpen, SQLClose, SQLError, SQLRetrieve, SQLRetrieveToFile, SQLExecQuery,
SQLGetSchema and SQLRequest.
You can carry out cursor type operations by incrementing arrays oI returned datasets.

All SQL queries are supplied as a string. You can execute stored procedures Ior instance on SQL
Server you could use ?Exec MyStoredProcedure? and as long as that stored procedure is
registered on the SQL Server database then it should execute however you cannot interact as
much as you may like by supplying say in/out variables, etc but Ior most instances it will cover
your database test requirements

An
Data bas testing basically include the Iollowing.
Data validity testing.
Data ntegritity testing
PerIormance related to data base.
Testing oI Procedure,triggers and Iunctions.

Ior doing data validity testing you should be good in SQL queries
For data integrity testing you should know about reIerintial integrity and diIIerent constraint.
For perIormance related things you should have idea about the table structure and design.
Ior testing Procedure triggers and Iunctions you should be able to understand the same.


An
Data base testing generally deals with the Iollwoing:
aChecking the integrity oI U data with Database Data
bChecking whether any junk data is displaying in U other than that stored in Database
cChecking execution oI stored procedures with the input values taken Irom the database tables
dChecking the Data Migration .
eExecution oI jobs iI any
How to test a DTS package created for data insert update and delete? What should be
considered in the above case while testing it?W hat conditions are to be checked if the data
is inserted, updated or deleted using a text files?
Data ntegrity checks should be perIormed. F the database schema is 3rd normal Iorm, then that
should be maintained. Check to see iI any oI the constraints have thrown an error. The most
important command will have to be the DELETE command. That is where things can go really
wrong.
Most oI all, maintain a backup oI the previous database.

Das könnte Ihnen auch gefallen