SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Launch a testcase that is stored in a variable?!

    Hi every1!

    I am somewhat new to Silktest (using it for 2 months now) and i have a question that is blocking me in my automation progress.

    I have a frame.inc and about 10 other .inc files which are included in the frame.inc (the other .inc files have various declarations). I have a MAIN.t file which has a main() fucntion that loops and searches for a file that has the name of the next testcase to execute. I have 10 different .t files that contain many many testcases. I found a way of executing the wanted testcase in the mainloop by using a select/case logic. The problem is that as time goes on i will have more and more testcases and the select/case will grow to thousands of lines of code.

    I would like to eliminate the select/case.

    For now, the testcase to execute is stored in a variable sTestcase (string) and contains lets say addLocalUser().

    I would like to find a way to launch testcase addLocalUser() which is defined in one of the .t files included in the mainloop.t file.

    Any help is appreciated.

    __

    dark1984
    _______

    Richard

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Launch a testcase that is stored in a variable?!

    Well i seem to have found the answer to my question...

    @(sTestcase)()

    __

    dark1984
    _______

    Richard

 

 

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 12.50%
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:52 AM.

Copyright BetaSoft Inc.