Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests in Test_TC_OO_2_4 for OnOff StartupOnOff behaviours #17012

Merged
merged 5 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/chip-tool-darwin/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ function getTests()
];

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_1_1', 'Test_TC_OO_2_1', 'Test_TC_OO_2_2', 'Test_TC_OO_2_3',
// 'Test_TC_OO_2_4', Disable this Test for now as Darwin does not support reboot commands currently
];

const PowerSource = [
Expand Down
6 changes: 1 addition & 5 deletions examples/chip-tool/templates/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ function getManualTests()
'Test_TC_OCC_3_1',
];

const OnOff = [
'Test_TC_OO_2_4',
];

const PressureMeasurement = [
'Test_TC_PRS_2_2',
'Test_TC_PRS_2_3',
Expand Down Expand Up @@ -272,7 +268,6 @@ function getManualTests()
WindowCovering, //
FlowMeasurement, //
OccupancySensing, //
OnOff, //
PressureMeasurement, //
PowerSource, //

Expand Down Expand Up @@ -435,6 +430,7 @@ function getTests()
'Test_TC_OO_2_1',
'Test_TC_OO_2_2',
'Test_TC_OO_2_3',
'Test_TC_OO_2_4',
];

const PowerSource = [
Expand Down
257 changes: 149 additions & 108 deletions src/app/tests/suites/certification/Test_TC_OO_2_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,168 +16,209 @@ name: 3.2.4. [TC-OO-2.4] Startup functionality with server as DUT

config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
cluster: "On/Off"
endpoint: 1
discriminator:
type: INT16U
defaultValue: 3840

tests:
- label: "Commission DUT to TH"
verification: |

disabled: true
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "TH sends On command to DUT"
verification: |
./chip-tool onoff on 1 1

StatusIB =
{
status = 0x00,
},
disabled: true
command: "On"

- label: "TH writes a value of 0 to StartUpOnOff attribute of DUT"
verification: |
./chip-tool onoff write start-up-on-off 0 1 1
command: "writeAttribute"
attribute: "StartUpOnOff"
arguments:
value: 0

StatusIB =
{
status = 0x00,
},
disabled: true
- label: "TH reads the StartUpOnOff attribute from the DUT"
command: "readAttribute"
attribute: "StartUpOnOff"
response:
value: 0

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: FALSE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 0

- label: "TH writes a value of 1 to StartUpOnOff attribute of DUT"
verification: |
./chip-tool onoff write start-up-on-off 1 1 1

StatusIB =
{
status = 0x00,
},
disabled: true
command: "writeAttribute"
attribute: "StartUpOnOff"
arguments:
value: 1

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: TRUE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "TH writes a value of 2 to StartUpOnOff attribute of DUT"
verification: |
./chip-tool onoff write start-up-on-off 2 1 1

StatusIB =
{
status = 0x00,
},
disabled: true
command: "writeAttribute"
attribute: "StartUpOnOff"
arguments:
value: 2

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: FALSE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 0

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: TRUE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "TH writes NULL to StartUpOnOff attribute of DUT"
verification: |
(how to perform this in chip-tool?)
disabled: true
command: "writeAttribute"
attribute: "StartUpOnOff"
arguments:
value: null

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: TRUE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "TH sends Off command to DUT"
verification: |
./chip-tool onoff off 1 1

StatusIB =
{
status = 0x00,
},
disabled: true
command: "Off"

- label: "Power off DUT"
verification: |

disabled: true
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Power on DUT"
verification: |

disabled: true

- label: "TH reads the OnOff attribute from the DUT"
verification: |
./chip-tool onoff read on-off 1 1

OnOff: FALSE
disabled: true
command: "readAttribute"
attribute: "OnOff"
response:
value: 0
6 changes: 2 additions & 4 deletions src/darwin/Framework/CHIP/templates/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ function getTests()
];

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_1_1', 'Test_TC_OO_2_1', 'Test_TC_OO_2_2', 'Test_TC_OO_2_3',
// 'Test_TC_OO_2_4', Disable this Test for now as Darwin does not support reboot commands currently
];

const PowerSource = [
Expand Down
Loading