Results 1 to 4 of 4
  1. #1

    Specific Advantage of using Dictionary object

    Can anyone explain specific advantage of using Dictionary object over Environment variable etc?

  2. #2

    Re: Specific Advantage of using Dictionary object

    See if this answer your query


    But you should know problems with Environment variable for the same

  3. #3

    Re: Specific Advantage of using Dictionary object

    First thing that springs to mind is that you can remove keys in dictionary object during runtime. I don't think you can remove Environment variables. By "remove", I mean remove all traces not just set the value to nothing

  4. #4

    Re: Specific Advantage of using Dictionary object

    I think the Dictionary object is great for handling test parameters when you have a lot of them...Doing the same with environmental I guess could be a bit hard to maintain after a while. Also you cannot use environmental outside QTP for example in a stand-alone vbs-file.

    Now my process for implementing a new test parameter for example a test case is like this:

    1. Add the parameter and its value(s) to one or more test cases in my test database (using SQL or custom GUI). The parameter name should be unique.
    Note: The parameters and their values are automaticly loaded from the database into a Dictionary Object MyDicObj prior each test case execution without any code change needed.
    2. Update test case(s) function code where the parameter should be used, usage MyDicObj.Item("MyNewParameter"). No need for change of calling function since MyDicObj is already passed to all functions.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:58 PM.

Copyright BetaSoft Inc.