Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Hanuman_U Absent Member.
Absent Member.
354 views

How to hide test instnaces from the user which were not assigned to him.

Jump to solution

 

 

 When a user entered into Test Lab module ,logged in user can see only test instances that are assigned to him.

In other words , Test lab should display only test instances whose Responsible Tester (TC_TESTER_NAME) value is current user.

 

I've tried the following , but could not achieve it.

 

 


Set tsTestList = TSTestFact.NewList("")
         
For Each testInstance in tsTestList
 if testInstance.Field("TC_TESTER_NAME")  <> User.UserName Then
  testInstance.isVisible= false 'Wrong code
 end if
                  
 testInstance.Post
             
Next

 

testInstance.isVisible= false '' This line is throwing error as Test Intance is not a feild to use isVisible.

 

If anyone tried this using workflow, please share the code.

 

 

 

 


Regards,
Hanumanth
0 Likes
1 Solution

Accepted Solutions
Highlighted
Hanuman_U Absent Member.
Absent Member.

Re: How to hide test instnaces from the user which were not assigned to him.

Jump to solution

Got the below work around for this from another thread.

I had to write one more condition.

 

For original thread:  Click Here

 

 Workaround:

 

The details of how to do this has changed between versions. In the 11.x versions it is very difficult; in the earlier versions, when Favorites were stored as common settings, it was a lot easier.  I am not sure I remember all the details correctly, but you can try this - it might work in your version, or it could be the default view for Execution Grid was named differently.

 

First step is to create a public favorite in the Execution Grid with the column setup that you want. Call it "TestView"

 

Then add these lines to Project_CanLogin:

 

Set tdc = TDConnection
Set cs = tdc.CommonSettings
Set us = tdc.UserSettings
cs.Open "TESTLAB_VIEWS"
us.Open "Execution"
us.Value("TSTestsFilter") = cs.Value("TestView")
cs.Close
us.Post
us.Close
Set cs = Nothing
Set us = Nothing
Set tdc = Nothing

 

This will set the user default view in Test Lab to be the same as the contents of the favorite.


Regards,
Hanumanth
1 Reply
Highlighted
Hanuman_U Absent Member.
Absent Member.

Re: How to hide test instnaces from the user which were not assigned to him.

Jump to solution

Got the below work around for this from another thread.

I had to write one more condition.

 

For original thread:  Click Here

 

 Workaround:

 

The details of how to do this has changed between versions. In the 11.x versions it is very difficult; in the earlier versions, when Favorites were stored as common settings, it was a lot easier.  I am not sure I remember all the details correctly, but you can try this - it might work in your version, or it could be the default view for Execution Grid was named differently.

 

First step is to create a public favorite in the Execution Grid with the column setup that you want. Call it "TestView"

 

Then add these lines to Project_CanLogin:

 

Set tdc = TDConnection
Set cs = tdc.CommonSettings
Set us = tdc.UserSettings
cs.Open "TESTLAB_VIEWS"
us.Open "Execution"
us.Value("TSTestsFilter") = cs.Value("TestView")
cs.Close
us.Post
us.Close
Set cs = Nothing
Set us = Nothing
Set tdc = Nothing

 

This will set the user default view in Test Lab to be the same as the contents of the favorite.


Regards,
Hanumanth
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.