SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2008
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Test Items and LockEvents

    Following is a function in one of the script file.

    function _2_IMPORT_FROM_DEVICE()
    {
    Log.PushLogFolder(Log.CreateFolder("2. IMPORT FROM DEVICE "));

    try
    {
    _2_1_DevicesList();//Sub-component1
    _2_2_PortfoliosfromDevice();
    _2_3_ImportDestination();//Sub-component1
    _2_4_Import_from_DeviceToDatabase();
    _2_5_Import_from_DeviceToFile();

    }
    catch(exception)
    {
    Log["Error"]("Exception", exception["description"]);
    }

    Log.PopLogFolder();
    }

    If i run this particular file then will it hold the test log for all the files that it is calling even if i have used the Log.Lockevents at the start of the each file ?

    As per the documentation for Logs and test items i think the test log will be maintained for the duration of the test item.

    What is exactly test item in above case ?

    If i run just above file and then it calls some other script files and those files again call some other script files.
    So just the script file i am running will be a test item isn't it ?

    Please confirm.

    If i split the above functions ( _2_1_DevicesList() )
    to the indivisual test items then do i need to include the Log.LockEvents for each of the script files getting called or TestComplete will maintain the the Log for that particular test item ?

    In and all, if i split the scripts for particular project to the test items then no need to explicity specify the Log.Lockevents for all those test items.

    PLease confirm.

  2. #2
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Test Items and LockEvents

    Hi,

    The Log.LockEvents method stays in effect during the current run of the test item or until the Log.UnlockEvents method is called. So, it would be enough to use the Log.LockEvents method at the beginning of the function of the relevant test item. I recommend that you read the "Log.LockEvents" help topic.

    [ QUOTE ]

    If i run just above file and then it calls some other script files and those files again call some other script files.
    So just the script file i am running will be a test item isn't it ?


    [/ QUOTE ]
    Actually, it will be one test item. I recommend that you watch this screencast devoted to test items. Also, please read the "Tests and Test Items" help topic.
    Best regards,
    David - SmartBear Support

 

 

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 09:52 PM.

Copyright BetaSoft Inc.