C# Class Microsoft.Test.UIAutomation.Logging.Logger

Static class wrapper for the different loggers
Exibir arquivo Open project: TestStack/UIAVerify

Public Methods

Method Description
CloseLog ( ) : void

EndTest ( ) : void

Specifies that a test is ending

LogComment ( object comment ) : void

Add a comment to the test summary

LogComment ( string format ) : void

Add a comment to the test summary

LogError ( Exception exception, bool TBD ) : void

Report that the test had an error

LogError ( string errorMessage ) : void

Report that the test had an error

LogPass ( ) : void

LogUnexpectedError ( Exception exception, bool displayTrace ) : void

MonitorProcess ( Process process ) : void

Some frameworks such as Piper will kill a process if it is closed incorrectly and hangs around. If the framework does not support this, it will NOP out there

ReportResults ( ) : void

Returns a report summary

SetLogger ( string logFile ) : void

Call to set the specific logger. There are some default loggers already defined. Use the LogTypes class for a list of them.

StartTest ( string testName ) : void

Specifies that a test is starting

Private Methods

Method Description
IsRunningUnderWTT ( ) : bool

TODO$: ClientTestRuntime should be able to do this in the future

SetLoggerType ( string filename ) : ILogger

Loads a logger DLL binary that impements WUIALogging interface. If you specify the LogTypes.DefaultLogger, then WttLogger will be loaded if the executable has INTERNAL in the name, else PIper logger will be loaded

ValidateLogger ( ) : void

Method Details

CloseLog() static public method

static public CloseLog ( ) : void
return void

EndTest() public static method

Specifies that a test is ending
public static EndTest ( ) : void
return void

LogComment() public static method

Add a comment to the test summary
public static LogComment ( object comment ) : void
comment object
return void

LogComment() public static method

Add a comment to the test summary
public static LogComment ( string format ) : void
format string The format string
return void

LogError() public static method

Report that the test had an error
public static LogError ( Exception exception, bool TBD ) : void
exception System.Exception
TBD bool
return void

LogError() public static method

Report that the test had an error
public static LogError ( string errorMessage ) : void
errorMessage string
return void

LogPass() public static method

public static LogPass ( ) : void
return void

LogUnexpectedError() public static method

public static LogUnexpectedError ( Exception exception, bool displayTrace ) : void
exception System.Exception
displayTrace bool
return void

MonitorProcess() public static method

Some frameworks such as Piper will kill a process if it is closed incorrectly and hangs around. If the framework does not support this, it will NOP out there
public static MonitorProcess ( Process process ) : void
process System.Diagnostics.Process
return void

ReportResults() public static method

Returns a report summary
public static ReportResults ( ) : void
return void

SetLogger() static public method

Call to set the specific logger. There are some default loggers already defined. Use the LogTypes class for a list of them.
static public SetLogger ( string logFile ) : void
logFile string Ful path and name of the log file
return void

StartTest() public static method

Specifies that a test is starting
public static StartTest ( string testName ) : void
testName string
return void