SPONSORS:






User Tag List

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

Thread: LOG File

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    LOG File

    hi,

    i am trying to pass the following to the log file

    Dim errstring As String
    errstring = Err.Description
    TestLog.Comment ("test " + errstring)

    here i get this test string in the command details and the results as "PASS" is it possible for me to have a comment of my own with the result field saying "Failed" .. how will i do it?

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Location
    Newcastle upon Tyne, UK
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: LOG File

    Jai,

    One way to do it is as follows:


    ' get the current logging state
    Dim allLogState as boolean
    allLogState = PlayBack.LogAllInfo

    ' Switch off logging
    PlayBack.LogAllInfo = false

    ' Execute the peice of code here that fails & catch error

    'Switch Logging back on to report
    PlayBack.LogAllInfo = true
    Dim errstring As String
    errstring = Err.Description
    TestLog.Comment ("test " + errstring)

    ' Put the log state back
    PlayBack.LogAllInfo = allLogState


    I've not tried this, but hope it helps

    Regards,
    Keith

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Location
    Norway
    Posts
    173
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: LOG File

    So what you actually want to do is to set test status as failed in the code? In that case it's not TestLog.Comment but UserCheck method you want to use.

    Call UserCheck("CheckName",False,"Your comment")

    More information about the method in TestPartner language reference.

 

 

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.34%
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 05:46 AM.

Copyright BetaSoft Inc.