ExecuteTestsInterface Class Reference

#include <executetests.h>

Detailed Description

Interface to manually or automatically execute test.

Static Public Member Functions

static MAXON_METHOD maxon::Result< void > ExecuteLine (const maxon::String &line, const maxon::Url &location)
 
static MAXON_METHOD maxon::Result< void > ExecuteLines (const BaseArray< String > &lines, const Url &testfolder, TestsFinishedDelegate finished, TestsErrorDelegate error, LineDelegate line)
 
static MAXON_METHOD maxon::Result< void > ExecuteTests (const Url &testfile, const Url &testfolder, TestsFinishedDelegate finished, TestsErrorDelegate error, LineDelegate line)
 
static MAXON_METHOD maxon::Bool IsRunning ()
 
static MAXON_METHOD void Pause ()
 
static MAXON_METHOD maxon::Bool IsPaused ()
 
static MAXON_METHOD void Continue ()
 
static MAXON_METHOD void Stop ()
 
static MAXON_METHOD Result< void > AnalyzeFile (const Url &execFolder, const Url &testfile, Bool recursive, AutoExeArgs &functions, AutoExeArgs &commands, AutoExeArgs &classicCommands, AutoExeArgs &pyScripts)
 
static MAXON_METHOD Url GetPythonFolder ()
 
static MAXON_METHOD Bool IsBlocking (const String &ID, Bool contains)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (ExecuteTestsInterface, MAXON_REFERENCE_NONE, "net.sdktools.interfaces.executetests")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( ExecuteTestsInterface  ,
MAXON_REFERENCE_NONE  ,
"net.sdktools.interfaces.executetests"   
)
private

◆ ExecuteLine()

static MAXON_METHOD maxon::Result<void> ExecuteLine ( const maxon::String line,
const maxon::Url location 
)
static

Not yet implemented.

◆ ExecuteLines()

static MAXON_METHOD maxon::Result<void> ExecuteLines ( const BaseArray< String > &  lines,
const Url testfolder,
TestsFinishedDelegate  finished,
TestsErrorDelegate  error,
LineDelegate  line 
)
static

Not yet implemented.

◆ ExecuteTests()

static MAXON_METHOD maxon::Result<void> ExecuteTests ( const Url testfile,
const Url testfolder,
TestsFinishedDelegate  finished,
TestsErrorDelegate  error,
LineDelegate  line 
)
static

Loads the tests from the given file and starts execution. param[in] testfile The testfile to load. param[in] testfolder The folder to operate in. param[in] finished Delegate that will be called when the auto-execution finished. param[in] error Delegate that will be called when an error occurred. param[in] line Delegate that will be called when a new order is executed.

Returns
maxon::OK on success.

◆ IsRunning()

static MAXON_METHOD maxon::Bool IsRunning ( )
static

Returns the status.

Returns
true if auto-execution is running.

◆ Pause()

static MAXON_METHOD void Pause ( )
static

Pauses auto-execution.

◆ IsPaused()

static MAXON_METHOD maxon::Bool IsPaused ( )
static

Returns the status.

Returns
true if auto-execution is paused.

◆ Continue()

static MAXON_METHOD void Continue ( )
static

Continues paused auto-execution.

◆ Stop()

static MAXON_METHOD void Stop ( )
static

Stops auto-execution and frees all internal data.

◆ AnalyzeFile()

static MAXON_METHOD Result<void> AnalyzeFile ( const Url execFolder,
const Url testfile,
Bool  recursive,
AutoExeArgs functions,
AutoExeArgs commands,
AutoExeArgs classicCommands,
AutoExeArgs pyScripts 
)
static

Analyzes the given txt file and searches for functions, commands, etc.

Parameters
[in]execFolderThe folder to resolve relative commands.
[in]testfiletxt file to analyze.
[in]recursiveSet to true to also check referenced txt files.
[out]functionsList of found function IDs.
[out]commandsList of found command IDs.
[out]classicCommandsList of found classic command IDs.
[out]pyScriptsList of found Python-Scripts.
Returns
OK on success.

◆ GetPythonFolder()

static MAXON_METHOD Url GetPythonFolder ( )
static

Returns the working folder for Python scripts.

Returns
The Python folder.

◆ IsBlocking()

static MAXON_METHOD Bool IsBlocking ( const String ID,
Bool  contains 
)
static

Checks if the given ID or script file name is blocking. Blocking commands are defined in a file registered with the command line argument g_sdktools_blocking.

Parameters
[in]IDThe ID of a function or command or a Python script file.
[in]containsSet to false if the function should check for equality. Set to true if it should check if the ID is containd in the IDs.
Returns
True if blocking.