C# 클래스 ALMRestClient.ALMClient

Represents the ALM system From IP at https://MYDOMAIN.saas.hp.com/qcbin/Help/doc_library/api_refs/REST/webframe.html
파일 보기 프로젝트 열기: webcompere/ALMRestClient 1 사용 예제들

공개 메소드들

메소드 설명
ALMClient ( string url, string username, string password, string domain, string project ) : System

Construct with the url (just the https://something.saas.hp.com bit)

ALMClient ( string url, string username, string password, string domain, string project, string version ) : System

Construct with the url (just the https://something.saas.hp.com bit)

Dispose ( ) : void
GetDefects ( ) : List

Get the list of defects

IsAuthenticated ( ) : bool

Checks whether the user is currently authenticated

Login ( ) : bool

Call this before calling other methods - will throw an ALMClientException on failure

Logout ( ) : bool

Logs the user out of the session

UpdateDefect ( string id, ALMItem changes ) : bool

Update an ALM item

비공개 메소드들

메소드 설명
AddAuthTokensAsNecessary ( RestSharp request ) : RestSharp.IRestRequest

Adds the authentication tokens to the request if the parameters don't include them

AddDefect ( IRestRequest req ) : void

Add the defect segment

AddDefectAndId ( string id, RestRequest req ) : void

Add the defect and defect Id

AddDomainAndProject ( RestRequest req ) : void

Add the domain and project to the request

CleanRequest ( IRestRequest &request ) : void

Cleans the request before processing in an attempt to minimize errors

ConvertToFieldXml ( string>.Dictionary dictionary ) : string

Converts the dictionary into an xml string

Execute ( IRestRequest request, string message ) : IRestResponse

Executes a query against HP ALM

The session is updated before each query and doesn't need to be managed elsewhere (except for Login/Logout)

FindCookie ( RestSharp client, string cookieName, Action foundCookie ) : bool

Enumerates the client's cookie container looking for the cookie requested and calls the action when the cookie is found

FindTotal ( System.Xml.Linq.XDocument doc ) : int

Find the total count

GetExistingSessionMethod ( ) : RestSharp.Method

Determines the current session state and returns the correct action to continue working the same session

ManageServerSessions ( Func getMethod ) : bool

Manages the session credentials

ReadDefects ( List items ) : void

Get the list of defects

SetTokenFromCookies ( IRestClient clientToRead ) : void

Sets the internal tokens for reuse

ThrowExceptionIfNecessary ( IRestResponse response, string location ) : void

Throws an exception with a standard message when HideCustomExceptions is false

ThrowExceptionIfNecessary ( IRestResponse response, string location, string customMessage ) : void

Throws an exception with a standard message when HideCustomExceptions is false

Update ( string id, ALMItem changes ) : bool

Update the item

VerifyLoggedInAuthenticatedAndExtendSession ( ) : bool

Logs in and updates the server sessions which is required before executing queries.

메소드 상세

ALMClient() 공개 메소드

Construct with the url (just the https://something.saas.hp.com bit)
public ALMClient ( string url, string username, string password, string domain, string project ) : System
url string Base url for ALM
username string username for login
password string password
domain string The domain to log into
project string The project to log into
리턴 System

ALMClient() 공개 메소드

Construct with the url (just the https://something.saas.hp.com bit)
public ALMClient ( string url, string username, string password, string domain, string project, string version ) : System
url string Base url for ALM
username string username for login
password string password
domain string The domain to log into
project string The project to log into
version string The ALM version to use
리턴 System

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetDefects() 공개 메소드

Get the list of defects
public GetDefects ( ) : List
리턴 List

IsAuthenticated() 공개 메소드

Checks whether the user is currently authenticated
public IsAuthenticated ( ) : bool
리턴 bool

Login() 공개 메소드

Call this before calling other methods - will throw an ALMClientException on failure
public Login ( ) : bool
리턴 bool

Logout() 공개 메소드

Logs the user out of the session
public Logout ( ) : bool
리턴 bool

UpdateDefect() 공개 메소드

Update an ALM item
public UpdateDefect ( string id, ALMItem changes ) : bool
id string Id of the item
changes ALMItem An item containing all the fields to change
리턴 bool