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
    Feb 2007
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to run testcase many times from main function

    Hi,
    I have created one testcase in which i do the following Operations.

    testcase tc1(int exType){
    if(exType==1)
    Login

    Save one record

    if(extype==10)
    Logout
    }

    and in main() I have done like following

    main(){
    iterate i=1 to 10
    tc1(i)
    }



    I have used the defaultappstate for the testcase.
    but the problem is,silktest loads the defaultappstate in each iteration.

    How can I overcome this?

    Regards
    Ranjith.

  2. #2
    Senior Member
    Join Date
    Nov 2006
    Posts
    312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run testcase many times from main function

    if you really must do this as a ten separate testcases...

    a) divide the logic into more testcases, the first one will be based on default appstate and do the login. the second one will be based on none and do the stuff

    b)<font class="small">Code:</font><hr /><pre>testcase tc1(int exType) appstate none
    if(exType==1)
    setAppState("DefaultBaseState")
    Login

    Save one record

    if(extype==10)
    Logout
    </pre><hr />

    c)use const lwLeaveOpen = {...} to tell the recovery system he should not close the windows that were opened during the login

    a) is best, c) is worst in terms of something-can-go-wrong

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run testcase many times from main function

    Hi,
    I hav tried that..it works.. thanks Mirek..
    but only one issue.
    I am calling this from silkperfomer project to run a loadtest.
    The problem is , I have given the stinit in my init transaction and called one testcase. then in the main trasnsaction i am calling another transaction in an iterative manner.
    But at the beggining of each iteration the silktest window has to get active then only the iteration execution starts.
    is there any solution for this??

    Regards

    Ranjith

  4. #4
    Senior Member
    Join Date
    Nov 2006
    Posts
    312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run testcase many times from main function

    Ranjith,
    you should read the forum rules where you will found out that is it forbidden to both doublepost and continue in the same thread with unrelated topic.
    (and of course triple posts and only slightly related topics still counts as offenses... [img]/images/graemlins/wink.gif[/img] )

  5. #5
    Junior Member
    Join Date
    Feb 2007
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run testcase many times from main function

    oh..i am sorry..
    [img]/images/graemlins/frown.gif[/img]

 

 

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 04:11 PM.

Copyright BetaSoft Inc.