diff --git a/examples/chip-tool-darwin/templates/tests/tests.js b/examples/chip-tool-darwin/templates/tests/tests.js index 631f591f8ff06c..525feea7890b95 100644 --- a/examples/chip-tool-darwin/templates/tests/tests.js +++ b/examples/chip-tool-darwin/templates/tests/tests.js @@ -15,6 +15,9 @@ * limitations under the License. */ +const testPath = '../../../../src/app/tests/suites/'; +const TestSuite = require(testPath + 'tests.js'); + function getManualTests() { return []; @@ -23,384 +26,54 @@ function getManualTests() // clang-format off function getTests() { - const AccessControl = [ - 'TestAccessControlCluster', - ]; - - const BinaryInput = [ - 'Test_TC_BI_1_1', - 'Test_TC_BI_2_1', - 'Test_TC_BI_2_2', - ]; - - const BooleanState = [ - 'Test_TC_BOOL_1_1', - 'Test_TC_BOOL_2_1', - ]; - - const BridgedActions = [ - 'Test_TC_BRAC_1_1', - ]; - - const ColorControl = [ - 'Test_TC_CC_1_1', - 'Test_TC_CC_2_1', - 'Test_TC_CC_3_1', - 'Test_TC_CC_3_2', - 'Test_TC_CC_3_3', - 'Test_TC_CC_4_1', - 'Test_TC_CC_4_2', - 'Test_TC_CC_4_3', - 'Test_TC_CC_4_4', - 'Test_TC_CC_5_1', - 'Test_TC_CC_5_2', - 'Test_TC_CC_5_3', - 'Test_TC_CC_6_1', - 'Test_TC_CC_6_2', - 'Test_TC_CC_6_3', - 'Test_TC_CC_7_1', - 'Test_TC_CC_7_2', - 'Test_TC_CC_7_3', - 'Test_TC_CC_7_4', - 'Test_TC_CC_8_1', - 'Test_TC_CC_9_1', - 'Test_TC_CC_9_2', - 'Test_TC_CC_9_3', - ]; - - const DeviceDiscovery = [ - 'Test_TC_DD_1_5', - 'Test_TC_DD_1_6', - 'Test_TC_DD_1_7', - 'Test_TC_DD_1_8', - 'Test_TC_DD_1_9', - ]; - - const DeviceManagement = [ - 'Test_TC_DM_1_1', - 'Test_TC_DM_3_1', - 'Test_TC_DM_2_2', - ]; - - const ElectricalMeasurement = [ - 'Test_TC_EMR_1_1', - ]; - - const EthernetNetworkDiagnostics = [ - 'Test_TC_ETHDIAG_1_1', - 'Test_TC_ETHDIAG_2_1', - ]; - - const FlowMeasurement = [ - 'Test_TC_FLW_1_1', - 'Test_TC_FLW_2_1', - 'Test_TC_FLW_2_2', - ]; - - const GeneralCommissioning = [ - 'Test_TC_GC_1_1', - ]; - - const Identify = [ - 'Test_TC_I_1_1', - 'Test_TC_I_2_1', - 'Test_TC_I_2_3', - ]; - - const IlluminanceMeasurement = [ - 'Test_TC_ILL_1_1', - 'Test_TC_ILL_2_1', - ]; - - const OccupancySensing = [ - 'Test_TC_OCC_1_1', - 'Test_TC_OCC_2_1', - 'Test_TC_OCC_2_2', - ]; - const LevelControl = [ - 'Test_TC_LVL_1_1', - 'Test_TC_LVL_2_1', - 'Test_TC_LVL_2_2', - 'Test_TC_LVL_3_1', - 'Test_TC_LVL_4_1', - 'Test_TC_LVL_5_1', - 'Test_TC_LVL_6_1', - ]; + let tests = TestSuite.getTests(); - const UserLabel = [ - 'Test_TC_LC_1_2', - ]; + // TODO: These tests all need PairWithQRCode + tests.disable('Test_TC_MF_1_3'); + tests.disable('Test_TC_MF_1_4'); + tests.disable('Test_TC_MF_1_5'); + tests.disable('Test_TC_MF_1_6'); + tests.disable('Test_TC_MF_1_15'); - const MediaControl = [ - 'Test_TC_MC_1_1', - 'Test_TC_MC_1_2', - 'Test_TC_MC_1_3', - 'Test_TC_MC_1_4', - 'Test_TC_MC_1_5', - 'Test_TC_MC_1_6', - 'Test_TC_MC_1_7', - 'Test_TC_MC_1_8', - 'Test_TC_MC_1_9', - 'Test_TC_MC_1_10', - 'Test_TC_MC_1_11', - 'Test_TC_MC_1_12', - 'Test_TC_MC_2_1', - 'Test_TC_MC_3_1', - 'Test_TC_MC_3_2', - 'Test_TC_MC_3_3', - 'Test_TC_MC_3_4', - 'Test_TC_MC_3_5', - 'Test_TC_MC_3_6', - 'Test_TC_MC_3_7', - 'Test_TC_MC_3_8', - 'Test_TC_MC_3_9', - 'Test_TC_MC_3_10', - 'Test_TC_MC_3_11', - 'Test_TC_MC_5_1', - 'Test_TC_MC_5_2', - 'Test_TC_MC_5_3', - 'Test_TC_MC_6_1', - 'Test_TC_MC_6_2', - 'Test_TC_MC_6_3', - 'Test_TC_MC_6_4', - 'Test_TC_MC_7_1', - 'Test_TC_MC_7_2', - 'Test_TC_MC_8_1', - 'Test_TC_MC_9_1', - 'Test_TC_MC_10_1', - ]; + // TODO: This test needs FindCommissionable + tests.disable('Test_TC_SC_4_2'); - const ModeSelect = [ - 'Test_TC_MOD_1_1', - ]; + // TestClusterComplexTypes requires representing nullable optionals in ways + // that can differentiate missing and null, which Darwin can't right now. + tests.disable('TestClusterComplexTypes'); - const MultipleFabrics = [ - // TODO: These tests all need PairWithQRCode - //'Test_TC_MF_1_3', - //'Test_TC_MF_1_4', - //'Test_TC_MF_1_5', - //'Test_TC_MF_1_6', - //'Test_TC_MF_1_15', - ]; + // TODO: TestEvents not supported in the codegen yet. + tests.disable('TestEvents'); - const OnOff = [ - 'Test_TC_OO_1_1', - 'Test_TC_OO_2_1', - 'Test_TC_OO_2_2', - 'Test_TC_OO_2_3', - 'Test_TC_OO_2_4', - ]; + // TODO: TestDiscovery needs FindCommissionable + tests.disable('TestDiscovery'); - const PowerSource = [ - 'Test_TC_PS_1_1', - 'Test_TC_PS_2_1', - ]; + // TODO: TestConfigVariables not supported properly in codegen yet. + tests.disable('TestConfigVariables'); - const PressureMeasurement = [ - 'Test_TC_PRS_1_1', - 'Test_TC_PRS_2_1', - ]; + // TODO: TestGeneralCommissioning needs PairWithQRCode + tests.disable('TestGeneralCommissioning'); - const PumpConfigurationControl = [ - 'Test_TC_PCC_1_1', - 'Test_TC_PCC_2_1', - 'Test_TC_PCC_2_2', - 'Test_TC_PCC_2_3', - 'Test_TC_PCC_2_4', - ]; + // TODO: TestSystemCommands needs codegen changes or changes to the system + // command implementation. + tests.disable('TestSystemCommands'); - const PowerSourceConfiguration = [ - 'Test_TC_PSCFG_1_1', - ]; + // TODO: TestMultiAdmin needs PairWithQRCode + tests.disable('TestMultiAdmin'); - const RelativeHumidityMeasurement = [ - 'Test_TC_RH_1_1', - 'Test_TC_RH_2_1', - 'Test_TC_RH_2_2', - ]; + // TODO: DL_UsersAndCredentials needs some sort of codegen fixes to produce compiling code. + tests.disable('DL_UsersAndCredentials'); - const SecureChannel = [ - // TODO: This test needs FindCommissionable - //'Test_TC_SC_4_2', - ]; + // TODO: DL_Schedules needs some sort of codegen fixes to produce compiling code. + tests.disable('DL_Schedules'); - const Switch = [ - 'Test_TC_SWTCH_2_1', - 'Test_TC_SWTCH_2_2', - ]; + // TODO: TestGroupMessaging does not work on Darwin for now. + tests.disable('TestGroupMessaging'); - const TemperatureMeasurement = [ - 'Test_TC_TM_1_1', - 'Test_TC_TM_2_1', - 'Test_TC_TM_2_2', - ]; - - const Thermostat = [ - 'Test_TC_TSTAT_1_1', - 'Test_TC_TSTAT_2_1', - 'Test_TC_TSTAT_2_2', - ]; - - const ThermostatUserConfiguration = [ - 'Test_TC_TSUIC_1_1', - 'Test_TC_TSUIC_2_1', - 'Test_TC_TSUIC_2_2', - ]; - - const ThreadNetworkDiagnostics = [ - 'Test_TC_DIAG_TH_NW_1_1', - 'Test_TC_DIAG_TH_NW_1_2', - ]; - - const WiFiNetworkDiagnostics = [ - 'Test_TC_WIFIDIAG_1_1', - 'Test_TC_WIFIDIAG_3_1', - ]; - - const WindowCovering = [ - 'Test_TC_WNCV_1_1', - 'Test_TC_WNCV_2_1', - 'Test_TC_WNCV_2_2', - 'Test_TC_WNCV_2_3', - 'Test_TC_WNCV_2_4', - 'Test_TC_WNCV_2_5', - 'Test_TC_WNCV_3_1', - 'Test_TC_WNCV_3_2', - 'Test_TC_WNCV_3_3', - 'Test_TC_WNCV_3_4', - 'Test_TC_WNCV_3_5', - 'Test_TC_WNCV_4_1', - 'Test_TC_WNCV_4_2', - 'Test_TC_WNCV_4_3', - 'Test_TC_WNCV_4_4', - 'Test_TC_WNCV_4_5', - ]; - - const TV = [ - 'TV_TargetNavigatorCluster', - 'TV_AudioOutputCluster', - 'TV_ApplicationLauncherCluster', - 'TV_KeypadInputCluster', - 'TV_AccountLoginCluster', - 'TV_WakeOnLanCluster', - 'TV_ApplicationBasicCluster', - 'TV_MediaPlaybackCluster', - 'TV_ChannelCluster', - 'TV_LowPowerCluster', - 'TV_ContentLauncherCluster', - 'TV_MediaInputCluster', - ]; - - const Others = [ - 'TestCluster', - // TestClusterComplexTypes requires representing nullable optionals in ways - // that can differentiate missing and null, which Darwin can't right now. - //'TestClusterComplexTypes', - 'TestConstraints', - 'TestDelayCommands', - // TODO: TestEvents not supported in the codegen yet. - //'TestEvents', - // TODO: TestDiscovery needs FindCommissionable - //'TestDiscovery', - 'TestLogCommands', - 'TestSaveAs', - // TODO: TestConfigVariables not supported properly in codegen yet. - //'TestConfigVariables', - 'TestDescriptorCluster', - 'TestBasicInformation', - // TODO: TestGeneralCommissioning needs PairWithQRCode - //'TestGeneralCommissioning', - 'TestIdentifyCluster', - 'TestOperationalCredentialsCluster', - 'TestModeSelectCluster', - 'TestSelfFabricRemoval', - // TODO: TestSystemCommands needs codegen changes or changes to the system - // command implementation. - //'TestSystemCommands', - 'TestBinding', - 'TestUserLabelCluster', - 'TestArmFailSafe', - ]; - - const MultiAdmin = [ - // TODO: TestMultiAdmin needs PairWithQRCode - //'TestMultiAdmin', - ]; - - const SoftwareDiagnostics = [ - 'Test_TC_SWDIAG_1_1', - 'Test_TC_SWDIAG_2_1', - 'Test_TC_SWDIAG_3_1', - ]; - - const Subscriptions = [ - 'TestSubscribe_OnOff', - ]; - - const DoorLock = [ - // TODO: DL_UsersAndCredentials needs some sort of codegen fixes to produce compiling code. - //'DL_UsersAndCredentials', - 'DL_LockUnlock', - // TODO: DL_Schedules needs some sort of codegen fixes to produce compiling code. - //'DL_Schedules', - 'Test_TC_DL_1_3', - ]; - - const Groups = [ - // TestGroupMessaging does not work on Darwin for now. - //'TestGroupMessaging', - 'TestGroupsCluster', - 'TestGroupKeyManagementCluster', - ]; - - const tests = [ - AccessControl, // - BinaryInput, // - BooleanState, // - BridgedActions, // - ColorControl, // - DeviceDiscovery, // - DeviceManagement, // - ElectricalMeasurement, // - EthernetNetworkDiagnostics, // - FlowMeasurement, // - GeneralCommissioning, // - Identify, // - IlluminanceMeasurement, // - LevelControl, // - MediaControl, // - ModeSelect, // - MultipleFabrics, // - OccupancySensing, // - OnOff, // - PowerSource, // - PressureMeasurement, // - PumpConfigurationControl, // - PowerSourceConfiguration, // - RelativeHumidityMeasurement, // - SecureChannel, // - Switch, // - TemperatureMeasurement, // - Thermostat, // - ThermostatUserConfiguration, // - ThreadNetworkDiagnostics, // - UserLabel, // - WiFiNetworkDiagnostics, // - WindowCovering, // - TV, // - Others, // - MultiAdmin, // - SoftwareDiagnostics, // - Subscriptions, // - DoorLock, // - Groups, // - ]; - return tests.flat(1); + return tests; } -// clang-format on - // // Module exports // diff --git a/examples/chip-tool/templates/tests/tests.js b/examples/chip-tool/templates/tests/tests.js index 65e9a23f99fa2b..2f4df96281d27b 100644 --- a/examples/chip-tool/templates/tests/tests.js +++ b/examples/chip-tool/templates/tests/tests.js @@ -15,748 +15,17 @@ * limitations under the License. */ +const testPath = '../../../../src/app/tests/suites/'; +const TestSuite = require(testPath + 'tests.js'); + function getManualTests() { - const DeviceDiscovery = [ - 'Test_TC_DD_1_5', - 'Test_TC_DD_1_6', - 'Test_TC_DD_1_7', - 'Test_TC_DD_1_8', - 'Test_TC_DD_1_9', - 'Test_TC_DD_1_10', - 'Test_TC_DD_1_11', - 'Test_TC_DD_1_12', - 'Test_TC_DD_2_1', - 'Test_TC_DD_2_2', - 'Test_TC_DD_3_1', - 'Test_TC_DD_3_2', - 'Test_TC_DD_3_3', - 'Test_TC_DD_3_4', - 'Test_TC_DD_3_5', - 'Test_TC_DD_3_6', - 'Test_TC_DD_3_7', - 'Test_TC_DD_3_8', - 'Test_TC_DD_3_9', - 'Test_TC_DD_3_10', - 'Test_TC_DD_3_11', - 'Test_TC_DD_3_12', - 'Test_TC_DD_3_13', - 'Test_TC_DD_3_14', - 'Test_TC_DD_4_1', - ]; - - const Groups = [ - 'TestGroupDemoCommand', - 'TestGroupDemoConfig', - ]; - - const BulkDataExchangeProtocol = [ - 'Test_TC_BDX_1_1', - 'Test_TC_BDX_1_2', - 'Test_TC_BDX_1_3', - 'Test_TC_BDX_1_4', - 'Test_TC_BDX_1_5', - 'Test_TC_BDX_1_6', - 'Test_TC_BDX_2_1', - 'Test_TC_BDX_2_2', - 'Test_TC_BDX_2_3', - 'Test_TC_BDX_2_4', - 'Test_TC_BDX_2_5', - ]; - - const bridge = [ - 'Test_TC_BR_1', - 'Test_TC_BR_2', - 'Test_TC_BR_3', - ]; - - const BridgedActions = [ - 'Test_TC_BRAC_2_1', - 'Test_TC_BRAC_2_2', - 'Test_TC_BRAC_3_1', - ]; - - const DeviceManagement = [ - 'Test_TC_DM_1_2', - 'Test_TC_DM_1_4', - 'Test_TC_DM_2_1', - 'Test_TC_DM_2_3', - 'Test_TC_DM_2_4', - 'Test_TC_DM_3_2', - 'Test_TC_DM_3_4', - ]; - - const DiagnosticsLogs = [ - 'Test_TC_Diag_Log_2_1', - 'Test_TC_Diag_Log_2_2', - 'Test_TC_Diag_Log_2_3', - ]; - - const Descriptor = [ - 'Test_TC_DESC_1_1', - ]; - - const EthernetNetworkDiagnostics = [ - 'Test_TC_ETHDIAG_1_2', - ]; - - const GeneralCommissioning = [ - 'Test_TC_GC_2_2', - 'Test_TC_GC_2_3', - 'Test_TC_GC_2_4', - ]; - - const GeneralDiagnostics = [ - 'Test_TC_GENDIAG_1_1', - 'Test_TC_GENDIAG_1_2', - 'Test_TC_GENDIAG_2_1', - ]; - - const Identify = [ - 'Test_TC_I_2_2', - 'Test_TC_I_3_1', - 'Test_TC_I_3_2', - ]; - - const IlluminanceMeasurement = [ - 'Test_TC_ILL_2_2', - 'Test_TC_ILL_3_1', - ]; - - const InteractionDataModel = [ - 'Test_TC_IDM_1_1', - 'Test_TC_IDM_1_2', - 'Test_TC_IDM_2_1', - 'Test_TC_IDM_2_2', - 'Test_TC_IDM_3_1', - 'Test_TC_IDM_3_2', - 'Test_TC_IDM_4_1', - 'Test_TC_IDM_4_2', - 'Test_TC_IDM_5_1', - 'Test_TC_IDM_5_2', - 'Test_TC_IDM_6_1', - 'Test_TC_IDM_6_2', - 'Test_TC_IDM_6_3', - 'Test_TC_IDM_6_4', - 'Test_TC_IDM_7_1', - ]; - - const MediaControl = [ - 'Test_TC_MC_2_2', - 'Test_TC_MC_3_12', - 'Test_TC_MC_3_13', - 'Test_TC_MC_4_1', - 'Test_TC_MC_8_2', - 'Test_TC_MC_9_2', - 'Test_TC_MC_10_2', - 'Test_TC_MC_10_3', - 'Test_TC_MC_10_4', - 'Test_TC_MC_10_5', - 'Test_TC_MC_10_6', - 'Test_TC_MC_10_7', - ]; - - const MultipleFabrics = [ - 'Test_TC_MF_1_1', - 'Test_TC_MF_1_2', - 'Test_TC_MF_1_7', - 'Test_TC_MF_1_8', - 'Test_TC_MF_1_9', - 'Test_TC_MF_1_10', - 'Test_TC_MF_1_11', - 'Test_TC_MF_1_12', - 'Test_TC_MF_1_13', - 'Test_TC_MF_1_14', - 'Test_TC_MF_1_16', - 'Test_TC_MF_1_17', - 'Test_TC_MF_1_18', - 'Test_TC_MF_1_19', - 'Test_TC_MF_1_20', - 'Test_TC_MF_1_21', - 'Test_TC_MF_1_22', - 'Test_TC_MF_1_23', - 'Test_TC_MF_1_24', - 'Test_TC_MF_1_25', - 'Test_TC_MF_1_26', - 'Test_TC_MF_1_27', - 'Test_TC_MF_1_28', - ]; - - const ModeSelect = [ - 'Test_TC_MOD_1_2', - 'Test_TC_MOD_1_3', - 'Test_TC_MOD_2_1', - 'Test_TC_MOD_2_2', - 'Test_TC_MOD_3_1', - 'Test_TC_MOD_3_2', - 'Test_TC_MOD_3_3', - ]; - - const OTASoftwareUpdate = [ - 'Test_TC_SU_1_1', - 'Test_TC_SU_2_1', - 'Test_TC_SU_2_2', - 'Test_TC_SU_2_3', - 'Test_TC_SU_2_4', - 'Test_TC_SU_2_5', - 'Test_TC_SU_2_6', - 'Test_TC_SU_2_7', - 'Test_TC_SU_3_1', - 'Test_TC_SU_3_2', - 'Test_TC_SU_3_3', - 'Test_TC_SU_3_4', - 'Test_TC_SU_4_1', - 'Test_TC_SU_4_2', - ]; - - const PowerSourceConfiguration = [ - 'Test_TC_PSCFG_2_1', - 'Test_TC_PSCFG_2_2', - 'Test_TC_PSCFG_3_1', - ]; - - const SecureChannel = [ - 'Test_TC_SC_4_1', - 'Test_TC_SC_4_3', - 'Test_TC_SC_4_4', - 'Test_TC_SC_4_5', - 'Test_TC_SC_4_6', - 'Test_TC_SC_4_7', - 'Test_TC_SC_4_8', - 'Test_TC_SC_4_9', - 'Test_TC_SC_4_10', - ]; - - const SoftwareDiagnostics = [ - 'Test_TC_SWDIAG_1_2', - ]; - - const WiFiNetworkDiagnostics = [ - 'Test_TC_WIFIDIAG_1_2', - 'Test_TC_WIFIDIAG_2_1', - ]; - - const WindowCovering = [ - 'Test_TC_WNCV_6_1', - 'Test_TC_WNCV_7_1', - ]; - - const FlowMeasurement = [ - 'Test_TC_FLW_3_1', - ]; - - const OccupancySensing = [ - 'Test_TC_OCC_2_3', - 'Test_TC_OCC_2_4', - 'Test_TC_OCC_3_1', - 'Test_TC_OCC_3_2', - ]; - - const PressureMeasurement = [ - 'Test_TC_PRS_2_2', - 'Test_TC_PRS_2_3', - 'Test_TC_PRS_3_1', - ]; - - const PowerSource = [ - 'Test_TC_PS_2_2', - 'Test_TC_PS_3_1', - ]; - - const BooleanState = [ - 'Test_TC_BOOL_2_2', - 'Test_TC_BOOL_3_1', - ]; - - const ColorControl = [ - 'Test_TC_CC_2_2', - 'Test_TC_CC_3_4', - 'Test_TC_CC_4_5', - 'Test_TC_CC_5_4', - 'Test_TC_CC_6_4', - 'Test_TC_CC_7_5', - 'Test_TC_CC_9_4', - ]; - - const DoorLock = [ - 'Test_TC_DL_2_1', - 'Test_TC_DL_2_2', - 'Test_TC_DL_2_4', - 'Test_TC_DL_2_5', - 'Test_TC_DL_2_6', - 'Test_TC_DL_2_7', - 'Test_TC_DL_2_8', - 'Test_TC_DL_2_10', - 'Test_TC_DL_2_11', - 'Test_TC_DL_2_13', - 'Test_TC_DL_2_14', - 'Test_TC_DL_2_15', - 'Test_TC_DL_2_16', - 'Test_TC_DL_2_17', - ]; - - const UserLabel = [ - 'Test_TC_LC_1_1', - 'Test_TC_LC_2_3', - 'Test_TC_LC_2_4', - 'Test_TC_LC_2_5', - ]; - - const LocalizationConfiguration = [ - 'Test_TC_LO_1_1', - ]; - - const LevelControl = [ - 'Test_TC_LVL_2_3', - ]; - - const NetworkCommissioning = [ - 'Test_TC_NC_1_1', - 'Test_TC_NC_1_2', - 'Test_TC_NC_1_3', - 'Test_TC_NC_1_4', - 'Test_TC_NC_1_5', - 'Test_TC_NC_1_6', - 'Test_TC_NC_1_7', - 'Test_TC_NC_1_8', - 'Test_TC_NC_1_9', - 'Test_TC_NC_1_10', - 'Test_TC_NC_1_11', - 'Test_TC_NC_1_12', - 'Test_TC_NC_1_13', - 'Test_TC_NC_1_14', - 'Test_TC_NC_1_15', - 'Test_TC_NC_1_16', - 'Test_TC_NC_1_17', - 'Test_TC_NC_1_18', - ]; - - const OnOff = [ - 'Test_TC_OO_3_1', - 'Test_TC_OO_3_2', - ]; - - const RelativeHumidityMeasurement = [ - 'Test_TC_RH_3_1', - ]; - - const Switch = [ - 'Test_TC_SWTCH_1_1', - 'Test_TC_SWTCH_3_1', - ]; - - const TemperatureMeasurement = [ - 'Test_TC_TM_3_1', - ]; - - const Thermostat = [ - 'Test_TC_TSTAT_3_1', - 'Test_TC_TSTAT_3_2', - ]; - - const ThermostatUserConfiguration = [ - 'Test_TC_TSUIC_3_1', - ]; - - const tests = [ - DeviceDiscovery, // - Groups, // - BulkDataExchangeProtocol, // - bridge, // - BridgedActions, // - DeviceManagement, // - DiagnosticsLogs, // - Descriptor, // - EthernetNetworkDiagnostics, // - GeneralCommissioning, // - GeneralDiagnostics, // - Identify, // - IlluminanceMeasurement, // - InteractionDataModel, // - MediaControl, // - MultipleFabrics, // - ModeSelect, // - OTASoftwareUpdate, // - PowerSourceConfiguration, // - SecureChannel, // - SoftwareDiagnostics, // - WiFiNetworkDiagnostics, // - WindowCovering, // - FlowMeasurement, // - OccupancySensing, // - PressureMeasurement, // - PowerSource, // - BooleanState, // - ColorControl, // - DoorLock, // - UserLabel, // - LocalizationConfiguration, // - LevelControl, // - NetworkCommissioning, // - OnOff, // - RelativeHumidityMeasurement, // - Switch, // - TemperatureMeasurement, // - Thermostat, // - ThermostatUserConfiguration, // - - ]; - return tests.flat(1); + return TestSuite.getManualTests(); } function getTests() { - const AccessControl = [ - 'TestAccessControlCluster', - ]; - - const BinaryInput = [ - 'Test_TC_BI_1_1', - 'Test_TC_BI_2_1', - 'Test_TC_BI_2_2', - ]; - - const BooleanState = [ - 'Test_TC_BOOL_1_1', - 'Test_TC_BOOL_2_1', - ]; - - const BridgedActions = [ - 'Test_TC_BRAC_1_1', - ]; - - const ColorControl = [ - 'Test_TC_CC_1_1', - 'Test_TC_CC_2_1', - 'Test_TC_CC_3_1', - 'Test_TC_CC_3_2', - 'Test_TC_CC_3_3', - 'Test_TC_CC_4_1', - 'Test_TC_CC_4_2', - 'Test_TC_CC_4_3', - 'Test_TC_CC_4_4', - 'Test_TC_CC_5_1', - 'Test_TC_CC_5_2', - 'Test_TC_CC_5_3', - 'Test_TC_CC_6_1', - 'Test_TC_CC_6_2', - 'Test_TC_CC_6_3', - 'Test_TC_CC_7_1', - 'Test_TC_CC_7_2', - 'Test_TC_CC_7_3', - 'Test_TC_CC_7_4', - 'Test_TC_CC_8_1', - 'Test_TC_CC_9_1', - 'Test_TC_CC_9_2', - 'Test_TC_CC_9_3', - ]; - - const DeviceManagement = [ - 'Test_TC_DM_1_1', - 'Test_TC_DM_3_1', - 'Test_TC_DM_2_2', - ]; - - const ElectricalMeasurement = [ - 'Test_TC_EMR_1_1', - ]; - - const EthernetNetworkDiagnostics = [ - 'Test_TC_ETHDIAG_1_1', - 'Test_TC_ETHDIAG_2_1', - ]; - - const FlowMeasurement = [ - 'Test_TC_FLW_1_1', - 'Test_TC_FLW_2_1', - 'Test_TC_FLW_2_2', - ]; - - const GeneralCommissioning = [ - 'Test_TC_GC_1_1', - ]; - - const Identify = [ - 'Test_TC_I_1_1', - 'Test_TC_I_2_1', - 'Test_TC_I_2_3', - ]; - - const IlluminanceMeasurement = [ - 'Test_TC_ILL_1_1', - 'Test_TC_ILL_2_1', - ]; - - const OccupancySensing = [ - 'Test_TC_OCC_1_1', - 'Test_TC_OCC_2_1', - 'Test_TC_OCC_2_2', - ]; - - const LevelControl = [ - 'Test_TC_LVL_1_1', - 'Test_TC_LVL_2_1', - 'Test_TC_LVL_2_2', - 'Test_TC_LVL_3_1', - 'Test_TC_LVL_4_1', - 'Test_TC_LVL_5_1', - 'Test_TC_LVL_6_1', - ]; - - const UserLabel = [ - 'Test_TC_LC_1_2', - ]; - - const MediaControl = [ - 'Test_TC_MC_1_1', - 'Test_TC_MC_1_2', - 'Test_TC_MC_1_3', - 'Test_TC_MC_1_4', - 'Test_TC_MC_1_5', - 'Test_TC_MC_1_6', - 'Test_TC_MC_1_7', - 'Test_TC_MC_1_8', - 'Test_TC_MC_1_9', - 'Test_TC_MC_1_10', - 'Test_TC_MC_1_11', - 'Test_TC_MC_1_12', - 'Test_TC_MC_2_1', - 'Test_TC_MC_3_1', - 'Test_TC_MC_3_2', - 'Test_TC_MC_3_3', - 'Test_TC_MC_3_4', - 'Test_TC_MC_3_5', - 'Test_TC_MC_3_6', - 'Test_TC_MC_3_7', - 'Test_TC_MC_3_8', - 'Test_TC_MC_3_9', - 'Test_TC_MC_3_10', - 'Test_TC_MC_3_11', - 'Test_TC_MC_5_1', - 'Test_TC_MC_5_2', - 'Test_TC_MC_5_3', - 'Test_TC_MC_6_1', - 'Test_TC_MC_6_2', - 'Test_TC_MC_6_3', - 'Test_TC_MC_6_4', - 'Test_TC_MC_7_1', - 'Test_TC_MC_7_2', - 'Test_TC_MC_8_1', - 'Test_TC_MC_9_1', - 'Test_TC_MC_10_1', - ]; - - const ModeSelect = [ - 'Test_TC_MOD_1_1', - ]; - - const MultipleFabrics = [ - 'Test_TC_MF_1_3', - 'Test_TC_MF_1_4', - 'Test_TC_MF_1_5', - 'Test_TC_MF_1_6', - 'Test_TC_MF_1_15', - ]; - - const OnOff = [ - 'Test_TC_OO_1_1', - 'Test_TC_OO_2_1', - 'Test_TC_OO_2_2', - 'Test_TC_OO_2_3', - 'Test_TC_OO_2_4', - ]; - - const PowerSource = [ - 'Test_TC_PS_1_1', - 'Test_TC_PS_2_1', - ]; - - const PressureMeasurement = [ - 'Test_TC_PRS_1_1', - 'Test_TC_PRS_2_1', - ]; - - const PumpConfigurationControl = [ - 'Test_TC_PCC_1_1', - 'Test_TC_PCC_2_1', - 'Test_TC_PCC_2_2', - 'Test_TC_PCC_2_3', - 'Test_TC_PCC_2_4', - ]; - - const PowerSourceConfiguration = [ - 'Test_TC_PSCFG_1_1', - ]; - - const RelativeHumidityMeasurement = [ - 'Test_TC_RH_1_1', - 'Test_TC_RH_2_1', - 'Test_TC_RH_2_2', - ]; - - const SecureChannel = [ - 'Test_TC_SC_4_2', - ]; - - const Switch = [ - 'Test_TC_SWTCH_2_1', - 'Test_TC_SWTCH_2_2', - ]; - - const TemperatureMeasurement = [ - 'Test_TC_TM_1_1', - 'Test_TC_TM_2_1', - 'Test_TC_TM_2_2', - ]; - - const Thermostat = [ - 'Test_TC_TSTAT_1_1', - 'Test_TC_TSTAT_2_1', - 'Test_TC_TSTAT_2_2', - ]; - - const ThermostatUserConfiguration = [ - 'Test_TC_TSUIC_1_1', - 'Test_TC_TSUIC_2_1', - 'Test_TC_TSUIC_2_2', - ]; - - const ThreadNetworkDiagnostics = [ - 'Test_TC_DIAG_TH_NW_1_1', - 'Test_TC_DIAG_TH_NW_1_2', - ]; - - const WiFiNetworkDiagnostics = [ - 'Test_TC_WIFIDIAG_1_1', - 'Test_TC_WIFIDIAG_3_1', - ]; - - const WindowCovering = [ - 'Test_TC_WNCV_1_1', - 'Test_TC_WNCV_2_1', - 'Test_TC_WNCV_2_2', - 'Test_TC_WNCV_2_3', - 'Test_TC_WNCV_2_4', - 'Test_TC_WNCV_2_5', - 'Test_TC_WNCV_3_1', - 'Test_TC_WNCV_3_2', - 'Test_TC_WNCV_3_3', - 'Test_TC_WNCV_3_4', - 'Test_TC_WNCV_3_5', - 'Test_TC_WNCV_4_1', - 'Test_TC_WNCV_4_2', - 'Test_TC_WNCV_4_3', - 'Test_TC_WNCV_4_4', - 'Test_TC_WNCV_4_5', - ]; - - const TV = [ - 'TV_TargetNavigatorCluster', - 'TV_AudioOutputCluster', - 'TV_ApplicationLauncherCluster', - 'TV_KeypadInputCluster', - 'TV_AccountLoginCluster', - 'TV_WakeOnLanCluster', - 'TV_ApplicationBasicCluster', - 'TV_MediaPlaybackCluster', - 'TV_ChannelCluster', - 'TV_LowPowerCluster', - 'TV_ContentLauncherCluster', - 'TV_MediaInputCluster', - ]; - - const Others = [ - 'TestCluster', - 'TestClusterComplexTypes', - 'TestConstraints', - 'TestDelayCommands', - 'TestEvents', - 'TestDiscovery', - 'TestLogCommands', - 'TestSaveAs', - 'TestConfigVariables', - 'TestDescriptorCluster', - 'TestBasicInformation', - 'TestGeneralCommissioning', - 'TestIdentifyCluster', - 'TestOperationalCredentialsCluster', - 'TestModeSelectCluster', - 'TestSelfFabricRemoval', - 'TestSystemCommands', - 'TestBinding', - 'TestUserLabelCluster', - 'TestArmFailSafe', - ]; - - const MultiAdmin = [ - 'TestMultiAdmin', - ]; - - const SoftwareDiagnostics = [ - 'Test_TC_SWDIAG_1_1', - 'Test_TC_SWDIAG_2_1', - 'Test_TC_SWDIAG_3_1', - ]; - - const Subscriptions = [ - 'TestSubscribe_OnOff', - ]; - - const DoorLock = [ - 'DL_UsersAndCredentials', - 'DL_LockUnlock', - 'DL_Schedules', - 'Test_TC_DL_1_3', - ]; - - const Groups = [ - 'TestGroupMessaging', - 'TestGroupsCluster', - 'TestGroupKeyManagementCluster', - ]; - - const tests = [ - AccessControl, // - BinaryInput, // - BooleanState, // - BridgedActions, // - ColorControl, // - DeviceManagement, // - ElectricalMeasurement, // - EthernetNetworkDiagnostics, // - FlowMeasurement, // - GeneralCommissioning, // - Identify, // - IlluminanceMeasurement, // - LevelControl, // - MediaControl, // - ModeSelect, // - MultipleFabrics, // - OccupancySensing, // - OnOff, // - PowerSource, // - PressureMeasurement, // - PumpConfigurationControl, // - PowerSourceConfiguration, // - RelativeHumidityMeasurement, // - SecureChannel, // - Switch, // - TemperatureMeasurement, // - Thermostat, // - ThermostatUserConfiguration, // - ThreadNetworkDiagnostics, // - UserLabel, // - WiFiNetworkDiagnostics, // - WindowCovering, // - TV, // - Others, // - MultiAdmin, // - SoftwareDiagnostics, // - Subscriptions, // - DoorLock, // - Groups, // - ]; - return tests.flat(1); + return TestSuite.getTests(); } // diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js new file mode 100644 index 00000000000000..6c2e17fff3f26e --- /dev/null +++ b/src/app/tests/suites/tests.js @@ -0,0 +1,784 @@ +/* + * + * Copyright (c) 2021-2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function disable(testName) +{ + const index = this.indexOf(testName); + if (index == -1) { + const errStr = `Test ${testName} does not exists.`; + throw new Error(errStr); + } + + this.splice(index, 1); +} + +// clang-format off + +function getManualTests() +{ + const DeviceDiscovery = [ + 'Test_TC_DD_1_5', + 'Test_TC_DD_1_6', + 'Test_TC_DD_1_7', + 'Test_TC_DD_1_8', + 'Test_TC_DD_1_9', + 'Test_TC_DD_1_10', + 'Test_TC_DD_1_11', + 'Test_TC_DD_1_12', + 'Test_TC_DD_2_1', + 'Test_TC_DD_2_2', + 'Test_TC_DD_3_1', + 'Test_TC_DD_3_2', + 'Test_TC_DD_3_3', + 'Test_TC_DD_3_4', + 'Test_TC_DD_3_5', + 'Test_TC_DD_3_6', + 'Test_TC_DD_3_7', + 'Test_TC_DD_3_8', + 'Test_TC_DD_3_9', + 'Test_TC_DD_3_10', + 'Test_TC_DD_3_11', + 'Test_TC_DD_3_12', + 'Test_TC_DD_3_13', + 'Test_TC_DD_3_14', + 'Test_TC_DD_4_1', + ]; + + const Groups = [ + 'TestGroupDemoCommand', + 'TestGroupDemoConfig', + ]; + + const BulkDataExchangeProtocol = [ + 'Test_TC_BDX_1_1', + 'Test_TC_BDX_1_2', + 'Test_TC_BDX_1_3', + 'Test_TC_BDX_1_4', + 'Test_TC_BDX_1_5', + 'Test_TC_BDX_1_6', + 'Test_TC_BDX_2_1', + 'Test_TC_BDX_2_2', + 'Test_TC_BDX_2_3', + 'Test_TC_BDX_2_4', + 'Test_TC_BDX_2_5', + ]; + + const bridge = [ + 'Test_TC_BR_1', + 'Test_TC_BR_2', + 'Test_TC_BR_3', + ]; + + const BridgedActions = [ + 'Test_TC_BRAC_2_1', + 'Test_TC_BRAC_2_2', + 'Test_TC_BRAC_3_1', + ]; + + const DeviceManagement = [ + 'Test_TC_DM_1_2', + 'Test_TC_DM_1_4', + 'Test_TC_DM_2_1', + 'Test_TC_DM_2_3', + 'Test_TC_DM_2_4', + 'Test_TC_DM_3_2', + 'Test_TC_DM_3_4', + ]; + + const DiagnosticsLogs = [ + 'Test_TC_Diag_Log_2_1', + 'Test_TC_Diag_Log_2_2', + 'Test_TC_Diag_Log_2_3', + ]; + + const Descriptor = [ + 'Test_TC_DESC_1_1', + ]; + + const EthernetNetworkDiagnostics = [ + 'Test_TC_ETHDIAG_1_2', + ]; + + const GeneralCommissioning = [ + 'Test_TC_GC_2_2', + 'Test_TC_GC_2_3', + 'Test_TC_GC_2_4', + ]; + + const GeneralDiagnostics = [ + 'Test_TC_GENDIAG_1_1', + 'Test_TC_GENDIAG_1_2', + 'Test_TC_GENDIAG_2_1', + ]; + + const Identify = [ + 'Test_TC_I_2_2', + 'Test_TC_I_3_1', + 'Test_TC_I_3_2', + ]; + + const IlluminanceMeasurement = [ + 'Test_TC_ILL_2_2', + 'Test_TC_ILL_3_1', + ]; + + const InteractionDataModel = [ + 'Test_TC_IDM_1_1', + 'Test_TC_IDM_1_2', + 'Test_TC_IDM_2_1', + 'Test_TC_IDM_2_2', + 'Test_TC_IDM_3_1', + 'Test_TC_IDM_3_2', + 'Test_TC_IDM_4_1', + 'Test_TC_IDM_4_2', + 'Test_TC_IDM_5_1', + 'Test_TC_IDM_5_2', + 'Test_TC_IDM_6_1', + 'Test_TC_IDM_6_2', + 'Test_TC_IDM_6_3', + 'Test_TC_IDM_6_4', + 'Test_TC_IDM_7_1', + ]; + + const MediaControl = [ + 'Test_TC_MC_2_2', + 'Test_TC_MC_3_12', + 'Test_TC_MC_3_13', + 'Test_TC_MC_4_1', + 'Test_TC_MC_8_2', + 'Test_TC_MC_9_2', + 'Test_TC_MC_10_2', + 'Test_TC_MC_10_3', + 'Test_TC_MC_10_4', + 'Test_TC_MC_10_5', + 'Test_TC_MC_10_6', + 'Test_TC_MC_10_7', + ]; + + const MultipleFabrics = [ + 'Test_TC_MF_1_1', + 'Test_TC_MF_1_2', + 'Test_TC_MF_1_7', + 'Test_TC_MF_1_8', + 'Test_TC_MF_1_9', + 'Test_TC_MF_1_10', + 'Test_TC_MF_1_11', + 'Test_TC_MF_1_12', + 'Test_TC_MF_1_13', + 'Test_TC_MF_1_14', + 'Test_TC_MF_1_16', + 'Test_TC_MF_1_17', + 'Test_TC_MF_1_18', + 'Test_TC_MF_1_19', + 'Test_TC_MF_1_20', + 'Test_TC_MF_1_21', + 'Test_TC_MF_1_22', + 'Test_TC_MF_1_23', + 'Test_TC_MF_1_24', + 'Test_TC_MF_1_25', + 'Test_TC_MF_1_26', + 'Test_TC_MF_1_27', + 'Test_TC_MF_1_28', + ]; + + const ModeSelect = [ + 'Test_TC_MOD_1_2', + 'Test_TC_MOD_1_3', + 'Test_TC_MOD_2_1', + 'Test_TC_MOD_2_2', + 'Test_TC_MOD_3_1', + 'Test_TC_MOD_3_2', + 'Test_TC_MOD_3_3', + ]; + + const OTASoftwareUpdate = [ + 'Test_TC_SU_1_1', + 'Test_TC_SU_2_1', + 'Test_TC_SU_2_2', + 'Test_TC_SU_2_3', + 'Test_TC_SU_2_4', + 'Test_TC_SU_2_5', + 'Test_TC_SU_2_6', + 'Test_TC_SU_2_7', + 'Test_TC_SU_3_1', + 'Test_TC_SU_3_2', + 'Test_TC_SU_3_3', + 'Test_TC_SU_3_4', + 'Test_TC_SU_4_1', + 'Test_TC_SU_4_2', + ]; + + const PowerSourceConfiguration = [ + 'Test_TC_PSCFG_2_1', + 'Test_TC_PSCFG_2_2', + 'Test_TC_PSCFG_3_1', + ]; + + const SecureChannel = [ + 'Test_TC_SC_4_1', + 'Test_TC_SC_4_3', + 'Test_TC_SC_4_4', + 'Test_TC_SC_4_5', + 'Test_TC_SC_4_6', + 'Test_TC_SC_4_7', + 'Test_TC_SC_4_8', + 'Test_TC_SC_4_9', + 'Test_TC_SC_4_10', + ]; + + const SoftwareDiagnostics = [ + 'Test_TC_SWDIAG_1_2', + ]; + + const WiFiNetworkDiagnostics = [ + 'Test_TC_WIFIDIAG_1_2', + 'Test_TC_WIFIDIAG_2_1', + ]; + + const WindowCovering = [ + 'Test_TC_WNCV_6_1', + 'Test_TC_WNCV_7_1', + ]; + + const FlowMeasurement = [ + 'Test_TC_FLW_3_1', + ]; + + const OccupancySensing = [ + 'Test_TC_OCC_2_3', + 'Test_TC_OCC_2_4', + 'Test_TC_OCC_3_1', + 'Test_TC_OCC_3_2', + ]; + + const PressureMeasurement = [ + 'Test_TC_PRS_2_2', + 'Test_TC_PRS_2_3', + 'Test_TC_PRS_3_1', + ]; + + const PowerSource = [ + 'Test_TC_PS_2_2', + 'Test_TC_PS_3_1', + ]; + + const BooleanState = [ + 'Test_TC_BOOL_2_2', + 'Test_TC_BOOL_3_1', + ]; + + const ColorControl = [ + 'Test_TC_CC_2_2', + 'Test_TC_CC_3_4', + 'Test_TC_CC_4_5', + 'Test_TC_CC_5_4', + 'Test_TC_CC_6_4', + 'Test_TC_CC_7_5', + 'Test_TC_CC_9_4', + ]; + + const DoorLock = [ + 'Test_TC_DL_2_1', + 'Test_TC_DL_2_2', + 'Test_TC_DL_2_4', + 'Test_TC_DL_2_5', + 'Test_TC_DL_2_6', + 'Test_TC_DL_2_7', + 'Test_TC_DL_2_8', + 'Test_TC_DL_2_10', + 'Test_TC_DL_2_11', + 'Test_TC_DL_2_13', + 'Test_TC_DL_2_14', + 'Test_TC_DL_2_15', + 'Test_TC_DL_2_16', + 'Test_TC_DL_2_17', + ]; + + const UserLabel = [ + 'Test_TC_LC_1_1', + 'Test_TC_LC_2_3', + 'Test_TC_LC_2_4', + 'Test_TC_LC_2_5', + ]; + + const LocalizationConfiguration = [ + 'Test_TC_LO_1_1', + ]; + + const LevelControl = [ + 'Test_TC_LVL_2_3', + ]; + + const NetworkCommissioning = [ + 'Test_TC_NC_1_1', + 'Test_TC_NC_1_2', + 'Test_TC_NC_1_3', + 'Test_TC_NC_1_4', + 'Test_TC_NC_1_5', + 'Test_TC_NC_1_6', + 'Test_TC_NC_1_7', + 'Test_TC_NC_1_8', + 'Test_TC_NC_1_9', + 'Test_TC_NC_1_10', + 'Test_TC_NC_1_11', + 'Test_TC_NC_1_12', + 'Test_TC_NC_1_13', + 'Test_TC_NC_1_14', + 'Test_TC_NC_1_15', + 'Test_TC_NC_1_16', + 'Test_TC_NC_1_17', + 'Test_TC_NC_1_18', + ]; + + const OnOff = [ + 'Test_TC_OO_3_1', + 'Test_TC_OO_3_2', + ]; + + const RelativeHumidityMeasurement = [ + 'Test_TC_RH_3_1', + ]; + + const Switch = [ + 'Test_TC_SWTCH_1_1', + 'Test_TC_SWTCH_3_1', + ]; + + const TemperatureMeasurement = [ + 'Test_TC_TM_3_1', + ]; + + const Thermostat = [ + 'Test_TC_TSTAT_3_1', + 'Test_TC_TSTAT_3_2', + ]; + + const ThermostatUserConfiguration = [ + 'Test_TC_TSUIC_3_1', + ]; + + const tests = [ + DeviceDiscovery, + Groups, + BulkDataExchangeProtocol, + bridge, + BridgedActions, + DeviceManagement, + DiagnosticsLogs, + Descriptor, + EthernetNetworkDiagnostics, + GeneralCommissioning, + GeneralDiagnostics, + Identify, + IlluminanceMeasurement, + InteractionDataModel, + MediaControl, + MultipleFabrics, + ModeSelect, + OTASoftwareUpdate, + PowerSourceConfiguration, + SecureChannel, + SoftwareDiagnostics, + WiFiNetworkDiagnostics, + WindowCovering, + FlowMeasurement, + OccupancySensing, + PressureMeasurement, + PowerSource, + BooleanState, + ColorControl, + DoorLock, + UserLabel, + LocalizationConfiguration, + LevelControl, + NetworkCommissioning, + OnOff, + RelativeHumidityMeasurement, + Switch, + TemperatureMeasurement, + Thermostat, + ThermostatUserConfiguration, + ].flat(1); + + tests.disable = disable.bind(tests); + return tests; +} + +function getTests() +{ + const AccessControl = [ + 'TestAccessControlCluster', + ]; + + const BinaryInput = [ + 'Test_TC_BI_1_1', + 'Test_TC_BI_2_1', + 'Test_TC_BI_2_2', + ]; + + const BooleanState = [ + 'Test_TC_BOOL_1_1', + 'Test_TC_BOOL_2_1', + ]; + + const BridgedActions = [ + 'Test_TC_BRAC_1_1', + ]; + + const ColorControl = [ + 'Test_TC_CC_1_1', + 'Test_TC_CC_2_1', + 'Test_TC_CC_3_1', + 'Test_TC_CC_3_2', + 'Test_TC_CC_3_3', + 'Test_TC_CC_4_1', + 'Test_TC_CC_4_2', + 'Test_TC_CC_4_3', + 'Test_TC_CC_4_4', + 'Test_TC_CC_5_1', + 'Test_TC_CC_5_2', + 'Test_TC_CC_5_3', + 'Test_TC_CC_6_1', + 'Test_TC_CC_6_2', + 'Test_TC_CC_6_3', + 'Test_TC_CC_7_1', + 'Test_TC_CC_7_2', + 'Test_TC_CC_7_3', + 'Test_TC_CC_7_4', + 'Test_TC_CC_8_1', + 'Test_TC_CC_9_1', + 'Test_TC_CC_9_2', + 'Test_TC_CC_9_3', + ]; + + const DeviceManagement = [ + 'Test_TC_DM_1_1', + 'Test_TC_DM_3_1', + 'Test_TC_DM_2_2', + ]; + + const ElectricalMeasurement = [ + 'Test_TC_EMR_1_1', + ]; + + const EthernetNetworkDiagnostics = [ + 'Test_TC_ETHDIAG_1_1', + 'Test_TC_ETHDIAG_2_1', + ]; + + const FlowMeasurement = [ + 'Test_TC_FLW_1_1', + 'Test_TC_FLW_2_1', + 'Test_TC_FLW_2_2', + ]; + + const GeneralCommissioning = [ + 'Test_TC_GC_1_1', + ]; + + const Identify = [ + 'Test_TC_I_1_1', + 'Test_TC_I_2_1', + 'Test_TC_I_2_3', + ]; + + const IlluminanceMeasurement = [ + 'Test_TC_ILL_1_1', + 'Test_TC_ILL_2_1', + ]; + + const OccupancySensing = [ + 'Test_TC_OCC_1_1', + 'Test_TC_OCC_2_1', + 'Test_TC_OCC_2_2', + ]; + + const LevelControl = [ + 'Test_TC_LVL_1_1', + 'Test_TC_LVL_2_1', + 'Test_TC_LVL_2_2', + 'Test_TC_LVL_3_1', + 'Test_TC_LVL_4_1', + 'Test_TC_LVL_5_1', + 'Test_TC_LVL_6_1', + ]; + + const UserLabel = [ + 'Test_TC_LC_1_2', + ]; + + const MediaControl = [ + 'Test_TC_MC_1_1', + 'Test_TC_MC_1_2', + 'Test_TC_MC_1_3', + 'Test_TC_MC_1_4', + 'Test_TC_MC_1_5', + 'Test_TC_MC_1_6', + 'Test_TC_MC_1_7', + 'Test_TC_MC_1_8', + 'Test_TC_MC_1_9', + 'Test_TC_MC_1_10', + 'Test_TC_MC_1_11', + 'Test_TC_MC_1_12', + 'Test_TC_MC_2_1', + 'Test_TC_MC_3_1', + 'Test_TC_MC_3_2', + 'Test_TC_MC_3_3', + 'Test_TC_MC_3_4', + 'Test_TC_MC_3_5', + 'Test_TC_MC_3_6', + 'Test_TC_MC_3_7', + 'Test_TC_MC_3_8', + 'Test_TC_MC_3_9', + 'Test_TC_MC_3_10', + 'Test_TC_MC_3_11', + 'Test_TC_MC_5_1', + 'Test_TC_MC_5_2', + 'Test_TC_MC_5_3', + 'Test_TC_MC_6_1', + 'Test_TC_MC_6_2', + 'Test_TC_MC_6_3', + 'Test_TC_MC_6_4', + 'Test_TC_MC_7_1', + 'Test_TC_MC_7_2', + 'Test_TC_MC_8_1', + 'Test_TC_MC_9_1', + 'Test_TC_MC_10_1', + ]; + + const ModeSelect = [ + 'Test_TC_MOD_1_1', + ]; + + const MultipleFabrics = [ + 'Test_TC_MF_1_3', + 'Test_TC_MF_1_4', + 'Test_TC_MF_1_5', + 'Test_TC_MF_1_6', + 'Test_TC_MF_1_15', + ]; + + const OnOff = [ + 'Test_TC_OO_1_1', + 'Test_TC_OO_2_1', + 'Test_TC_OO_2_2', + 'Test_TC_OO_2_3', + 'Test_TC_OO_2_4', + ]; + + const PowerSource = [ + 'Test_TC_PS_1_1', + 'Test_TC_PS_2_1', + ]; + + const PressureMeasurement = [ + 'Test_TC_PRS_1_1', + 'Test_TC_PRS_2_1', + ]; + + const PumpConfigurationControl = [ + 'Test_TC_PCC_1_1', + 'Test_TC_PCC_2_1', + 'Test_TC_PCC_2_2', + 'Test_TC_PCC_2_3', + 'Test_TC_PCC_2_4', + ]; + + const PowerSourceConfiguration = [ + 'Test_TC_PSCFG_1_1', + ]; + + const RelativeHumidityMeasurement = [ + 'Test_TC_RH_1_1', + 'Test_TC_RH_2_1', + 'Test_TC_RH_2_2', + ]; + + const SecureChannel = [ + 'Test_TC_SC_4_2', + ]; + + const Switch = [ + 'Test_TC_SWTCH_2_1', + 'Test_TC_SWTCH_2_2', + ]; + + const TemperatureMeasurement = [ + 'Test_TC_TM_1_1', + 'Test_TC_TM_2_1', + 'Test_TC_TM_2_2', + ]; + + const Thermostat = [ + 'Test_TC_TSTAT_1_1', + 'Test_TC_TSTAT_2_1', + 'Test_TC_TSTAT_2_2', + ]; + + const ThermostatUserConfiguration = [ + 'Test_TC_TSUIC_1_1', + 'Test_TC_TSUIC_2_1', + 'Test_TC_TSUIC_2_2', + ]; + + const ThreadNetworkDiagnostics = [ + 'Test_TC_DIAG_TH_NW_1_1', + 'Test_TC_DIAG_TH_NW_1_2', + ]; + + const WiFiNetworkDiagnostics = [ + 'Test_TC_WIFIDIAG_1_1', + 'Test_TC_WIFIDIAG_3_1', + ]; + + const WindowCovering = [ + 'Test_TC_WNCV_1_1', + 'Test_TC_WNCV_2_1', + 'Test_TC_WNCV_2_2', + 'Test_TC_WNCV_2_3', + 'Test_TC_WNCV_2_4', + 'Test_TC_WNCV_2_5', + 'Test_TC_WNCV_3_1', + 'Test_TC_WNCV_3_2', + 'Test_TC_WNCV_3_3', + 'Test_TC_WNCV_3_4', + 'Test_TC_WNCV_3_5', + 'Test_TC_WNCV_4_1', + 'Test_TC_WNCV_4_2', + 'Test_TC_WNCV_4_3', + 'Test_TC_WNCV_4_4', + 'Test_TC_WNCV_4_5', + ]; + + const TV = [ + 'TV_TargetNavigatorCluster', + 'TV_AudioOutputCluster', + 'TV_ApplicationLauncherCluster', + 'TV_KeypadInputCluster', + 'TV_AccountLoginCluster', + 'TV_WakeOnLanCluster', + 'TV_ApplicationBasicCluster', + 'TV_MediaPlaybackCluster', + 'TV_ChannelCluster', + 'TV_LowPowerCluster', + 'TV_ContentLauncherCluster', + 'TV_MediaInputCluster', + ]; + + const Others = [ + 'TestCluster', + 'TestClusterComplexTypes', + 'TestConstraints', + 'TestDelayCommands', + 'TestEvents', + 'TestDiscovery', + 'TestLogCommands', + 'TestSaveAs', + 'TestConfigVariables', + 'TestDescriptorCluster', + 'TestBasicInformation', + 'TestGeneralCommissioning', + 'TestIdentifyCluster', + 'TestOperationalCredentialsCluster', + 'TestModeSelectCluster', + 'TestSelfFabricRemoval', + 'TestSystemCommands', + 'TestBinding', + 'TestUserLabelCluster', + 'TestArmFailSafe', + ]; + + const MultiAdmin = [ + 'TestMultiAdmin', + ]; + + const SoftwareDiagnostics = [ + 'Test_TC_SWDIAG_1_1', + 'Test_TC_SWDIAG_2_1', + 'Test_TC_SWDIAG_3_1', + ]; + + const Subscriptions = [ + 'TestSubscribe_OnOff', + ]; + + const DoorLock = [ + 'DL_UsersAndCredentials', + 'DL_LockUnlock', + 'DL_Schedules', + 'Test_TC_DL_1_3', + ]; + + const Groups = [ + 'TestGroupMessaging', + 'TestGroupsCluster', + 'TestGroupKeyManagementCluster', + ]; + + const tests = [ + AccessControl, + BinaryInput, + BooleanState, + BridgedActions, + ColorControl, + DeviceManagement, + ElectricalMeasurement, + EthernetNetworkDiagnostics, + FlowMeasurement, + GeneralCommissioning, + Identify, + IlluminanceMeasurement, + LevelControl, + MediaControl, + ModeSelect, + MultipleFabrics, + OccupancySensing, + OnOff, + PowerSource, + PressureMeasurement, + PumpConfigurationControl, + PowerSourceConfiguration, + RelativeHumidityMeasurement, + SecureChannel, + Switch, + TemperatureMeasurement, + Thermostat, + ThermostatUserConfiguration, + ThreadNetworkDiagnostics, + UserLabel, + WiFiNetworkDiagnostics, + WindowCovering, + TV, + Others, + MultiAdmin, + SoftwareDiagnostics, + Subscriptions, + DoorLock, + Groups, + ].flat(1); + + tests.disable = disable.bind(tests); + return tests; +} + +// clang-format on + +// +// Module exports +// +exports.getTests = getTests; +exports.getManualTests = getManualTests; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 3ee27ca7befd90..90bcf287536429 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -64,11 +64,6 @@ class TestList : public Command { printf("Test_TC_CC_9_1\n"); printf("Test_TC_CC_9_2\n"); printf("Test_TC_CC_9_3\n"); - printf("Test_TC_DD_1_5\n"); - printf("Test_TC_DD_1_6\n"); - printf("Test_TC_DD_1_7\n"); - printf("Test_TC_DD_1_8\n"); - printf("Test_TC_DD_1_9\n"); printf("Test_TC_DM_1_1\n"); printf("Test_TC_DM_3_1\n"); printf("Test_TC_DM_2_2\n"); @@ -14759,424 +14754,6 @@ class Test_TC_CC_9_3 : public TestCommandBridge { } }; -class Test_TC_DD_1_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DD_1_5() - : TestCommandBridge("Test_TC_DD_1_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DD_1_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); - err = TestStep1_0(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 1; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1_0() - { - Log(@"Verify that the onboarding payload for NFC tags SHALL use NDEF URI Record Type Definition as defined by NFC Forum in " - @"URI Record Type Definition RTD URI"); - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_6 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DD_1_6() - : TestCommandBridge("Test_TC_DD_1_6") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DD_1_6() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_6\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_6\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); - err = TestStep1_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); - err = TestStep1Verification_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2 verificaiton\n"); - err = TestStep2Verificaiton_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1_0() - { - Log(@"Scan the DUTs QR code using a QR code reader"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1Verification_1() - { - Log(@"Verify the QR code gets scanned successfully and the QR code must be of sufficient size and contrast respective to " - @"surface material as to be readable with standard readers such as smartphones in normal lighting conditions"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2Verificaiton_2() - { - Log(@"Verify QR code version is 1 or higher"); - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_7 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DD_1_7() - : TestCommandBridge("Test_TC_DD_1_7") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DD_1_7() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_7\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_7\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Precondition\n"); - err = TestPrecondition_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); - err = TestStep1_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestPrecondition_0() - { - Log(@"Verify manual pairing code is printed on the device or in additional provided materials"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1_1() - { - Log(@"Verify that the Manual Pairing Code should be printed using a minimum font size of 6 points typically producing a " - @"typeface height of 2.1 mm"); - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_8 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DD_1_8() - : TestCommandBridge("Test_TC_DD_1_8") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DD_1_8() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_8\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_8\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); - err = TestStep1_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); - err = TestStep1Verification_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1_0() - { - Log(@"Scan the device QR code using DUT"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1Verification_1() - { - Log(@"Verify the DUT is able to scan and parse the QR code successfully to onboard the device onto the CHIP network"); - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_9 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DD_1_9() - : TestCommandBridge("Test_TC_DD_1_9") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DD_1_9() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_9\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_9\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Precondition\n"); - err = TestPrecondition_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); - err = TestStep1_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1 verification\n"); - err = TestStep1Verification_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestPrecondition_0() - { - Log(@"Verify that the manual pairing code is printed on the device or in additional provided materials"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1_1() - { - Log(@"Provide the 11 digit or 21 digit pairing code from the Device in text speech or any format supported by DUT"); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1Verification_2() - { - Log(@"Verify that the manual pairing code can be provided to DUT and parsed to onboard the device onto the CHIP network"); - return CHIP_NO_ERROR; - } -}; - class Test_TC_DM_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -76448,11 +76025,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),