Test#
Measmatic test This class enables access to properties of a test.
property category#
Gets the test type's category
Returns#
| Type | Description |
|---|---|
| str | The test type's category |
property data_table#
Gets a reference to the data table with all measurement data collected by this test.
Returns#
| Type | Description |
|---|---|
| DataTable | The test's data table |
property description#
Gets the description for this type of test
Returns#
| Type | Description |
|---|---|
| str | The description for this type of test |
property file_path#
Gets the test's file path.
Returns#
| Type | Description |
|---|---|
| str | The test's file path. |
property guid#
Gets the unique identifier for the test.
Returns#
| Type | Description |
|---|---|
| str | The unique identifier for the test as GUID. |
property is_active#
Gets a value indicating whether the test is selected for execution in the test sequence.
Returns#
| Type | Description |
|---|---|
| bool | True if the test is selected for execution, otherwise False . |
property name#
Gets the name of the test.
Returns#
| Type | Description |
|---|---|
| str | The name of the test. |
property result#
Gets the test result as integer (0 = undefined, 1 = test passed, 2 = test failed)
Returns#
| Type | Description |
|---|---|
| int | 0 for undefined, 1 for test passed or 3 for test failed. |
property type#
Gets the test's type.
Returns#
| Type | Description |
|---|---|
| str | The test's type. |
property type_guid#
Gets the unique identifier of the test's type.
Returns#
| Type | Description |
|---|---|
| str | The unique identifier of the test's type as UUID. |
property was_executed#
Gets a value indicating whether the test was executed during the last run.
Returns#
| Type | Description |
|---|---|
| bool | true if the test was executed during the last run; otherwise, false . |
method export_data_by_index(export_filter_index: int)#
Exports the data available at this time using the specified export filter.
Parameters#
| Name | Description |
|---|---|
| export_filter_index | The zero-based index of the export filter setting defined for this test. |
Returns#
| Type | Description |
|---|---|
| str | The returned value of the export filter. |
Example#
Exports the test data using the first export filter setting defined in test UI
returned_string = measmatic.Test.export_data_by_index(0)
method export_data(export_setting_name: str)#
Exports the data available at this time using the specified export filter.
Parameters#
| Name | Description |
|---|---|
| export_setting_name | The export setting name of the export filter defined for this test. |
Returns#
| Type | Description |
|---|---|
| str | The returned value of the export filter. |
Example#
Exports the test data using the filter setting with name 'Data export 1' defined in test UI
returned_string = measmatic.Test.export_data("Data export 1")
method get_input_bool(control_id: str)#
Gets a boolean value that was defined in test user interface
Parameters#
| Name | Description |
|---|---|
| control_id | The identifier of the control in the test user interface |
Returns#
| Type | Description |
|---|---|
| bool | The value |
Example#
Gets the value set in a checkbox in the test user interface
is_checked = test.get_input_bool('checkbox-control-id')
method get_input_float(control_id: str)#
Gets a float value that was defined in test user interface
Parameters#
| Name | Description |
|---|---|
| control_id | The identifier of the control in the test user interface |
Returns#
| Type | Description |
|---|---|
| float | The value as float |
Example#
Gets the value set in an input in the test user interface
voltage = test.get_input_float('input-control-id')
method get_input_int(control_id: str)#
Gets an integer value that was defined in test user interface
Parameters#
| Name | Description |
|---|---|
| control_id | The identifier of the control in the test user interface |
Returns#
| Type | Description |
|---|---|
| int | The value as integer |
Example#
Gets the value set in an input in the test user interface
points = test.get_input_int('input-control-id')
method get_input_string(control_id: str)#
Gets a string value that was defined in test user interface
Parameters#
| Name | Description |
|---|---|
| control_id | The identifier of the control in the test user interface |
Returns#
| Type | Description |
|---|---|
| str | The value as string |
Example#
Gets the value set in an input in the test user interface
text = test.get_input_string('input-control-id')