SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2000
    Location
    Phoenix, AZ
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to check duplicate data

    I am testing an application where on the browser I put all the registration info and an error message text will be displayed in the same window if the entry (e_mail address) already exists in the DB. How will I check this text using SilkTest.
    I will appreciate your help.

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to check duplicate data

    This should be fairly easy to check; assuming that you have an odbc driver that can access your database, simply send a sql query to the relevant table and check the contents, and then you can write your script to choose an email name to enter based on what already exists. The DB_ functions are all freely available from silktest 5.0 onwards.

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Location
    Phoenix, AZ
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to check duplicate data

    Thanks VinceBowdren,
    It worked for me.. I appreciate your help. Also what I was trying to check is that when you enter the pre-existing login info it will display and error message text something like "Sorry the user specified is already registered" above the email field. I want to capture this to validate the end result.
    any help?

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to check duplicate data

    That should be easy; there are various ways of doing this, and this is the most elegant and useful I find:
    Assuming you have a window declaration for the dialog which appears when you enter an already-existing username and the standard bit of code that does the registration is in a separate function from your testcases, then do something like this:
    Then, in the testcase which is calling this registration code, you simply have a do...except routine which watches out for this error being raised (using function ExceptNum); thus you can easily code one testcase to deliberately try an existing username, and fail if it doesn't receive this exception back; and others that try unused usernames, which fail gracefully if they are rejected.


    [This message has been edited by vincebowdren (edited 08-21-2000).]

    [This message has been edited by vincebowdren (edited 08-21-2000).]

    [This message has been edited by vincebowdren (edited 08-21-2000).]

  5. #5
    Junior Member
    Join Date
    Aug 2000
    Location
    Phoenix, AZ
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to check duplicate data

    Hi Vincebowdren
    I am not getting any dialog window.. it just inserts two lines of test above the email address field saying that "login info already exists" Basically if I enter the unique login info then it goes to next page otherwise it stays in the same page with this new error message text. So now I want to check if that "error message text" is there or not.. I appreciate you help.
    Regards,
    Joginder

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:08 AM.

Copyright BetaSoft Inc.