C# Class Microsoft.Protocols.TestManager.Kernel.Utility

Utility for the test suite manager.
显示文件 Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Properties

Property Type Description
LastRuleSelectionFilename string

Public Methods

Method Description
AbortExecution ( ) : void
ApplyAdaptersConfig ( ) : void

Applies the changes in the PtfAdapterView in the ptfconfig XML Documents.

ApplyDetectedRules ( ) : void

Apply the test case selection rules detected by the plug-in.

ApplyDetectedValues ( ) : void

Apply the property values detected by the plug-in.

ApplyPlaylist ( int &numberOfChecked, int &numberOfNotfound ) : void

Check the test cases in the playlist.

CreatePtfPropertyView ( ) : PtfPropertyView

Creates a PtfPropertyView for the UI.

ExportPlaylist ( Stream stream, bool checkedOnly ) : void

Export test cases to a Visual Studio playlist.

ExportPlaylist ( string filename, bool checkedOnly ) : void

Export test cases to a Visual Studio playlist.

FilterByKeyword ( string keyword ) : void

Filters test cases by keyword in name.

GeneratePlainTextReport ( List items, bool showOutcome, SortBy sortby, CaseListItem separator ) : string

Convert the list to plain text report

GenerateTextCaseListItems ( bool passed, bool failed, bool inconclusive, bool notrun ) : List

Generates plain text case list.

GetAdaptersView ( ) : List

Gets PtfAdapterView for the UI.

GetDetectSteps ( ) : List

Gets the auto-detection steps.

GetDetectionSummary ( ) : object

Get a object to show on the UI as the detection summary.

GetFilter ( ) : TestCaseFilter

Gets the TestCaseFilter object for current test suite.

GetLogger ( ) : Logger

Retrives the object of the logger.

GetPrerequisits ( ) : Microsoft.Protocols.TestManager.Kernel.PrerequisitView

Gets properties required for auto-detection.

GetSelectedCaseList ( ) : List

Gets a filtered test case list.

HideProperties ( ) : void

Gets the properties to hide from the plug-in.

ImportPlaylist ( Stream stream ) : void

Import a Play List

ImportPlaylist ( string filename ) : void

Import a Play List

InitializeDetector ( ) : void

Initializes the auto-detection plug-in.

InitializeTestEngine ( ) : void

Initializes the test engine

LoadProfileSettings ( string filename ) : void

Loads the configurations from a saved profile.

LoadPtfconfig ( ) : void

Loads PTF configuration.

LoadTestSuiteAssembly ( ) : void

Loads test suite assembly.

LoadTestSuiteConfig ( Microsoft.Protocols.TestManager.Kernel.TestSuiteInfo testSuiteInfo ) : void

Loads test suite configuration.

OpenDetectionLog ( ) : void

Opens the auto-detection log

ParseFileGetStatus ( string filePath, TestCaseStatus &status ) : bool

Parse the file content to get the case status Result format in file: "Result":"Result: Passed"

RemoveFilter ( ) : void

Removes the filter and show all selected test cases.

RemoveReadonly ( string file ) : void

Changes the read only attribute of a file.

RunAllTestCases ( ) : void

Runs all filtered test cases.

RunByCases ( List testcases ) : void

Runs specific test cases.

SaveLastProfile ( ) : void

Save the rule selection of current run.

SaveProfileSettings ( string filename ) : void

Saves the configurations as a profile.

SavePtfconfigToBinFolder ( ) : void

Saves the ptfconfig file back to the bin folder.

SavePtfconfigToSourceCode ( ) : void

Saves the ptfconfig files back to the source code folder.

SetPrerequisits ( ) : bool

Sets the property values required for auto-detection.

StartDetection ( DetectionCallback callback ) : void

Start the auto-detection

SyncRunByCases ( List testcases ) : void
Utility ( ) : System

Private Methods

Method Description
SetAdapterConfig ( ) : void

Method Details

AbortExecution() public method

public AbortExecution ( ) : void
return void

ApplyAdaptersConfig() public method

Applies the changes in the PtfAdapterView in the ptfconfig XML Documents.
public ApplyAdaptersConfig ( ) : void
return void

ApplyDetectedRules() public method

Apply the test case selection rules detected by the plug-in.
public ApplyDetectedRules ( ) : void
return void

ApplyDetectedValues() public method

Apply the property values detected by the plug-in.
public ApplyDetectedValues ( ) : void
return void

ApplyPlaylist() public method

Check the test cases in the playlist.
public ApplyPlaylist ( int &numberOfChecked, int &numberOfNotfound ) : void
numberOfChecked int Number of checked cases.
numberOfNotfound int Number of not found test cases in the list.
return void

CreatePtfPropertyView() public method

Creates a PtfPropertyView for the UI.
public CreatePtfPropertyView ( ) : PtfPropertyView
return PtfPropertyView

ExportPlaylist() public method

Export test cases to a Visual Studio playlist.
public ExportPlaylist ( Stream stream, bool checkedOnly ) : void
stream Stream A Stream
checkedOnly bool True if only export checked cases. False export all test cases.
return void

ExportPlaylist() public method

Export test cases to a Visual Studio playlist.
public ExportPlaylist ( string filename, bool checkedOnly ) : void
filename string The filename.
checkedOnly bool True if only export checked cases. False export all test cases.
return void

FilterByKeyword() public method

Filters test cases by keyword in name.
public FilterByKeyword ( string keyword ) : void
keyword string Keyword
return void

GeneratePlainTextReport() public static method

Convert the list to plain text report
public static GeneratePlainTextReport ( List items, bool showOutcome, SortBy sortby, CaseListItem separator ) : string
items List Case list
showOutcome bool shows test case outcome in the list
sortby SortBy The way of sorting items in the test case list
separator CaseListItem The style of the text file
return string

GenerateTextCaseListItems() public method

Generates plain text case list.
public GenerateTextCaseListItems ( bool passed, bool failed, bool inconclusive, bool notrun ) : List
passed bool Include passed test cases
failed bool Include failed test cases
inconclusive bool Include inconclusive test cases
notrun bool Include not run test cases
return List

GetAdaptersView() public method

Gets PtfAdapterView for the UI.
public GetAdaptersView ( ) : List
return List

GetDetectSteps() public method

Gets the auto-detection steps.
public GetDetectSteps ( ) : List
return List

GetDetectionSummary() public method

Get a object to show on the UI as the detection summary.
public GetDetectionSummary ( ) : object
return object

GetFilter() public method

Gets the TestCaseFilter object for current test suite.
public GetFilter ( ) : TestCaseFilter
return TestCaseFilter

GetLogger() public method

Retrives the object of the logger.
public GetLogger ( ) : Logger
return Logger

GetPrerequisits() public method

Gets properties required for auto-detection.
public GetPrerequisits ( ) : Microsoft.Protocols.TestManager.Kernel.PrerequisitView
return Microsoft.Protocols.TestManager.Kernel.PrerequisitView

GetSelectedCaseList() public method

Gets a filtered test case list.
public GetSelectedCaseList ( ) : List
return List

HideProperties() public method

Gets the properties to hide from the plug-in.
public HideProperties ( ) : void
return void

ImportPlaylist() public method

Import a Play List
public ImportPlaylist ( Stream stream ) : void
stream Stream A Stream
return void

ImportPlaylist() public method

Import a Play List
public ImportPlaylist ( string filename ) : void
filename string Filename
return void

InitializeDetector() public method

Initializes the auto-detection plug-in.
public InitializeDetector ( ) : void
return void

InitializeTestEngine() public method

Initializes the test engine
public InitializeTestEngine ( ) : void
return void

LoadProfileSettings() public method

Loads the configurations from a saved profile.
public LoadProfileSettings ( string filename ) : void
filename string File name
return void

LoadPtfconfig() public method

Loads PTF configuration.
public LoadPtfconfig ( ) : void
return void

LoadTestSuiteAssembly() public method

Loads test suite assembly.
public LoadTestSuiteAssembly ( ) : void
return void

LoadTestSuiteConfig() public method

Loads test suite configuration.
public LoadTestSuiteConfig ( Microsoft.Protocols.TestManager.Kernel.TestSuiteInfo testSuiteInfo ) : void
testSuiteInfo Microsoft.Protocols.TestManager.Kernel.TestSuiteInfo The information of a test suite
return void

OpenDetectionLog() public method

Opens the auto-detection log
public OpenDetectionLog ( ) : void
return void

ParseFileGetStatus() public static method

Parse the file content to get the case status Result format in file: "Result":"Result: Passed"
public static ParseFileGetStatus ( string filePath, TestCaseStatus &status ) : bool
filePath string
status TestCaseStatus
return bool

RemoveFilter() public method

Removes the filter and show all selected test cases.
public RemoveFilter ( ) : void
return void

RemoveReadonly() public static method

Changes the read only attribute of a file.
public static RemoveReadonly ( string file ) : void
file string The file to be removed the read only attribute
return void

RunAllTestCases() public method

Runs all filtered test cases.
public RunAllTestCases ( ) : void
return void

RunByCases() public method

Runs specific test cases.
public RunByCases ( List testcases ) : void
testcases List Test case
return void

SaveLastProfile() public method

Save the rule selection of current run.
public SaveLastProfile ( ) : void
return void

SaveProfileSettings() public method

Saves the configurations as a profile.
public SaveProfileSettings ( string filename ) : void
filename string File name
return void

SavePtfconfigToBinFolder() public method

Saves the ptfconfig file back to the bin folder.
public SavePtfconfigToBinFolder ( ) : void
return void

SavePtfconfigToSourceCode() public method

Saves the ptfconfig files back to the source code folder.
public SavePtfconfigToSourceCode ( ) : void
return void

SetPrerequisits() public method

Sets the property values required for auto-detection.
public SetPrerequisits ( ) : bool
return bool

StartDetection() public method

Start the auto-detection
public StartDetection ( DetectionCallback callback ) : void
callback DetectionCallback The call back function when the detection finished.
return void

SyncRunByCases() public method

public SyncRunByCases ( List testcases ) : void
testcases List
return void

Utility() public method

public Utility ( ) : System
return System

Property Details

LastRuleSelectionFilename public_oe property

public string LastRuleSelectionFilename
return string