2.4

Table Of Contents
VMware, Inc. 21
Chapter 2 Getting Started with the Lab Manager SOAP API
{
return true;
}
}
} //** end Namespace}
Advanced Sample: Integrating Lab Manager and Quality Center
TheC#.NETexampleinthissectionisamoreextensive—andmorepractical—example
ofusingtheLabManagerSOAPAPI.ThissampleshowstheintegrationoftheLab
ManagerSOAPAPIcallswithMercuryInteractiveCorporationQualityCenter
product.Thesamplecodeperformsthesetasks:
MakesLabManagerAPI(LabManagerSOAPAPI)callstocheckouta
configurationfromthelibraryanddeployit.
RunsaseriesofpredefinedtestsonthedeployedconfigurationusingMercury
QualityCenter.
MakesLabManagerSOAPAPIcallstocapturetheconfigurationandundeployit
fromtheWorkspace.
Thesetasksareaccomplishedinthesamplecodebymeansofthesethreemethods:
TheCheckoutDeployConfiguration()method(page 24)obtainstheconfiguration
fromthelibraryanddeploysittotheLabManagerWorkspace.
TheRunQCTestset()method(page 23)runsaseriesofpredefinedMercury
InteractiveQualityCentertests.(Formoreinformationaboutthepredefinedtests,
seetheMercuryInteractiveQualityCenterdocumentation.)
TheCaptureUndeployConfiguration()method(page 25)undeploysthe
configurationandcapturesittothelibrary.
Inaddition,theGetLMAPI()method(seecodeonpage 25,static
LabManagerSoap.VMwareLabManagerSOAPinterfaceGetLMAPI())createsanew
bindingtotheLabManagerAPIandsetsupauthenticationparameters.Thismethod
configuresthecertificatepolicyforthe.NETservice
pointmanagertoacceptany
certificateprogrammatically.GetLMAPI()returnsaninstanceoftheLabManager
binding.
using System;
using System.Configuration;
using System.Collections.Specialized;
using System.IO;
using System.Net;
using TDAPIOLELib; //** From Mercury Quality Center