SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic Invocation

    A Winrunner script can read a file, extract a String (a script name), and use it to dynamically invoke ANOTHER Winrunner script.
    Is there a way in SilkTest to do something similar?

    ------------------

  2. #2
    Senior Member
    Join Date
    Dec 1999
    Location
    Sarasota FL USA
    Posts
    109
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    Yes. I use this all the time. You need to use the reference operator. Itlooks like this:
    @(VARNAME)(args)

    This is used to call another function not a test case.

    ------------------

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    Hmmm...not sure this is what I am looking for. I need to be able to run SilkTest script 'B' from SilkText script 'A' where 'A' has no knowledge about 'B' except that it reads its name from a text file.

    ------------------

  4. #4
    Senior Member
    Join Date
    Jun 1999
    Location
    Fremont, CA, USA
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    What tlvranas said would then work. You still need to read the VARNAME and the args from a file (or database), or get them somehow.

    Also, in SilkTest, a testcase can not call another testcase. You can have a function drive the testcases, or a testcase drive functions.

    ------------------
    David Genrich
    david@e2Open.com
    david_kim@usa.net

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    U can use test plan where u sould be able to execute any testcase from testscript in nay order u want. let me know if u need more info sbudhava@yahoo.com

    ------------------
    Sree
    Sree

  6. #6
    Junior Member
    Join Date
    Jan 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    Hmmm...
    But would the Test Plan have to be hard coded with the names of the Test Cases / Scripts that are to be run, or can they be supplied by reading a text file of Test Cases / Scripts names?

    ------------------

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by grezdo:
    Hmmm...
    But would the Test Plan have to be hard coded with the names of the Test Cases / Scripts that are to be run, or can they be supplied by reading a text file of Test Cases / Scripts names?
    <HR></BLOCKQUOTE>
    Using this method, where testcase names are read from a file and run using the reference operator, you probably should not use a testplan file at all.

    You should use a loop in a small main() program in a ".t" file that includes all of your testcase files with "use" statements.
    Example:



    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  8. #8
    Junior Member
    Join Date
    Jan 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    Thanks for your responses.

    Rob, thanks for the code sample. However, the using "use" statements would require me to update the "main()" program everytime I have a new sub-testcase. I do not want to keep updating the "main()" program. So: I like the reading from file and the dynamic execution using the '@' now if only I could get rid of the "use" statements...

    ------------------

  9. #9
    Junior Member
    Join Date
    Sep 1999
    Location
    ARIZONA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Invocation

    I don't understand why the use statements are such a problem. If you follow RobKapteyn's suggestion, you will simply add new testcases to your known files. That way, whenever a new testcase was created you'd be done. The correct use statement for that file would be in there. Sure, you might have to add another use statement when you start a new file of testcases, but that should be a rare enough occurance as not to cause a headache.

    ------------------

  10. #10
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Dynamic Invocation

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by grezdo:
    However, the using "use" statements would require me to update the "main()" program everytime I have a new sub-testcase. I do not want to keep updating the "main()" program. So: I like the reading from file and the dynamic execution using the '@' now if only I could get rid of the "use" statements...

    <HR></BLOCKQUOTE>

    So if you don't like using the "use" statements, where are you planning to save your test scripts? (not in .doc or .pdf files, I hope)



    ------------------

 

 
Page 1 of 2 12 LastLast

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 07:40 PM.

Copyright BetaSoft Inc.