SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Iterate through Tests within the current TestSet.

    I am trying to get a specific value from a Run to the level of the testset. Just like you have a run that has status Passed, which is also visible in the test set view.

    For this, I think i need to use Test Instances. It seems that a Test Instance is a row in a Test Set, which in it's turn can contain N runs.

    However, I am hopelessly failing in succesfully iterating through the list of test instances. What I would like to achieve is:

    Within the context of a test set, take the last run of each test instance and copy the value from my remark field so it is visible in the test set itself.

    The other way around - setting the value in the run based on editing the test instance in the testset - I can do:

    <font class="small">Code:</font><hr /><pre>
    Sub TestLab_TestSetTests_FieldChange(FieldName)
    If FieldName = "TC_USER_02" Then
    ' Update the Remark text
    Set TSTests = TDConnection.TSTestFactory
    ' a TSTest is identified by the related TC_TESTCYCL_ID
    Set CurrTSTest = TSTests.Item(TestSetTest_Fields.Field("TC_TESTCYCL _ID").Value)

    ' In case no run exists yet, we will warn our user that a run needs to be present
    if not CurrTSTest.LastRun is nothing then
    ' Now, we always have a last run
    CurrTSTest.LastRun.Field("RN_USER_05") = TestSetTest_Fields("TC_USER_02").Value
    CurrTSTest.LastRun.Post
    end if

    End If
    End Sub
    </pre><hr />

  2. #2
    Junior Member
    Join Date
    Dec 2007
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through Tests within the current TestSet.

    I managed to ALMOST get it, but I am missing out on something small it seems:

    CurrTSTest.LastRun.Field("RN_USER_05") does give the remark I added to the last run, but

    msgbox CurrTSTest.Field("TC_USER_02")

    keeps giving me an error... Any idea's why?

    <font class="small">Code:</font><hr /><pre>
    Sub TestLab_EnterModule
    Set TSTests = TDConnection.TSTestFactory
    Set TestList = TestFactory.NewList("")
    For Each CurrTSTest In TestList
    if not CurrTSTest.LastRun is nothing then
    msgbox CurrTSTest.Field("TC_USER_02")
    ' CurrTSTest.Field("TC_USER_02").Value = CurrTSTest.LastRun.Field("RN_USER_05")
    end if
    next
    End Sub
    </pre><hr />

  3. #3
    Advanced Member
    Join Date
    Nov 2006
    Posts
    821
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    CurTSTest is a reference to a Test Instance in the Test Lab. "TC_USER_##" is usually a reference to a custom field in a Test Case in the Test Plan. The field TC_USER_02 probably doesn't exist in the Test Set Test entity. Custom fields can be created for Test Cases in the Test Plan and for Test Instances in the Test Lab. You need to reference the correct custom field in the Test Instance entity.
    Trudy C
    (Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)

 

 

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

Copyright BetaSoft Inc.