SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Sep 2001
    Location
    Fremont, CA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to exit the TestPlan from a TestCase?

    I would like Silk to stop execute rest of the testcases if the first testcase of the testplan failed. "exit" at the end of the first testcase only exited the testcase without callling TestCaseExit and continued with the next testcase in the pln.

    Even a tougher problem, what about with nested test plans, can I choose to exit the child testplan only but not the parent testplan?

    Thanks in advance.

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

  2. #2
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    Using TestPlanEnter and other recovery system functions you can set up variables to query for when deciding to running a test or not. You'll have to code this though.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Location
    Fremont, CA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    Thanks, James. I probably will do that outside of the TestCaseEnter in a function since not all my testcases have this dependency.
    It's hard to believe that Silk doesn't have a build-in command for this kind of exit.

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

  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 exit the TestPlan from a TestCase?

    Silktest probably doesn't have this kind of function because one of the guiding principles of testcase design is that each testcase should be independent of others, and they designed the testplans with this in mind.
    Of course, sensible as it is as a guiding principle, I can well imagine the kind of situation where if one testcase fails, you know that all the rest of the testcases in the plan are also going to fail - for example, if the aut fails to start properly, there's little point in testing anything else about it.

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

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

    Re: How to exit the TestPlan from a TestCase?

    A strange function with a strange syntax WILL do this:

    Lookup Silk help on the "$StopRunning function". It must be called using the reference operator, like this:

    @("$StopRunning")()


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

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

    Re: How to exit the TestPlan from a TestCase?

    Did you get "Exception -200000" when StopRunning is called with @("$StopRunning")() syntax ?

  7. #7
    Junior Member
    Join Date
    Jul 2001
    Location
    Roseville, CA USA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    Everytime I use the StopRunning module, I get that exception. I chalked it up to it not being as well tested, since the help says: Use at your own risk!

  8. #8
    Junior Member
    Join Date
    May 2003
    Location
    Toronto, Ontario, Canada
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    I am having problems using this method. It seems when I use it it will not let some things act properly. For example, a call in the Start->Run dialog results in:
    [ ] *** Error: Member Y2KRulesInherited is not defined in window Run.File for Microsoft Windows 2000

    or a call within my program results in:
    [ ] *** Error: Variable Browser is not defined

    which is a Default DefaultBaseState variable..

    Anybody have tips for a way to end an entire test plan in a similar way as $StopRunning ?

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    A co-worker discovered today something very bizarre in SilkTest.

    Do this:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">BrowserPage.TypeKeys (&quot;&lt;LeftShift-RightShift&gt;&quot</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">It behaves exactly as if you held down both Shift keys at the same time, aborting the SilkTest execution. You even get the "Script aborted by user" statement in the results file.

    We decided to keep that around for future reference and wrote it into a function we called HariKari ().

    - Dave
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  10. #10
    Junior Member
    Join Date
    Feb 2002
    Location
    Kiowa, CO,USA
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to exit the TestPlan from a TestCase?

    Actually, I'm calling it EjectEjectEject ().
    Jon A. Lamprech
    jlamprech@yahoo.com

 

 

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 10:42 AM.

Copyright BetaSoft Inc.