SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    modify testcase args (from pln) in testcase enter

    Hi all, I am working on this now and wanted to solicit some additional thoughts. I want to get my testcase arguments (GetTestCaseArgs()) in testcase enter, then parse and modify them, then continue with the case with the new args.

    The args come from a testplan and there are many records and lists.

    Any thoughts on this?
    Thanks!

  2. #2
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    Sounds like a good idea.

    You can grab the arguments in other places like the default base state also. That's what we currently do and then populate a global record with all of these "defaults" that all of the functions/windows/methods in our application have access to.

    Just put it in a common area that all of your test cases will always use. In our case, we sometimes have different testcase enter functions for different test cases. But all the test cases utilize the same "basedon" default base state.

  3. #3
    Member
    Join Date
    Dec 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    Brian, that's cool, and exactly what I've been stewing on. However, I'm trying to come up with a nice way to get the args back to the testcase function.

    The testcase args are obviously local to the testcase. I'd like to do it without inserting something at the beginning of all the testcase functions (like a line to go get new values from some global variable set with the new data (args).

    Any good ideas?
    thanks!

  4. #4
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    Something to try...

    - Define a global variable that can be a record with all of your data in it that you'll need for any test.
    - In a single spot that will be used by every test case (TestCaseEnter() function or a custom appstate you define that each testcase will be based on) read the args using the GetTestCaseArgs() function, make your necessary changes, and save the values off in that global record variable.
    - Now any function/method you define for your test case has access to these global values.

    The bid thing here is to try to get this reading and manipulating of the test args from the plan "encapsulated" and in a single spot that all tests will automatically call like you said, without have to code the call every time. TestcaseEnter() and appstates can be used for things like that. Good luck!

  5. #5
    Member
    Join Date
    Dec 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    Hi Brian, I left this for a while and am getting back to it. Thanks for the ideas.

    We have too many testcase functions with different args to create then maintain a record of all of them.

    I am still looking for a solution - this is a tough one.

    Any other ideas welcome!

  6. #6
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    I guess I don't really know what you are asking for then. Maybe you can give some specific examples of what is wrong and what you are trying to accomplish.

  7. #7
    Member
    Join Date
    Dec 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: modify testcase args (from pln) in testcase en

    So I finally solved this problem. And so simply and in an easy to maintain way.

    I knew about the ability to call functions from PLN files, but had forgotten about it since it's used so little.

    For example, say I need 1 of 3 different values depending on the environment, or some other setting, or whatever. I have something like this in the pln file:

    $Name = ParseInputArgs("blah1|blah2|blah3")

    My ParseInputArgs routine checks the value of some setting and then only sends back the one I need.

    So simple!

 

 

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 02:09 AM.

Copyright BetaSoft Inc.