Results 1 to 15 of 15

Thread: Database checkpoint

  1. #1
    Moderator
    Join Date
    Sep 2006
    Answers
    920

    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.

    Regards,
    Brijesh Jain
    ---------------------------------------------------------
    Connect with me on Skype: jainbrijesh
    Google Plus : jainbrijeshji

  2. #2

    Re: Database checkpoint

    why dont u use a RO property..
    I guess this property is more dynamic and reliable...


  3. #3
    Junior Member
    Join Date
    Nov 2007
    Answers
    23

    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 Attached Images

  4. #4
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    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.

  5. #5
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Re: Database checkpoint

    can you tell me how to test database in QTP (hyrachially) im new to testng .
    thank you


  6. #6
    Junior Member
    Join Date
    Aug 2008
    Answers
    1

    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


  7. #7
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    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.


  8. #8
    Junior Member
    Join Date
    Aug 2008
    Answers
    1

    Re: Database checkpoint

    can you tell me how to test database in QTP im new to testng .
    venki


  9. #9
    Junior Member
    Join Date
    Oct 2007
    Answers
    14

    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?


  10. #10

    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


  11. #11

    Re: Database checkpoint

    Please let me know if this is ok?


  12. #12
    Junior Member
    Join Date
    Dec 2008
    Answers
    1

    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


  13. #13

    Re: Database checkpoint

    Please find the step by Step process here attched with this

    Attached Files Attached Files
    Last edited by animesh.chatterjee; 01-23-2009 at 12:05 PM.

  14. #14
    Junior Member
    Join Date
    Aug 2009
    Answers
    2

    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


  15. #15
    Junior Member
    Join Date
    Jun 2009
    Answers
    1

    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 06:49 AM. Reason: Formatting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact