SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4

Thread: VB Script

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    VB Script

    We are devloping a vbscript that captures QTP error. We would like to improve the code so that it caputures where in the script the error occurs. some ideas may be 1)creating small actions and then we can narrow down the error from where the error occurs by providing Action name. 2) Also we can insert transactions name in the script and find out which transactions fail. 3) Or we can provide the line number. Just want to know if there is any other smart way you are manging this requirement.

  2. #2
    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: VB Script

    There is no way to extract the current line number in a QTP Action, nor in an external lib. This is not a QTP limitation, but a vbScript limitation.

    Take advance of the the StepID parameter when logging errors using the Reporter.ReportEvent() method. And if you write your own customer logging function make sure to implement that feature in it as well.

    Spend some time defining (and the following as a team of developers) rules for creating unique StepID labels in all test cases--as well as your custom functions. Here is a thread that describes how to implement a "poor man's" stack trace, so you can figure out where and how you got to a error message deep in a set of lib calls (which is built on a recursive set of the Step ID strings):

    http://www.sqaforums.com/showflat.ph...;Number=356411

  3. #3
    Senior Member
    Join Date
    May 2006
    Location
    Israel
    Posts
    338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: VB Script

    Actually, the line data has to be accessible SOMEHOW, as QTP knows the line number when it displays its own custom errors.

    I guess they have a wrapper which stores this information, the "only" questions are where is it, and is it accessible.
    www.AdvancedQTP.com
    'coz we're programmers - not users

  4. #4
    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: VB Script

    My guess is there lib functions and the app is written in a real programming language like C++. They also provide vbScript built-in functions that support optional parameters, yet we can't write functions with optional parms.

 

 

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 04:46 PM.

Copyright BetaSoft Inc.