SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    storing Tests as vbs files

    hi,

    Did a few searches but couldn't find much on this topic.

    I would like some opinions on storing test cases as VBScripts and have a QTP script that would call ExecuteFile on these test .vbs files.

    VBScripts are alot easier to move around they're just text files so version control is alot lighter. Additionally, resources would only be loaded once for the driving script instead of being loaded for every test. So those are some of the pros, can someone throw in a some cons? Throwing in pros is appreciated too. But if someone has tried this and found a good reason not to approach it this way, I would really appreciated it. Thanks!

    Oh yeah, I'm not using QTP's OR or checkpoints or recovery scenarios so storing

  2. #2
    Senior Member
    Join Date
    Feb 2008
    Location
    Los Angeles, CA, USA
    Posts
    861
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    There are some cons of using it, mainly being the visibility of the variables. I remember a discussion in recent past. Search forum for ExectueFile statement. Also this thread also should provide you some pros and cons in the process of selecting actions or functions

    http://www.sqaforums.com/showflat.ph...;Number=400109
    -Suchit

  3. #3
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    No need to use ExecuteFile to implement this approach (if I understand you correctly).

    Rather build your tests from a rich set of vbScript building block functions and place those functions in libs that are included on each calling test's Test Settings... Resources tab. In this manner the libs will be loaded and unloaded explicitly when a QTP script starts and end, and the lib functions will be available to all script Actions in the Global namespace.

  4. #4
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    I utilize ExecuteFile and objectrepository loads to minimize the load time for tests. This way there are no resources associated with the test at all. Using this method has resulted in significant time savings when multiplied by the thousands of tests that we run every week.

    As mentioned, this can make debugging difficult, but I can tell what was going on just by examining the last successful step in the run report.

    I also maintain a 'development' version of the driver script(QTP action that calls appropriate vbs files for a given test) that does utilize the resources for debugging tricky problems that need a watch on a variable.

  5. #5
    Member
    Join Date
    Sep 2006
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    NoUse4aName: Wouldn't calling ExecuteFile and loading OR for each test take up some time too since it's executing your libs and loading OR for every test? My idea is to load the libs only once and use them over and over for several test cases. We're also facing thousands of scripts so I was trying to get around having to load libs so often.

  6. #6
    Member
    Join Date
    Sep 2006
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    Hi thorwath,

    I am using lib functions to build tests. We have too many of them actually. We do associate them in test settings but I notice it takes up sometime to load. We have a lot of tests that share the same libs so I was looking for a way to load the libs once in QTP then reuse them on several test cases. So I was thinking of having a driver/calling QTP script, which I could load all the libs in once, then have my test cases as stored as only vbs files and the calling script can loop through to run them with ExecuteFile.

  7. #7
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    [ QUOTE ]
    NoUse4aName: Wouldn't calling ExecuteFile and loading OR for each test take up some time too since it's executing your libs and loading OR for every test? My idea is to load the libs only once and use them over and over for several test cases. We're also facing thousands of scripts so I was trying to get around having to load libs so often.

    [/ QUOTE ]

    Yes there is some delay there, but it is less than the load delay through association. Our framework still involves running tests one at a time from Quality Center so I couldn't get away with the single load you are proposing.

    I use parameterized procedures that make up building blocks for tests, each procedure has a .vbs and a .tsr that need to be loaded. The testers just add the appropriate procedures in QC, setup the data, then the test is ready to go.

    Next thing I want to look at is tracking whether a .vbs has already been loaded(if the same procedure is used multiple times in a test). As of now executefile would just get executed multiple times. Need to see if it's faster to just let it do that or to track all of the loads.

  8. #8
    Member
    Join Date
    Sep 2006
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    what are parameterized procedures? they sound alot like bpt components. are they bpt components?

    due to the number of test cases we have and amount of functions we have to support these test cases, i opted to keep execution outside of QC. i have no .tsr files to worry about. it's just such a waste of time and resources to load and unload function libs for every test.

  9. #9
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    Essentially a home grown version of bpt implemented through some custom database structures. The load time for actual bpt modules is even worse than Actions, have no interest in using those.

  10. #10
    Member
    Join Date
    Sep 2006
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing Tests as vbs files

    your framework seems pretty advanced. other there particular reasons why you chose to go with Actions instead of just plain old vbs functions?

 

 
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
  •  
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 10.71%
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 09:46 AM.

Copyright BetaSoft Inc.