C# Class HpToolsLauncher.AlmTestSetsRunner

Inheritance: HpToolsLauncher.RunnerBase, IDisposable
显示文件 Open project: hpsa/hp-application-automation-tools-plugin Class Usage Examples

Public Methods

Method Description
AlmTestSetsRunner ( string qcServer, string qcUser, string qcPassword, string qcDomain, string qcProject, double intQcTimeout, QcRunMode enmQcRunMode, string runHost, List qcTestSets ) : System

constructor

ConnectToProject ( string QCServerURL, string QCLogin, string QCPass, string QCDomain, string QCProject ) : bool

connects to QC and logs in

Dispose ( ) : void
Dispose ( bool managed ) : void
GetIdxByTestName ( string strName, HpToolsLauncher.TestSuiteRunResults results ) : int

gets test index given it's name

Run ( ) : HpToolsLauncher.TestSuiteRunResults

runs the tests given to the object.

RunTestSet ( string tsFolderName, string tsName, double timeout, QcRunMode runMode, string runHost ) : HpToolsLauncher.TestSuiteRunResults

runs a test set with given parameters (and a valid connection to the QC server)

Private Methods

Method Description
CheckIsOldQc ( ) : bool

checks Qc version (used for link format, 10 and smaller is old)

CreateTdConnection ( ) : void

creats a connection to Qc

FindAllTestSetsUnderFolders ( ) : void

finds all folders in the TestSet list, scans their tree and adds all sets under the given folders updates the TestSets by expanding the folders, and removing them, so only Test sets remain in the collection

GenerateFailedLog ( IRun p_Test ) : string

returns a description of the failure

GetAllTestSetsFromDirTree ( ITestSetFolder tsFolder ) : List

recursively find all testsets in the qc directory tree, starting from a given folder

GetAlmNotInstalledError ( ) : string
GetFolder ( string testset ) : ITestSetFolder

get a QC folder

GetQcCommonInstallationURl ( string QCServerURL ) : string
GetTestInstancesString ( ITestSet set ) : string

writes a summary of the test run after it's over

GetTestRunId ( ITSTest currentTest ) : int

gets the runId for the given test

GetTestRunLink ( ITSTest prevTest, int runid ) : string

gets a link string for the test run in Qc

GetTestRunLog ( ITSTest currentTest ) : string

retrieves the run logs for the test when the steps are not reported to Qc (like in ST)

GetTestStepsDescFromQc ( ITSTest test ) : string

summerizes test steps after test has run

GetTestType ( dynamic currentTest ) : string

gets the type for a QC test

GetTsStateFromQcState ( string qcTestStatus ) : TestState

translate the qc states into a state enum

UpdateCounters ( TestRunResults test, HpToolsLauncher.TestSuiteRunResults testSuite ) : void
UpdateTestStatus ( HpToolsLauncher.TestSuiteRunResults runResults, ITestSet targetTestSet, TestExecStatus testExecStatusObj, bool onlyUpdateState ) : TestRunResults

updates the test status in our list of tests

WriteTestRunSummary ( ITSTest prevTest ) : void

writes a summary of the test run after it's over

Method Details

AlmTestSetsRunner() public method

constructor
public AlmTestSetsRunner ( string qcServer, string qcUser, string qcPassword, string qcDomain, string qcProject, double intQcTimeout, QcRunMode enmQcRunMode, string runHost, List qcTestSets ) : System
qcServer string
qcUser string
qcPassword string
qcDomain string
qcProject string
intQcTimeout double
enmQcRunMode QcRunMode
runHost string
qcTestSets List
return System

ConnectToProject() public method

connects to QC and logs in
public ConnectToProject ( string QCServerURL, string QCLogin, string QCPass, string QCDomain, string QCProject ) : bool
QCServerURL string
QCLogin string
QCPass string
QCDomain string
QCProject string
return bool

Dispose() public method

public Dispose ( ) : void
return void

Dispose() public method

public Dispose ( bool managed ) : void
managed bool
return void

GetIdxByTestName() public method

gets test index given it's name
public GetIdxByTestName ( string strName, HpToolsLauncher.TestSuiteRunResults results ) : int
strName string
results HpToolsLauncher.TestSuiteRunResults
return int

Run() public method

runs the tests given to the object.
public Run ( ) : HpToolsLauncher.TestSuiteRunResults
return HpToolsLauncher.TestSuiteRunResults

RunTestSet() public method

runs a test set with given parameters (and a valid connection to the QC server)
public RunTestSet ( string tsFolderName, string tsName, double timeout, QcRunMode runMode, string runHost ) : HpToolsLauncher.TestSuiteRunResults
tsFolderName string testSet folder name
tsName string testSet name
timeout double -1 for unlimited, or number of miliseconds
runMode QcRunMode run on LocalMachine or remote
runHost string if run on remote machine - remote machine name
return HpToolsLauncher.TestSuiteRunResults