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
    Dec 2001
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    overwriting log message

    Is it possible to overwrite the log message? I have a loop that executes a 1000 times and I send a message to the log during each cycle. I want to see just one message for the execution count. I do not want to place the code, SQALogMessage, outside the loop as I need to know the execution count if the script ever fails.
    Is there any other way to keep track of this? Or is it possible to overwrite the message in console?

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Montreal, QC, Canada
    Posts
    366
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: overwriting log message

    Cannot overwrite, however, if you are looking to see you get all the known 1000 loops what you need to do is add a variable cnt and do something like this:

    Dim cnt as integer
    Dim loopcnt as integer
    cnt = 0
    loopcnt = 1000

    For i=1 to loopcnt
    'code, code, code...
    cnt = cnt + 1
    Next

    If cnt <> loopcnt Then
    SQALogMessage sqaWarning, "This looped " & cnt & " times, was expecting " & loopcnt, ""

    Else
    SQALogMessage sqaNone, "This looped " & cnt & " times as expected", ""
    End If

    If your script typically fails in the middle of the loop then use SQAConsoleWrite in the loop so that in the debug window you can see it after execution is done but the log won't be filled with garbage.

    Max

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

    Re: overwriting log message

    But even if I use SQAConsoleWrite, I still have to scroll down to see the final number. This could be a problem if my loop runs for like 15000 times. Any other way to overcome this?

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

    Re: overwriting log message

    Actually I figured out how to do this. Everytime before I write to the console, I cleared the console. This way I see only the last count.

 

 

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 10:36 AM.

Copyright BetaSoft Inc.