Showing posts with label Database Testing. Show all posts
Showing posts with label Database Testing. Show all posts

What SQL statements have you used in Database Testing?

Posted by VIKAS

DDL (Data Definition Language) - creating tables and database

DML (Data Manipulation Language) - manipulations like insert, alter, and delete operations.


DDL is Data Definition Language statements:
CREATE
ALTER
DROP
TRUNCATE
COMMENT
RENAME

DML is Data Manipulation Language statements:
· SELECT
· INSERT
· UPDATE
· DELETE
· MERGE
UPSERT
· CALL
· EXPLAIN PLAN
· LOCK TABLE

DCL is Data Control Language statements:
· GRANT
· REVOKE
· COMMIT
· SAVEPOINT
· ROLLBACK
- COMMIT
· SET TRANSACTION

What we normally check for in the Database Testing

Posted by VIKAS

In DB testing we need to check for,

1. The field size validation
2. Check constraints.
3. Indexes are done or not (for performance related issues)
4. Stored procedures.
5. The field size defined in the application is matching with that in the db.


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 validity
3) Data manipulation and updates.

Tester must be aware of the database design concepts and implementation rules

Check for Database Testing

1.To validate the Front end data which is displaying is same as the Back end Data.
2.To validate the extraction processes (nightly or scheduled), whether the correct data is coming in to our project Tables.

Difference between functions and procedure

Posted by VIKAS

1. Print statement is not valid within the function because functions are meant for process or execute group of statement and return a value, where as procedure are meant for executing group of statement and display output.

2. Return keyword is use to return a value from a stored function with specified data type of the value expecting to be returned from stored function.

3. One of the major advantage of stored function is that can be used in the query directly where as an stored procedure can never be used in a query as it is not returning any value.

What is way of writing test cases for database test?

Posted by VIKAS

You have to do the following for writing the database test cases.

1. First of all you have to understand the functional requirement of the application thoroughly.

2. Then you have to find out the back end tables used, joined used between the tables, cursors used (if any), triggers used(if any), stored procedures used (if any), input parameter used and output parameters used for developing that requirement.

3. After knowing all these things you have to write the test case with different input values for checking all the paths of SP.

One thing writing test cases for back end testing not like functional testing. You have to use white box testing techniques.



To write test case for database it’s just like functional testing.

1.Objective: Write the objective that you would like to test. eg: To check the shipment that i load thru xml is getting inserted for particular 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 viewed in database. eg: The shipment should be loaded successfully for that customer, also it should be seen in application.

4.You can write such type of test cases for any functionality like update, delete etc.

Example: Let's say there are two web sites, type 'ABC' records should be displayed only in ABC website and type 'XYZ' records should be displayed only in XYZ website. You can insert a new type 'ABC' record and see if it is displayed only on ABC website and not on XYZ website. Both the websites are controlled by the same company, it just wants type I customers to have access to type I website and Type II customers have access to type II website. This is a completely imaginary example, there can be any type of application or service functionality that can be broken down in to test cases in turn.





Steps in testing guideline document for database testing

Posted by VIKAS

The documentation guidelines for database testing should be more and more detailed:
- The tester should know how to log on to the database (The Credentials)
- The tester should know which tables to look at.
- Check the names of the tables
- Specify which columns should be concentrated on in the table.
- Check the spellings of columns
- Give a sample data example for the table to be tested.
- Specify the possible values for a column
- Specify the conditions of pass/fail for the data in the column

How to Test Database in Manually

Posted by VIKAS

Database Testing is a process working with data that's stored in the database. If we change anything in the front-end and back end then what will the effect on the database.

Example: An table which has stored the records of students name, roll no., class and sections etc. if we delete the students name in front end then what's effect in database whether we test the student name deleted or not from database.


While doing Functional Test:
From the front end do the Transaction like, creating new order, update order, delete order, then login into the data base and check the related table to see if the order has been inserted, updated or deleted.

What is Database Testing

Posted by VIKAS

Database testing means test engineer should test the data integrity, data accessing, query retrieving, modifications, updation and deletion etc.

Database testing involves mainly
1. When a record is inserted in the front end checking whether the record is inserted in the corresponding tables correctly in the back-end.
2. Whether the field size validations are done according to the requirements in front-end as well as back end.
3. Testing the performance of the stored procedures.This is done by calculating the time taken to execute the stored procedure.
4. Primary key,foreign key validations are done correctly.



Data bas testing basically include the following.
1)Data validity testing.
2)Data Integritity testing
3)Performance related to data base.
4)Testing of Procedure,triggers and functions.

for doing data validity testing you should be good in SQL queries
For data integrity testing you should know about referential integrity and different constraint.
For performance related things you should have idea about the table structure and design.
for testing Procedure triggers and functions you should be able to understand the same.


Basically in Database testing to check:
1.Data integritity and validaty testing.
2.Any strored procedure written.
3.Execution of Triggers and constraints.

Database testing generally deals with the following:

a) Checking the integrity of UI data with Database Data
b) Checking whether any junk data is displaying in UI other than that stored in Database
c) Checking execution of stored procedures with the input values taken from the database tables
d) Checking the Data Migration.