TestCenter Reference
|
Package to provide logging functions. More...
Functions | |
def | setStopped (stopped) |
def | info (message, stack=False, type='', depth=0) |
Put an info message to the log. More... | |
def | infoHTML (message, type='', depth=0) |
Put an info message to the log while interpreting HTML. More... | |
def | warning (message, stack=False, type='', depth=0) |
Put a warning to the log. More... | |
def | warningHTML (message, type='', depth=0) |
Put a warning to the log while interpreting HTML. More... | |
def | error (message, stack=False, type='', depth=0) |
Put an error to the log. More... | |
def | errorHTML (message, type='', depth=0) |
Put an error to the log while interpreting HTML. More... | |
def | showImage (description, *files) |
Put the ImageShow command to the log. More... | |
def | showFile (description, *files) |
Put the FileShow command to the log. More... | |
def | showDiff (description, fromLines, toLines, showOnlyContextOfDiff=False, numberOfContextLines=10) |
Creates a HTML diff from the two files and puts the FileShow command to the log. More... | |
def | getStack (depth=0) |
Get the current stack. More... | |
Variables | |
bool | gStopOnFirstError = False |
bool | gStopped = False |
Package to provide logging functions.
def TestSupport.Logging.error | ( | message, | |
stack = False , |
|||
type = '' , |
|||
depth = 0 |
|||
) |
Put an error to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 121 of file Logging.py.
Referenced by TestSupport.Logging.errorHTML(), TestCenterAdvanced.Master.SlaveProcess.hasStarted(), TestCenterAdvanced.Master.SlaveProcess.logErrorWithPID(), TestCenterAdvanced.Master.Master.logErrorWithPID(), TestCenterAdvanced.Master.Master.logMessageWithLastError(), TestCenterAdvanced.Master.Master.onExit(), TestCenterAdvanced.Master.Master.run(), and TestCenterAdvanced.Master.Master.setPackages().
def TestSupport.Logging.errorHTML | ( | message, | |
type = '' , |
|||
depth = 0 |
|||
) |
Put an error to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 132 of file Logging.py.
References TestSupport.TestHelper.emitSpecialCommand(), TestSupport.Logging.error(), TestSupport.Logging.getStack(), TestSupport.Logging.showDiff(), TestSupport.Logging.showFile(), and TestSupport.Logging.showImage().
def TestSupport.Logging.getStack | ( | depth = 0 | ) |
Get the current stack.
There is the possibility to remove a given number of stack lines at the end of the list. This can be useful to remove unneccesary lines.
depth | Number of stack lines to exclude. |
Definition at line 215 of file Logging.py.
Referenced by TestSupport.Logging.errorHTML().
def TestSupport.Logging.info | ( | message, | |
stack = False , |
|||
type = '' , |
|||
depth = 0 |
|||
) |
Put an info message to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 78 of file Logging.py.
Referenced by TestCenterAdvanced.Master.Master.run(), and TestCenterAdvanced.Master.Master.stopSlave().
def TestSupport.Logging.infoHTML | ( | message, | |
type = '' , |
|||
depth = 0 |
|||
) |
Put an info message to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 89 of file Logging.py.
def TestSupport.Logging.setStopped | ( | stopped | ) |
Definition at line 36 of file Logging.py.
References TestSupport.TestHelper.emitSpecialMessage(), and TestSupport.Base.LoggingDecorator().
def TestSupport.Logging.showDiff | ( | description, | |
fromLines, | |||
toLines, | |||
showOnlyContextOfDiff = False , |
|||
numberOfContextLines = 10 |
|||
) |
Creates a HTML diff from the two files and puts the FileShow command to the log.
This command can be used to display the diff of two files. It will appear as link in the log file such that they can be downloaded.
description | A string that describes the diff. |
fromLines | The array containing the lines of the left string or a filename of an existing file. |
toLines | The array containing the lines of the right string or a filename of an existing file. |
showOnlyContextOfDiff | If true, then only the context lines around the diff are shown, otherwise the whole content is shown. |
numberOfContextLines | The number of context line only the diff context is shown. |
Definition at line 187 of file Logging.py.
Referenced by TestSupport.Logging.errorHTML().
def TestSupport.Logging.showFile | ( | description, | |
* | files | ||
) |
Put the FileShow command to the log.
This command can be used to display a set of files. They will appear as links in the log file such that they can be downloaded.
description | A message show with the images. |
files | Arbitrary number of arguments treated as file names. |
Definition at line 163 of file Logging.py.
Referenced by TestSupport.Logging.errorHTML().
def TestSupport.Logging.showImage | ( | description, | |
* | files | ||
) |
Put the ImageShow command to the log.
This command can be used to display a set of images in the report.
description | A message show with the images. |
files | Arbitrary number of arguments treated as file names. |
Definition at line 142 of file Logging.py.
Referenced by TestSupport.Logging.errorHTML().
def TestSupport.Logging.warning | ( | message, | |
stack = False , |
|||
type = '' , |
|||
depth = 0 |
|||
) |
Put a warning to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 99 of file Logging.py.
Referenced by TestCenterAdvanced.Master.Master.run(), and TestCenterAdvanced.Master.Master.setPackages().
def TestSupport.Logging.warningHTML | ( | message, | |
type = '' , |
|||
depth = 0 |
|||
) |
Put a warning to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 110 of file Logging.py.
bool TestSupport.Logging.gStopOnFirstError = False |
Definition at line 32 of file Logging.py.
bool TestSupport.Logging.gStopped = False |
Definition at line 34 of file Logging.py.