SPONSORS:






User Tag List

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

    Using Dictionaries in Keyword Tests?

    Is there any good way to work with Dictionary objects from keyword tests? Doing something simple like iterating over the keys and printing out each key, value pair seems like it will be pretty cumbersome.

    Thanks!

  2. #2
    Moderator tristaanogre's Avatar
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA
    Posts
    1,792
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using Dictionaries in Keyword Tests?

    I have found that Keyword Tests are very powerful when it comes to creating tests for GUI interaction and building checkpoints and such in a way that works well for both coder and non-coder testers. However, to do more complex algorithms and logical code, I've found Keyword Tests to be cumbersome and have found that I supplement my Keyword Tests with script routines to perform those kinds of tasks.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using Dictionaries in Keyword Tests?

    Yeah, that's kind of what I thought, but was hoping maybe there was a quick hack I wasn't aware of. Thanks for the input [img]/images/graemlins/smile.gif[/img]

  4. #4
    Moderator tristaanogre's Avatar
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA
    Posts
    1,792
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using Dictionaries in Keyword Tests?

    I mean, you probably COULD use a lot of "code snippet" actions in your keyword test but what would end up happening is that most of your keyword test would be "code snippets" at which point you might as well just buckle down and write an actual code routine.

    Some other techniques that I've used is to make liberal use of the "Last Operation Result" feature. So, say I use a Keyword action to run an Object Method. And I choose as my object aqDateTime and the method of Now. Well, that just calls it without really doing anything... but then I can call on my next line aqConvert.DateTimeToFormatStr and pass in as a parameter "Last Operation Result" which will pass in the value of Now that was previous returned. And then I can call Log.Message as the NEXT line and call "Last Operation Result" as the message string which will give the result of DateTimeToFormatStr and so forth...

    Take a look at the attached screenshot to show one way of doing this. While this is not a Dictionary object, perhaps you can adapt something like this...
    Attached Images Attached Images
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

 

 

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.11%
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 12:08 PM.

Copyright BetaSoft Inc.