IScriptTestResult

class

IScriptTestResult.

IScriptTestResult

Bases: object

Functionality to access a test result.

element_under_test

Retrieves the tested element (TestCase or TestSeries).

Type

IScriptObject

start_time

Retrieves the start time of the test run.

Type

DateTime

end_time

Retrieves the end time of the test run or null, if the test run is not finished.

Type

DateTime?

task_cycle_time

Retrieves the cycle time of the task that executed the test

Type

string

operator_name

Retrieves or sets the operator name (entered by user).

Type

string

operator_comment

Retrieves or sets the operator comment (entered by user).

Type

string

result

Retrieves the result of the executed test. As long as the test is still running, the result will be TestResult.unknown . Poll execution_state to wait for test completion.

Type

execution_state

Retrieves the execution state ( TestExecutionState.running or TestExecutionState.finished ) Until test execution is finished, no meaningful result is available.

save_as_xml

path

Saves the result as an XML file to the specified path.

Parameters

path (string) -- The path of the file where to export to. If omitted, the test result is returned as string. (This parameter is optional.)

Returns

The exported XML as string, or null if a filepath is given.

Return type

string

save_as_html

path=None

xsltPath=None

Saves the result as an HTML file to the specified path.

Parameters
  • path (string) -- The path of the file we export to. If omitted, the test result is returned as string. (This parameter is optional.)

  • xsltPath (string) -- The path of the XSL transformation file to use. If omitted, we use the ETEST template for transformation. (This parameter is optional.)

Returns

The exported HTML as string, or null if a filepath is given.

Return type

string

test_count

Provides access to the number of tests in this result.