Essential Software

Posted: April 30, 2014 in Uncategorized

Adobe Acrobat XI Pro
HP ALM Microsoft Excel Addin
Microsoft Visual Studio Premium – ENU
Microsoft Visual Studio 2010 Proffesional – ENU
Microsoft SQL Server 2008
Oracle VM VirtualBox 4.3.8
TeamViewer9
Camtasia Studio 8
Genilogix QC eApprove
Genilogix QC eApprove\GLX_Plugins
HP ALM Client
Microsoft Visual C++ 2005 Redistributable
QA_Files
Quality Center Client Side
STM Extension Client Side
PrimalMerge 2012
SAPIEN PrimalScript 2012
Workflow Editor
Adblock Plus for IE(32-bit)
Skype
HttpWAtch Basic 9.0.25
Vbsedit
HP Analysis 11.00
EditPlus 3
HP Virtual User Generator
HP Quick Test Add-in for ALM-QC
MagicDisc 2.7.106
FileZilla Client 3.7.3
TreeSize Free V2.7
HP AMP 9.2 Console
Notepad++
VLC Media Player 2.0.5
WinZip 12.0
winRAR 4.20
Beyond Compare Version 3.3.5
HP Run Results Viewer
Microsoft Script Debugger
Snagit 9.1.3
Quality Center Microsoft Word Add-In


Imports SACLIENTLib
Imports System.Xml
Imports System.IO
Module Module1
Sub Main()
Dim objSAClient
Dim Project_Names As String
objSAClient = CreateObject("SAClient.SaApi.9")
objSAClient.login("http://Your_Server_Name:8080/qc​bin", "Your_User_ID", "Your_Password")
Console.WriteLine("Connected to the Site Administration..")
Project_Names = objSAClient.GetLinkedProjects("DEFAULT", "eApprove_V30119", "template")
'Console.WriteLine("Project Details are" + Project_Names)
Dim stream As StringReader
Dim reader As XmlTextReader = Nothing
Dim ProjectName As String = Nothing
Dim Temp = Nothing
stream = New StringReader(Project_Names)
reader = New XmlTextReader(stream)
While reader.Read()
If (reader.IsStartElement("PROJECT_NAME")) Then ProjectName = reader.ReadElementString
If ProjectName = Temp Then
Continue While
Else
Console.WriteLine(ProjectName)
End If
Temp = ProjectName
End While
reader.Close()
Console.ReadLine()
End Sub
End Module

Sub CopyTestIDs
On Error Resume Next
Dim TestSetFact
Dim TSTestFact
Dim theTestSet
Dim theTSTest
Dim TestSetTestsList
Set tdc= TDConnection
Set TestSetFact = TestSetFactory     ‘ TEST SET FACTORY CONTAINS ALL THE TEST SETS
Set TSTestFact = TSTestFactory       ‘ CONTAINS ALL THE TEST INSTANCES OF A TEST SET
Set theTestSet = TestSet             ‘ TEST SET IS ONE OF THE MEMBER IN TEST SET FACTORY
Set theTSTest = TSTest               ‘ INSTANCE IS ONE OF THE TEST INSTANCES IN  TSTestFactory
Set TestSetTestsList = list
‘ Get the TestSetFactory object
Set TestSetFact = tdc.TestSetFactory
‘ Get the current Test Set by the Test Set ID
Set theTestSet = TestSetFact.Item(TestSet_Fields(“CY_CYCLE_ID”).Value)
‘ Get the TSTest factory and list of TSTests
Set TSTestFact = theTestSet.TSTestFactory ‘ Get the list of all the test cases present in the Test Set
Set TestSetTestsList = TSTestFact.NewList(“”)’ Copy the test case id from Test Plan into the Test ID field in every Test Instance
For Each theTSTest In TestSetTestsList
theTSTest.Field(“TC_USER_01”) = theTSTest.TestId ‘ TC_USER_10 is the Test Instance user created field called Test ID to hold the ids from test plan
Next
On Error GoTo 0
End Sub
Sub TestSetTests_MoveTo
On Error Resume Next
Call CopyTestIDs
On Error GoTo 0
End Sub

 

Test Instance Custom Field

————————–Invalid_BK.vbs———–name of the vbscript file —————-

sQCUrl = “http://alm/qcbin”
sUsername = “User_Name”
sPassword = “Password”
sQCDomain = “DEFAULT”
sQCProject = WScript.Arguments(0)
sQCUser = WScript.Arguments(1)
Set tdc = CreateObject(“TDApiOle80.TDConnection”) ‘tdc Object set successfully, and i can see sub objects availability
tdc.InitConnectionEx sQCUrl
‘at above line I am getting General run error
MsgBox “Initiated the ALM connection”
tdc.Login sUsername, sPassword ‘QC Authentication
If (tdc.LoggedIn True) Then
MsgBox “User ” & sUsername & ” Authentication to ALM is Fail”
End If

tdc.Connect sQCDomain, sQCProject ‘QC Project Login
MsgBox “Connected to the project”
If (tdc.Connected True) Then
MsgBox “ALM Project Failed to Connect to ” & sQCProject
End If
Set cust = tdc.Customization
cust.Load
Set custUsers = cust.Users
Set users = custUsers.Users
For Each usr in users
If usr.Name = sQCUser Then
If usr.InGroup(“Inactive”) = True Then
usr.RemoveFromGroup(“Inactive”)
MsgBox “Invalid role removed for “& sQCUser
End If
End If
Next
cust.Commit()
Set cust = Nothing
Set custUsers = Nothing
Set users = Nothing
If tdc.Connected Then : tdc.Disconnect
If tdc.LoggedIn Then : tdc.Logout
——————————————————————————————–

Run command prompt and execute the below.

C:\Users\UserName\Desktop>cscript.exe Invalid_BK.vbs “Project_Name” “User_Name”

——————————————————————————————–

I have used this VBScript in the past to get the TDAdmins of all active projects (assuming your user is present in all of them):

user = InputBox("User:")
password = InputBox("Password:")
servername = InputBox("Server name:")

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\listAdminUsers.txt", 8, True)
Set tdc = CreateObject("tdapiole80.tdconnection")
tdc.InitConnectionEx ("http://" & servername & ":8080/qcbin")
tdc.Login user, password
Set domainList = tdc.VisibleDomains

For Each dom in domainList
f.WriteLine "*************************** " & dom & " ***************************"
For Each proj In tdc.VisibleProjects(dom)
tdc.Connect dom, proj
f.WriteLine "----------------------- " & proj & " -----------------------"
Set cust = tdc.Customization
cust.Load
Set custUsers = cust.Users
Set users = custUsers.Users

For Each usr in users
If usr.InGroup("TDAdmin") Then
f.WriteLine usr.Name
End If
Next
Set cust = Nothing
Set custUsers = Nothing
Set users = Nothing
tdc.Disconnect
Next
Next

tdc.ReleaseConnection
f.Close
Set domainList = Nothing
Set fso = Nothing
Set f = Nothing
Set tdc = Nothing
MsgBox "Finished listing users"

Above code looks promising!!!!

Reference: http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/How-to-get-the-list-of-Project-administrators/m-p/6286019

Imports TDAPIOLELib
Imports SACLIENTLib
Imports System.Xml
Imports System.IO

Module Module1
Sub Main()
Dim fso, f
fso = CreateObject(“Scripting.FileSystemObject”)
f = fso.OpenTextFile(“C:\TEMP\Project_Name_Status_Log_​File.txt”, 2, True)
Dim fso1, f1
fso1 = CreateObject(“Scripting.FileSystemObject”)
f1 = fso.OpenTextFile(“C:\TEMP\Admin_User_Information.t​xt”, 2, True)
Dim tdc
Dim custom As Customization
Dim users As CustomizationUsers
Dim eachuser As CustomizationUser
Dim GetAllCustomUsers As List
Dim GetAllGroupList As List
tdc = CreateObject(“TDApiOle80.TDConnection”)
tdc.InitConnectionEx(“http://almdev/qcbin/”)
Dim objSAClient
Dim ProjectListCapture As List = Nothing
objSAClient = CreateObject(“SAClient.SaApi.9”)
‘then login as admin:
objSAClient.login(“http://almdev/qcbin”, “USER_NAME”, “PASSWORD”)
Dim stream As StringReader
Dim reader As XmlTextReader = Nothing
Dim ProjectName As String = Nothing
Dim Temp = Nothing
stream = New StringReader(objSAClient.GetAllProjects)
reader = New XmlTextReader(stream)

While reader.Read()
If (reader.IsStartElement(“PROJECT_NAME”)) Then ProjectName = reader.ReadElementString
If ProjectName = Temp Then
Continue While
Else
tdc.ConnectProjectEx(“DEFAULT”, ProjectName, “USER_NAME”, “PASSWORD”)
f1.WriteLine(“Project Name::::” + ProjectName)
custom = tdc.Customization
users = custom.Users
GetAllCustomUsers = users.Users()
For Each eachuser In GetAllCustomUsers
If eachuser.InGroup(“TDAdmin”) = True Then
Console.WriteLine(eachuser.Name.ToString)
f1.WriteLine(eachuser.Name.ToString)
End If
Next
custom.Commit()
custom = Nothing
users = Nothing
eachuser = Nothing
GetAllCustomUsers = Nothing
GetAllGroupList = Nothing
End If
Console.WriteLine(ProjectName)
f.WriteLine(ProjectName)
Temp = ProjectName
End While
reader.Close()
f.Close()
fso = Nothing
f = Nothing
f1.Close()
fso1 = Nothing
f1 = Nothing
Console.ReadLine()
End Sub
End Module


SELECT m.Project Project,
m.usname US_USERNAME,
ISNULL(m.Admin,0) Admin,
ISNULL(m.Bus_Owner,0) Bus_Owner,
ISNULL (m.Bus_Reviewer,0) Bus_Reviewer,
ISNULL(m.Defect_Resolver,0) Defect_Resolver,
ISNULL(m.Inactive ,0) Inactive ,
ISNULL(m.Lead_Test_Mgr,0) Lead_Test_Mgr,
ISNULL(m.Quality,0) Quality,
ISNULL(m.Req_Author,0) Req_Author,
ISNULL(m.Tech_Reviewer,0) Tech_Reviewer,
ISNULL(m.Test_Analyst,0) Test_Analyst,
ISNULL(m.Test_Mgr,0) Test_Mgr,
ISNULL(m.Tester,0) Tester,
ISNULL(m.View_Only,0) View_Only

FROM
(
SELECT DB_NAME() AS Project,
u.US_USERNAME usname,
MAX(TDAdmin) Admin,
MAX(Business_Owner) as Bus_Owner,
MAX(Business_Reviewer) as Bus_Reviewer,
MAX(Defect_Resolver) as Defect_Resolver,
MAX(Inactive) Inactive ,
MAX(Lead_Test_Manager) as Lead_Test_Mgr,
MAX(Quality) Quality,
MAX(Requirement_Author) as Req_Author,
MAX(Technical_Reviewer) as Tech_Reviewer,
MAX(Test_Analyst) as Test_Analyst,
MAX(Test_Manager) as Test_Mgr,
MAX(Tester) Tester,
MAX(View_Only) as View_Only

FROM
(
SELECT DISTINCT us_username,
CASE gr_Group_Name
WHEN 'TDAdmin' THEN 1
END TDAdmin,
CASE gr_Group_Name
WHEN 'QATester' THEN 1
END QATester,
CASE gr_Group_Name
WHEN 'Project Manager' THEN 1
END Project_Manager,
CASE gr_Group_Name
WHEN 'Developer' THEN 1
END Developer,
CASE gr_Group_Name
WHEN 'Viewer' THEN 1
END Viewer,
CASE gr_Group_Name
WHEN 'Quality' THEN 1
END Quality,
CASE gr_Group_Name
WHEN 'Test Analyst' THEN 1
END Test_Analyst,
CASE gr_Group_Name
WHEN 'Test Manager' THEN 1
END Test_Manager,
CASE gr_Group_Name
WHEN 'Tester' THEN 1
END Tester,
CASE gr_Group_Name
WHEN 'Defect Resolver' THEN 1
END Defect_Resolver,
CASE gr_Group_Name
WHEN 'Inactive' THEN 1
END Inactive,
CASE gr_Group_Name
WHEN 'Business Owner' THEN 1
END Business_Owner,
CASE gr_Group_Name
WHEN 'Business Reviewer' THEN 1
END Business_Reviewer,
CASE gr_Group_Name
WHEN 'eApprove Administrator' THEN 1
END eApprove_Administrator,
CASE gr_Group_Name
WHEN 'Requirement Author' THEN 1
END Requirement_Author,
CASE gr_Group_Name
WHEN 'Lead Test Manager' THEN 1
END Lead_Test_Manager,
CASE gr_Group_Name
WHEN 'View Only' THEN 1
END View_Only,
CASE gr_Group_Name
WHEN 'Technical Reviewer' THEN 1
END Technical_Reviewer

FROM td.USERS,td.GROUPS
WHERE SUBSTRING (US_GROUP, GR_GROUP_ID+1, 1) = '1'
) u

GROUP BY u.US_USERNAME
)m