Archive for July, 2008

Latest QTP FAQS

1.What is File System Object?

File System is used to create file through scripting.

We can read, write and save data in txt file and use it after wards
during testing.

Here is example of creating txt file through FSO

Const ForReading = 1, ForWriting = 2
Dim fso, MyFile
Set fso = CreateObject( “Scripting. FileSystemObject “)
Set MyFile = fso.OpenTextFile( “c:testfile. txt”, ForWriting, True)
MyFile.WriteLine “Hello world!”
MyFile.WriteLine “The quick brown fox”
MyFile.Close
Set MyFile = fso.OpenTextFile( “c:testfile. txt”, ForReading)
ReadLineTextFile = MyFile.ReadLine ‘ Returns “Hello world!”

It will create testfile.txt and enter “This is a test” in that text
file.

You can later read that line “This is a test” from this file while
using

MyFile.ReadLine

We can save variables data during testing and then use that data in
future instances of testing and then delete that file.

2.Can we perform performance testing by qtp?

we can do the performance testing in QTP, which can be done only for
one user. We can do the performance testing using QTP by inserting
the start and end transactions for getting the response time of each
transaction with single user.

3.How can I execute PL/SQL stored procedure (with parameters)
thorough VBScript?
Here is the code:
conStr=”driver= sql
server;server= servername; database= test;uid= sa;pwd=sa”
Set cmdObj=createobject (“adodb.command” )
Set recObj=createobject (“adodb.recordse t”)
With cmdObj
.activeconnection= conStr
.commandtype= 4
.commandtext= “SP_Insert_ EMP” – SridharName
.parameters. refresh
.parameters( 1).value= 22 – Parameter values that i am passing to SP
.parameters( 2).value= “PULSE TECHNOLOGIES” -
.parameters( 3).value= “QA” -
.parameters( 4).value= 7777 -
.parameters( 5).value= NULL -
.execute
End with

4 comments July 15, 2008


Blog Stats

Categories

Recent Posts

 

July 2008
M T W T F S S
« Mar   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Archives

Blogroll

Meta