Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Database checkpoint

This is a discussion on Database checkpoint within the QTP forums, part of the Software Testing category; Hi friends, I have a scenario, When user is registered his name and e-mail id is saved in database "tempuser" table, now i have to insert a database checkpoint for ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 12-29-2007
Moderator
 
Join Date: Sep 2006
Location: Delhi (India)
Posts: 910
Thanks: 12
Thanked 108 Times in 76 Posts
jainbrijesh will become famous soon enoughjainbrijesh will become famous soon enough
Database checkpoint

Hi friends,

I have a scenario, When user is registered his name and e-mail id is saved in database "tempuser" table, now i have to insert a database checkpoint for checking this new data.But problem is if i add a database checkpoint when editing my script, it shows only static data (which is already in table) and i don't need it all, then what will be it's dynamic query and steps using which i can verify my new data which first inserted into table and then checked in the same script.
__________________
--
Brijesh Jain
Reply With Quote
The Following 4 Users Say Thank You to jainbrijesh For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 01-17-2008
Expert Member
 
Join Date: Jul 2007
Location: Kolkata
Posts: 182
Thanks: 7
Thanked 17 Times in 16 Posts
animesh.chatterjee is on a distinguished road
Re: Database checkpoint

why dont u use a RO property..
I guess this property is more dynamic and reliable...
Reply With Quote
The Following User Says Thank You to animesh.chatterjee For This Useful Post:
  #3 (permalink)  
Old 01-24-2008
Junior Member
 
Join Date: Nov 2007
Location: Pune , Maharashtra , India
Posts: 27
Thanks: 2
Thanked 2 Times in 2 Posts
manabh is on a distinguished road
Thumbs up Re: Database checkpoint

Hi
Use Environment variables or datatable to retreive values for your query.Screen shots for this are attached. Then your job is simple , you just have to change values for your environmental variables/Datatable cells to change the DB checkpoint properties.
Attached Images
File Type: jpg SourceProp.JPG (17.5 KB, 153 views)
File Type: jpg ConnStrProp.JPG (18.5 KB, 122 views)
Reply With Quote
  #4 (permalink)  
Old 01-24-2008
Junior Member
 
Join Date: Jan 2008
Location: Noida, India
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
deba2002 is on a distinguished road
Smile Re: Database checkpoint

Dynamically, I think, a query is to be written. I have experience with Rational Robot and with that experience , I can say:

1) With textcheck point, we can capture login name and emailid.(combination of login name and email id is supposed to be unique.i.e two users with same login name and email id can not register twice)

2) Make the query like: select "loginname" from "temptable" where "loginname"="text captured through textcheckpoint" and "password"="password captured through textcheckpoint".

3) If query returns "loginname"="text captured through textcheckpoint", then inserted text to form have been inserted to required table "temptable'

else
inserted text not found in required table "temptable"


I think, this logic should work.

Thanks,
Debasish Pradhan,
Noida

Last edited by deba2002; 01-24-2008 at 04:55 AM.
Reply With Quote
  #5 (permalink)  
Old 05-29-2008
Junior Member
 
Join Date: May 2008
Location: hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sheerazsultana is on a distinguished road
Re: Database checkpoint

can you tell me how to test database in QTP (hyrachially) im new to testng .
thank you
Reply With Quote
  #6 (permalink)  
Old 08-12-2008
Junior Member
 
Join Date: Aug 2008
Location: chennai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sabari7285 is on a distinguished road
Re: Database checkpoint

Ya i am also new to testing and the database testing some one expalin the framework of the database tesingand the the DB cehckpoint in the QTP
Reply With Quote
  #7 (permalink)  
Old 08-14-2008
Junior Member
 
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
vikas.kr18 is on a distinguished road
Re: Database checkpoint

I know how to use database checkpoint in qtp. Press the Insert button and click on checkpoint now select database checkpoint. It will open a new window in the new window select the radio button for sql query and right the sql query to open a database table like:
select * from table1
before writing this query select your database.
U may also do some change in the database. When u run your test it will show the expected and actual result.
Reply With Quote
  #8 (permalink)  
Old 08-23-2008
Junior Member
 
Join Date: Aug 2008
Location: india
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
venkibab is on a distinguished road
Re: Database checkpoint

can you tell me how to test database in QTP im new to testng .
venki
Reply With Quote
  #9 (permalink)  
Old 12-12-2008
Junior Member
 
Join Date: Oct 2007
Location: Hungary, Budapest
Posts: 16
Thanks: 1
Thanked 1 Time in 1 Post
PalEE is on a distinguished road
Re: Database checkpoint

Yes, this should work like this

my main question (I an other post), that How can I implement this solution is QTP????
Because it is very nice to use a parameter in the SQL, and to get the whole data returned by the query, but I don't know, how can I do these 2 things.
With script methods I know, that the SQL can be parametrized, but How can I use a parameter with the help of the built in keyword solution of the DbTable output check?
Reply With Quote
  #10 (permalink)  
Old 12-12-2008
Expert Member
 
Join Date: Jul 2007
Location: Kolkata
Posts: 182
Thanks: 7
Thanked 17 Times in 16 Posts
animesh.chatterjee is on a distinguished road
Re: Database checkpoint

I dont know if i got the question correctly...
but what i understood is that QTP dynamically capture some data from application...now we need to chk if the data exist in the table or not...

without using a check point we can also do that..

val=Browser("Abc").Page("gfg").webedit("gg").getROProperty("value") 'we can use Text
datatable.AddSheet("data")
x=datatable.GetRowCount
for i =1 to x
datatable.setcurrentrow(i)

if val=datatable("email","global") then
msgbox "Validated"
flag="true"
end if
next
Reply With Quote
  #11 (permalink)  
Old 12-12-2008
Expert Member
 
Join Date: Jul 2007
Location: Kolkata
Posts: 182
Thanks: 7
Thanked 17 Times in 16 Posts
animesh.chatterjee is on a distinguished road
Re: Database checkpoint

Please let me know if this is ok?
Reply With Quote
  #12 (permalink)  
Old 12-31-2008
Junior Member
 
Join Date: Dec 2008
Location: Pune
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
priyankvyas is on a distinguished road
Re: Database checkpoint

Hi this is Priyank,

To check dynamically updating values into database follow the process.

1) First create DB checkpoints
2) Now select and one value into DB checkpoint window and go to option "Cell Identification", Now select option "By row number" an select "key coloum " as "user_name"
3) Check option "use value match criteria..."
4) Now select tab " expected data" and parameterize value of " user_name" and "password"
5) Check the only one value in" user_name" column
6) now use same data table value to replace 'user_name' in script
7) Run test with setting "show log always", this time u get updated value in result window
Reply With Quote
  #13 (permalink)  
Old 01-23-2009
Expert Member
 
Join Date: Jul 2007
Location: Kolkata
Posts: 182
Thanks: 7
Thanked 17 Times in 16 Posts
animesh.chatterjee is on a distinguished road
Re: Database checkpoint

Please find the step by Step process here attched with this
Attached Files
File Type: txt Database.txt (3.6 KB, 81 views)

Last edited by animesh.chatterjee; 01-23-2009 at 12:05 PM.
Reply With Quote
The Following User Says Thank You to animesh.chatterjee For This Useful Post:
  #14 (permalink)  
Old 08-05-2009
Junior Member
 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
remya_mu is on a distinguished road
Question Re: Database checkpoint

Hi All

Iam new to QTP. I am testing a web application which shows orders created inside a grid.I want to know how to compare values from db with the application. I have tried db checkpoint. This will fail if a new row is added or deleted from the applcation. How to take the runtime property and compare? Please help me out
Reply With Quote
  #15 (permalink)  
Old 08-31-2009
Junior Member
 
Join Date: Jun 2009
Location: Bangalore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
qtpdeepak is on a distinguished road
Re: Database checkpoint

Quote:
Originally Posted by remya_mu View Post
hi all iam new to qtp. I am testing a web application which shows orders created inside a grid.i want to know how to compare values from db with the application. I have tried db checkpoint. This will fail if a new row is added or deleted from the applcation. How to take the runtime property and compare? please help me out
remya,
You can use adodb connection strings to check the values from db to the front end. Below is the query which may help.
Please let me know if you have any questions.

Sconstr = "provider=sqloledb;data source=ip address ;initial catalog=give the database name;user id = give the user id ;password=password;"
set db_connection = createobject("adodb.connection")
db_connection.open sconstr
'msgbox db_connection.state

set db_rs = createobject("adodb.recordset")
squery ="select top 1 * from table_name"
db_rs.open squery,db_connection,1
reccount = db_rs.recordcount

for each col in db_rs.fields
cname= col.name
datatable.addsheet ("db").addparameter cname,""
next
fcount= db_rs.fields.count
for each a in db_rs.fields
colname = a.name
db_rs.movefirst
for j=1 to fcount
datatable.setcurrentrow(j)
rowval = db_rs.fields.item(colname).value
datatable.value(colname,"db")=rowval
db_rs.movenext
if db_rs.eof =true
then
exit for
end if
next
next

datatable.exportsheet "c:\db.xls",3

Best regards,

Deepak.Bhandarkar

Last edited by qtpdeepak; 08-31-2009 at 07:49 AM. Reason: Formatting
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Database Checkpoint dynamic query spore QTP 5 08-06-2009 01:57 AM
Checkpoint failed Lokesh M QTP 4 06-13-2008 01:48 PM
XML Checkpoint and Accessibility Checkpoint Lokesh M QTP 1 02-28-2008 06:34 AM
Standard Checkpoint pravinspatil QTP 2 11-21-2007 03:49 AM
Webpage / Frame Checkpoint Lokesh M QTP 4 12-11-2006 02:00 PM


All times are GMT -4. The time now is 05:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved