Вы находитесь на странице: 1из 16

Requirements for DB Testing

Tools Required : Load Runner, WinSQL, SQL Server Management Studio


Protocol Used : ODBC
Connection String for each and every Database - This connection string will
help in connecting to the database to fetch the stored procedures and the
tables
Stored Procedures which needs to be tested
Test data and the execution statements

1)First we need to use SQL SERVER MANAGEMENT STUDIO to get the execution
statement
Steps to be followed in SQL SERVER MANAGEMENT STUDIO
Click on connect and select Database engine

New pop up wil appear ,Provide all the required data as shown below

Server name: DB server name


Authentication: we can select either windows NT/SQL server authentication
Provide respective username and password
Click on connect.

Below screen will appear

Expand database details

As shown in the above diagram,there may be multiple DB on same server.Select the


required one and expand.In our case it is TransientCartEdell.

So DB will have many details as shown in the above diagram.


Now we need to execute the SPC.So select Programmability and expand

Select StoredProcedure and expand

We can see list of SPC .


Now right click on reqired spc which we need to test->say execute
Now new pop up will appear asking input data to execute the SPC

These values we can get it from dev


Enter the values and say ok.

Now we will get a execution statement

Execution statements
USE [TransientCartEDell]
GO
DECLARE

@return_value int,
@lastUpdatedIntervalInHours int

SELECT@lastUpdatedIntervalInHours = 7
EXEC

@return_value = [ecomm].[get_cart_v1]
@id = 1,
@session_id = 2,
@field_mask = 3,
@version = N'4',
@transientCartExpiryIntervalInMin = 5,
@persistentCartExpiryIntervalInDays = 6,
@lastUpdatedIntervalInHours = @lastUpdatedIntervalInHours OUTPUT,
@customerAccountId = N'8'

SELECT@lastUpdatedIntervalInHours as N'@lastUpdatedIntervalInHours'
SELECT'Return Value' = @return_value
GO
In the above statement, the one which are highlighted are input data that I have entered .
Later in the script we can parameterize these values.
As of now save this execution statement.

2)Adding our DB to winsql

Click on ODBC mgr

Click on Add.

Select SQLServer and click on finish

Give some name and db server name and click on Next.

Provide appropriate login details and say next.

Click on next.

Click on finish

Say ok

Now our DB is added


Now close winsql .
3.Scripting in VUGEN

App type :-win 32


Specify the winsql path.

Follow the below steps once winsql is launched through VUGen

Select the db which we have created and provide the login details and say ok.

Place that execution statement and execute.

Вам также может понравиться