SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Nov 2002
    Location
    ATL, GA, USA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re - Run of a script with data that can only be created once.

    How do I bypass re-running a script with an existing data.

    E.g B5555 already exist in the database in the first script.
    If I run the script the second time, how do I have winrunner to bypass remembering this step.

  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Re - Run of a script with data that can only be created once.

    Parameterize.
    Use variable data.
    Create data-driven tests.
    This is all described in the WinRunner documentation set plus the Help system.

  3. #3
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Re - Run of a script with data that can only be created once.

    Most of my tests create new data items which need to be uniquely named. I do this by using the current system time. For instance, I might create a text file named "WR-TEST-20030705-110531.txt". (I use a custom function that allows me to parse the value returned by get_time() into a formatted string, in this case in the format "YYYYMMDD-HHMMSS". I could more easily have just used the integer value returned by get_time(), I just like having the value be human readable.)
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)

  4. #4
    Junior Member
    Join Date
    Nov 2002
    Location
    ATL, GA, USA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Re - Run of a script with data that can only be created once.

    Charles -

    These are the 3rd and 4th rows of my script:

    win_type ("QLIMS - QAV","AP7894<kReturn_E>");
    win_type ("QLIMS - QAV","B14567<kReturn_E>");

    I want winrunner to remember these numbers for the fields and not to insert another data.
    I'm still confused.

    Please help!.

    [ 08-05-2003, 09:44 AM: Message edited by: Seyi ]

  5. #5
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Re - Run of a script with data that can only be created once.

    I guess I still do not understand what the exact question is. Perhaps a more complete description of the situation along with a good example would help? I think you are asking how to have your script create the data if it is not on the test system yet, otherwise skip that part of the procedure? If so, then you need to add code to look for the data item in question. If it does not find it, then add it. This will be application dependent, possibly via a database query (db_* functions), or using your application's GUI to run a report or perform a search or whatever. In brief:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"># execute necessary function to determine if data
    # already exists, returning TRUE if it does, FALSE
    # if not.
    if(searchResult == FALSE)
    {
    # execute functions to create/enter the data
    }
    # continue with script</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.&lt;/i] (The Song of Roland)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 11:47 AM.

Copyright BetaSoft Inc.