Need User Field to display in Test Instance Properties
Question ID: 104361
0
0

We’ve created a custom field in the Test Lab called Build (TC_USER_02). We need this field to display on the Test Instance properties page as a selectable column. i.e. you go to test lab and double click a test to show the Test Instance properties page and you can view or not view this Build (TC_USER_02) column. Can someone help me figure out how to do this please?

Marked as spam
Posted by (Questions: 16, Answers: 807)
Asked on May 3, 2011 4:57 pm
78 views
Answers (1)
0
Private answer

Well, apparently I've stumped ya'all.

What we ended up doing was creating a user field in Run labeled Build (RN_USER_01) AND a user field in Test Instance labeled Build (TC_USER_02) then writing to both fields using this code in QTP:

Sub GetBuildNumber()
Set CurrentTSTTestSet = QCUtil.CurrentTestSetTest
If CurrentTSTTestSet is Nothing Then
'Move on
Else
QCUtil.CurrentTestSetTest.Field(''TC_USER_02'') = GlobalDictionary.Item(''Build'')
QCUtil.CurrentTestSetTest.Post
QCUtil.CurrentRun.Field(''RN_USER_01'') = GlobalDictionary.Item(''Build'')
QCUtil.CurrentRun.Post
End If
End Sub

The

If CurrentTSTTestSet is Nothing Then
'Move on

part checks to see if the test is being run from Quality Center or not. If not, it just bypasses this part and runs the rest of the test.

Marked as spam
Posted by (Questions: 16, Answers: 807)
Answered on May 23, 2011 5:25 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top