UniTAP.dev.modules.dut_tests.dut_tests

class Test:

Class TestGroup describes template of usual test. Contains info of:

Test(name: str, test_id: int)
name
id
class TestGroup(typing.Generic[~DUTTestParameters]):

Class TestGroup describes template of usual test group. Contains info of:

test_count: int

Test count of test group.

Returns:

object of int type

tests

Returns tests.

Returns:

object of `` type

name: str

Returns test group name.

Returns:

object of str type

Returns ID of test group.

Returns:

object of id type

class DUTTests:

Class DUTTests allows working with available tests on the device.

DUTTests(dev_io: UniTAP.libs.lib_tsi.tsi_io.DeviceIO)
def run( self, group_id: UniTAP.dev.modules.dut_tests.test_info.TestGroupId, test_id: int, params: Optional[~DUTTestParameters] = None, print_fw_logs: bool = True, test_delay: int = 0) -> UniTAP.dev.modules.dut_tests.test_info.SubTestResultObject:

Run selected test of test group.

Arguments:
  • group_id (TestGroupId) - test group id
  • test_id (int)
  • params (DUTTestParameters) - one of the variants of params
  • print_fw_logs (bool) - print FW logs (enable/disable)
  • test_delay (int) - delay between tests (in seconds)
def get_params_from_file( self, path: str) -> Tuple[UniTAP.dev.modules.dut_tests.test_info.TestGroupId, int, ~DUTTestParameters]:

Get test parameters from transferred file: td or json (not cdf).

Arguments:
  • path ('str') - full path to config file
def get_params_from_cdf_file(self, path: str) -> ~DUTTestParameters:

Get test parameters from transferred file: json (cdf).

Arguments:
  • path ('str') - full path to config file
def get_default_parameters(self, group_type: Type[~DUTTestParameters]) -> ~DUTTestParameters:

Get predefined (default) parameters of test group.

Arguments:
  • group_type (DUTTestParameters) - test group id
Returns:

object of DUTTestParameters type

def number_tests_in_group( self, group_id: UniTAP.dev.modules.dut_tests.test_info.TestGroupId) -> int:

Returns all count of available tests of selected test group.

Arguments:
  • group_id (TestGroupId) - test group id
Returns:

object of int type

def get_test_name( self, group_id: UniTAP.dev.modules.dut_tests.test_info.TestGroupId, test_id: int) -> str:

Returns test name by test id in selected test group.

Arguments:
  • group_id (TestGroupId) - test group id
  • test_id (int) - test id
Returns:

object of str type

def get_test_id_by_name( self, group_id: UniTAP.dev.modules.dut_tests.test_info.TestGroupId, name: str) -> int:

Returns test ID by test name id in selected test group.

Arguments:
  • group_id (TestGroupId) - test group id
  • name (str) - test name or part name of the test
Returns:

object of int type

def get_test_id_list_by_name( self, group_id: UniTAP.dev.modules.dut_tests.test_info.TestGroupId, name: str) -> List[int]:

Returns list of test ID by test name id in selected test group.

Arguments:
  • group_id (TestGroupId) - test group id
  • name (str) - test name or part name of the test
Returns:

object of list[int] type

@staticmethod
def print_test_params(params: ~DUTTestParameters):

Print all test parameters in readable format.

Arguments:
  • params (DUTTestParameters) - type of params
def get_all_tests_results(self) -> UniTAP.dev.modules.dut_tests.test_info.TestResultObject:

Returns all test result. Combined in one TestResultObject object.

Returns:

object of TestResultObject type

def clear_results(self):

Clear all results.

info_of_available_test_groups: str

Returns all info in string format of test groups.

Returns:

object of str type

def make_report( self, path: str = 'Report.html', tested_by='', dut_driver_version='', dut_firmware_version='', dut_model_name='', dut_revision='', dut_serial_number='', remarks='', results=None):

Make report after testing.

Arguments:
  • path (str) - path to save report
  • tested_by (str) - who tested
  • dut_driver_version (str) - DUT driver version
  • dut_firmware_version (str) - DUT FW version
  • dut_model_name (str) - DUT model name
  • dut_revision (str) - DUT revision
  • dut_serial_number (str) - DUT serial number
  • remarks (int) - additional remarks of testing
  • results (list|None) - results of testing (if list is empty or None, usually use internal list of test
  • results, which was filled during testing)