Runner Class
A class that allows XJEase test functions in a project to be run.
Namespace: XJTAG.Integration.XJRunner
Syntax
public class Runner : IDisposable
Remarks
A Runner instance is obtained by calling GetRunner on a RunnerProject instance.
The Runner object provides the means to run XJEase functions that are part of your project. Call StartTesting or either RunTest or RunTests to run tests. Any calls to these methods will start any enabled logging, creating a new log file if required. Each call will count as a new run in the log file. The XJLink pins will start in a high-impedance state and the pin mapping is applied before the first test or function starts running.
Multiple Runner instances can be created per project, although each instance must be associated with a different XJLink.
This class implements the IDisposable interface. The selected XJLink will be unavailable for further use until this class is disposed. Disposing this class will leave the XJLink with its connection pins set to high-impedance.
Inheritance Hierarchy
- object
- IDisposable
Members
Properties
Name | Description |
---|---|
ContinueOnTestFailure | Gets or sets a value indicating whether to continue running further tests after a test fails. |
FormattedLoggingEnabled | Get or sets a value indicating whether a formatted log file containing test output will be created. |
FormattedLogPath | Gets the formatted log file path. This property will return null until a log file has been written. Calling BeginRunSession will return the value to null. |
GlobalVariables | Gets the XJEaseGlobals object associated with this Runner instance, which provides access to global XJEase variables. |
IsActive | Gets a value indicating whether the current instance is currently running code. |
LastStopMode | Gets a value specifying the reason why the last function finished. |
LastTestRunPassed | Gets a value indicating whether all the tests in the last test run passed. |
LogDirectory | Gets or sets the logging directory. Any relative paths are relative to the project file. |
OutputBox | Gets the XjtagOutputBox associated with this Runner instance, if any. If the instance was obtained via the GetRunner method then this property will be null. |
OutputFromLastTestRun | Gets the complete output from the last test run as a string. |
PlainTextLoggingEnabled | Get or sets a value indicating whether a plain text log file containing test output will be created. |
PlainTextLogPath | Gets the plain text log file path. This property will return null until a log file has been written. Calling BeginRunSession will return the value to null. |
ShowLogicDebug | Gets or sets a value indicating whether additional XJEase logic debug output is generated (displayed in the XjtagOutputBox if there is one, included in the log file(s) or included in the OutputFromLastTestRun). This output reports which pins are being used to read from or write to logic pins at runtime. |
ShowXJEaseDebug | Gets or sets a value indicating whether additional XJEase debug output is generated (displayed in the XjtagOutputBox if there is one, included in the log file(s) or included in the OutputFromLastTestRun). This output reports which pins are being selected to read and write nets at runtime. |
XJLink | Gets the XJLink associated with the Runner object. |
Events
Name | Description |
---|---|
ClearOutput | Occurs when the currently displayed output should be cleared. This event is fired from an arbitrary thread. |
DisplayInputBox | Occurs when a call to display an input box is made from the XJEase code. This event is fired from an arbitrary thread. |
DisplayMessageBox | Occurs when a call to display a message box is made from the XJEase code. This event is fired from an arbitrary thread. |
DisplayOpenFileDialog | Occurs when a call to display an open file dialog is made from the XJEase code. This event is fired from an arbitrary thread. |
DisplaySaveFileDialog | Occurs when a call to display a save file dialog is made from the XJEase code. This event is fired from an arbitrary thread. |
FunctionFinished | Occurs when a TestFunction finishes executing. This event is fired from an arbitrary thread. |
FunctionSkipped | Occurs when a TestFunction is skipped due to its Condition evaluating to false. |
FunctionStarted | Occurs when a TestFunction starts execution. |
TestingFinished | Occurs when all tests and TestFunctions have finished executing. This event is fired from an arbitrary thread. The event will occur before WaitForCompletion returns. |
TestingStarted | Occurs when this instance starts tests running. This event is fired from an arbitrary thread. |
TestingStopped | Occurs when a test run is manually stopped by the user. This event is fired from an arbitrary thread. The event will occur before WaitForCompletion returns. |
TextOutputGenerated | Occurs when text output is generated by the currently running XJEase TestFunction. This event is fired from an arbitrary thread. |
Methods
Name | Description |
---|---|
BeginRunSession | Starts a new run session. The output for all tests run after calling this method will be grouped as if they were a single test run, even if multiple calls to RunTests, RunTest, StartTesting, or StartTesting are made. This affects the text output and the output to any enabled log files. The run session is ended by calling EndRunSession, which also generates the summary table and writes any log files to disk. |
Dispose() | Frees resources used by this Runner instance. |
Dispose(bool) | Frees resources used by this Runner instance. |
EndRunSession | Ends any current run session begun by a call to BeginRunSession. The post-testing function is run (if defined), the summary table is generated and any log files are written to disk. The next time any tests or XJEase functions are run, or when the next run session is started using BeginRunSession, XJEase variables (including the serial number) will be reset. |
Equals(object) (from object) | |
Finalize (from object) | |
ForceRunTest | Runs the specified TestFunction ignoring any conditions set on the function or its test group. The XJEase function is run synchronously i.e. control does not return from this method until the function has completed. |
ForceStartTesting | Starts running the specified TestFunction ignoring any conditions attached to the test or its test group. The XJEase function is run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
GetHashCode (from object) | |
GetResultsFromTest(TestFunction) | Gets the results for a specific completed test from the previous test run. If the test was looped multiple times then results for each loop are returned. |
GetResultsFromTest(string, string) | Gets the results for a specific completed test from the previous test run. If the test was looped multiple times then results for each loop are returned. |
GetType (from object) | |
MemberwiseClone (from object) | |
RunFunction(string, object[], ref object[]) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase function is run synchronously i.e. control does not return from this method until the function has completed. |
RunFunction(string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase function is run synchronously, i.e. control does not return from this method until the function has completed. |
RunFunction(string, string, object[], ref object[]) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase function is run synchronously i.e. control does not return from this method until the function has completed. |
RunFunction(string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase function is run synchronously, i.e. control does not return from this method until the function has completed. |
RunFunctionInProfile(string, string, object[], ref object[]) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase function is run synchronously, i.e. control does not return from this method until all the function has completed. |
RunFunctionInProfile(string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase function is run synchronously, i.e. control does not return from this method until all the function has completed. |
RunFunctionInProfile(string, string, string, object[], ref object[]) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase function is run synchronously, i.e. control does not return from this method until all the function has completed. |
RunFunctionInProfile(string, string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase function is run synchronously, i.e. control does not return from this method until all the function has completed. |
RunTest | Runs the specified TestFunction. The XJEase function is run synchronously i.e. control does not return from this method until the function has completed. |
RunTests | Runs a set of tests and returns an overall pass/fail result. The XJEase functions are run synchronously i.e. control does not return from this method until all TestFunctions have completed. |
SetAsyncMessageBoxResult | Sends input to the running XJEase code representing the result of an async message box. |
SetInitialCircuitTckFrequency | Sets the initial TCK frequency (in Hz) for the associated project. |
SetInitialSubchainTckFrequency | Sets the initial TCK frequency (in Hz) for the given chain to run at. |
SetLogFilename | Overrides the filename for plain text and formatted log files. This is treated as relative to the LogDirectory. Any file extension will be replaced with .xjlog for formatted log files. If an absolute path is given then LogDirectory will be updated accordingly. |
StartFunction(string, object[], object[]) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase function is run asynchronously i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunction(string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunction(string, string, object[], object[]) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase function is run asynchronously i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunction(string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunctionInProfile(string, string, object[], object[]) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunctionInProfile(string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the project's circuit code files. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunctionInProfile(string, string, string, object[], object[]) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartFunctionInProfile(string, string, string, XJEaseParameterCollection, XJEaseParameterCollection) | Runs an XJEase function with the specified name from the given device's test device file. The XJEase functions are run asynchronously, i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartTesting(TestFunction) | Starts running the specified TestFunction. The XJEase function is run asynchronously i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StartTesting(TestCollection) | Starts running the specified TestCollection. The XJEase functions are run asynchronously i.e. control returns immediately from this method and the XJEase code continues to run on a separate thread. |
StopAndWaitForCompletion | Synchronously stops any XJEase tests or code that is currently running, and waits until completion before returning. |
StopFunction | Asynchronously request that XJEase code that is stopped. |
StopTesting | Asynchronously request that any XJEase tests that are currently running are stopped. |
TestInput | Supplies a character of input to the running XJEase code, allowing interaction with XJEase. |
ToString (from object) | |
WaitForCompletion() | Waits for any active test run on a background thread to complete. |
WaitForCompletion(TimeSpan) | Waits for the specified time period for any active test run on a background thread to complete. |
XJTAG v4.1.100