I need to update 2 fields in the Test Plan when the test fails in the Test Lab. I was using the following code to send mail when the test fails (this part works fine) and thought I could use the 2 final statements to update the TS_STATUS and TS_USER_02 Fields in the Test Plan, but it does not work. Does anyone have an idea about how I can accomplish this? Thanks in advance for any help.
‘Send mail if test fails and set test plan statuses
if TestSetTest_Fields.Field("TC_STATUS").Value="Failed" then
testID = TestSetTest_Fields.Field("TC_TEST_ID").Value
strTestName = TDConnection.TestFactory.Item(testID).Field("TS_NAME")
strSubject = "Test Case Failure Notification"
strBody = "The test " & strTestName & " failed." & " It is in the project " & TDConnection.ProjectName & _
" which is in the domain " & TDConnection.DomainName & "."
strTo = TestSetTest_Fields.Field("TS_RESPONSIBLE").Value & ";[QA Lead];[Automation Lead]"
Email strTo, strSubject, strBody
TDConnection.TestFactory.Item(testID).Field("TS_STATUS").Value = "Research"
TDConnection.TestFactory.Item(testID).Field("TS_USER_02").Value = "Research"