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

Update IDM_1_3 yaml to latest testplan spec which uses fault injection #32149

Merged
Merged
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
198 changes: 195 additions & 3 deletions src/app/tests/suites/certification/Test_TC_IDM_1_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,189 @@ tests:
Chip-repl commands used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command.
disabled: true

- label:
"Step 0 (Pre-Condition 1): Commission TH Client to TH device (Server),
if not done so already."
verification: |
Ensure DUT is commissioned to TH device (Server).
disabled: true

- label:
"Step 0 (Pre-Condition 2): Commission DUT to TH device (Server), if
not done so already."
verification: |
Ensure DUT is commissioned to TH device (Server).
This likely requires opening the commissioning window with TH Client."
disabled: true

- label:
"Step 0 (Pre-Condition 3): TH Client send `FailAtFault` command to
`FaultInjection` cluster to TH device (Server)."
cluster: "FaultInjection"
command: "FailAtFault"
arguments:
values:
- name: "Type"
value: 3
- name: "Id"
value: 12
- name: "NumCallsToSkip"
value: 3
- name: "NumCallsToFail"
value: 1
- name: "TakeMutex"
value: false
verification: |
Equivalent TH Client command to run `chip-tool faultinjection fail-at-fault 3 12 3 1 false 1 0`
On TH(all-clusters-app), Verify command is successfully:

CHIP:DMG: InvokeRequestMessage =
CHIP:DMG: {
CHIP:DMG: suppressResponse = false,
CHIP:DMG: timedRequest = false,
CHIP:DMG: InvokeRequests =
CHIP:DMG: [
CHIP:DMG: CommandDataIB =
CHIP:DMG: {
CHIP:DMG: CommandPathIB =
CHIP:DMG: {
CHIP:DMG: EndpointId = 0x0,
CHIP:DMG: ClusterId = 0xfff1fc06,
CHIP:DMG: CommandId = 0x0,
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: CommandFields =
CHIP:DMG: {
CHIP:DMG: 0x0 = 3,
CHIP:DMG: 0x1 = 12,
CHIP:DMG: 0x2 = 3,
CHIP:DMG: 0x3 = 1,
CHIP:DMG: 0x4 = false,
CHIP:DMG: },
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: ],
CHIP:DMG:
CHIP:DMG: InteractionModelRevision = 11
CHIP:DMG: },
CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0xFFF1_FC06 e=0 p=m
CHIP:DMG: AccessControl: allowed
CHIP:DMG: Received command for Endpoint=0 Cluster=0xFFF1_FC06 Command=0x0000_0000
CHIP:ZCL: FaultInjection: Configure a fault of type: 3 and Id: 12 to be triggered deterministically <--------- Verify success with this message.
disabled: true

- label:
"Step 0 (Pre-Condition 4): TH Client send `FailAtFault` command to
`FaultInjection` cluster to TH device (Server)."
cluster: "FaultInjection"
command: "FailAtFault"
arguments:
values:
- name: "Type"
value: 3
- name: "Id"
value: 13
- name: "NumCallsToSkip"
value: 2
- name: "NumCallsToFail"
value: 1
- name: "TakeMutex"
value: false
verification: |
Equivalent TH Client command to run `chip-tool faultinjection fail-at-fault 3 13 2 1 false 1 0`
On TH(all-clusters-app), Verify command is successfully:

CHIP:DMG: InvokeRequestMessage =
CHIP:DMG: {
CHIP:DMG: suppressResponse = false,
CHIP:DMG: timedRequest = false,
CHIP:DMG: InvokeRequests =
CHIP:DMG: [
CHIP:DMG: CommandDataIB =
CHIP:DMG: {
CHIP:DMG: CommandPathIB =
CHIP:DMG: {
CHIP:DMG: EndpointId = 0x0,
CHIP:DMG: ClusterId = 0xfff1fc06,
CHIP:DMG: CommandId = 0x0,
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: CommandFields =
CHIP:DMG: {
CHIP:DMG: 0x0 = 3,
CHIP:DMG: 0x1 = 13,
CHIP:DMG: 0x2 = 2,
CHIP:DMG: 0x3 = 1,
CHIP:DMG: 0x4 = false,
CHIP:DMG: },
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: ],
CHIP:DMG:
CHIP:DMG: InteractionModelRevision = 11
CHIP:DMG: },
CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0xFFF1_FC06 e=0 p=m
CHIP:DMG: AccessControl: allowed
CHIP:DMG: Received command for Endpoint=0 Cluster=0xFFF1_FC06 Command=0x0000_0000
CHIP:ZCL: FaultInjection: Configure a fault of type: 3 and Id: 13 to be triggered deterministically <--------- Verify success with this message.
disabled: true

- label:
"Step 0 (Pre-Condition 5): TH Client send `FailAtFault` command to
`FaultInjection` cluster to TH device (Server)."
cluster: "FaultInjection"
command: "FailAtFault"
arguments:
values:
- name: "Type"
value: 3
- name: "Id"
value: 14
- name: "NumCallsToSkip"
value: 1
- name: "NumCallsToFail"
value: 1
- name: "TakeMutex"
value: false
verification: |
Equivalent TH Client command to run `chip-tool faultinjection fail-at-fault 3 14 1 1 false 1 0`
On TH(all-clusters-app), Verify command is successfully:

CHIP:DMG: InvokeRequestMessage =
CHIP:DMG: {
CHIP:DMG: suppressResponse = false,
CHIP:DMG: timedRequest = false,
CHIP:DMG: InvokeRequests =
CHIP:DMG: [
CHIP:DMG: CommandDataIB =
CHIP:DMG: {
CHIP:DMG: CommandPathIB =
CHIP:DMG: {
CHIP:DMG: EndpointId = 0x0,
CHIP:DMG: ClusterId = 0xfff1fc06,
CHIP:DMG: CommandId = 0x0,
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: CommandFields =
CHIP:DMG: {
CHIP:DMG: 0x0 = 3,
CHIP:DMG: 0x1 = 14,
CHIP:DMG: 0x2 = 1,
CHIP:DMG: 0x3 = 1,
CHIP:DMG: 0x4 = false,
CHIP:DMG: },
CHIP:DMG: },
CHIP:DMG:
CHIP:DMG: ],
CHIP:DMG:
CHIP:DMG: InteractionModelRevision = 11
CHIP:DMG: },
CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0xFFF1_FC06 e=0 p=m
CHIP:DMG: AccessControl: allowed
CHIP:DMG: Received command for Endpoint=0 Cluster=0xFFF1_FC06 Command=0x0000_0000
CHIP:ZCL: FaultInjection: Configure a fault of type: 3 and Id: 14 to be triggered deterministically <--------- Verify success with this message.
disabled: true

- label: "Step 1: DUT sends the Invoke Request Message to the TH. The
Message should contain two valid and unique paths in the
CommandDataIBs, which has the specific Endpoints, specific Clusters
Expand Down Expand Up @@ -112,7 +295,10 @@ tests:

`await devCtrl.SendBatchCommands(0x12344321, [chip.clusters.Command.InvokeRequestInfo(1, chip.clusters.OnOff.Commands.Toggle()), chip.clusters.Command.InvokeRequestInfo(2, chip.clusters.OnOff.Commands.Toggle())])`

Verify DUT doesn't crash by seeing next step execute.
* Verify DUT doesn't crash by seeing next step execute.
* On TH(all-clusters-app), Verify following logs are seen:
CHIP:DMG: Response to InvokeRequestMessage overridden by fault injection
CHIP:DMG: Injecting the following response:Each response will be sent in a separate InvokeResponseMessage. The order of responses will be the same as the original request.
disabled: true

- label: "Step 3: DUT sends the Invoke Request Message to the TH. The
Expand All @@ -133,7 +319,10 @@ tests:

`await devCtrl.SendBatchCommands(0x12344321, [chip.clusters.Command.InvokeRequestInfo(1, chip.clusters.OnOff.Commands.Toggle()), chip.clusters.Command.InvokeRequestInfo(2, chip.clusters.OnOff.Commands.Toggle())])`

Verify DUT doesn't crash by seeing next step execute.
* Verify DUT doesn't crash by seeing next step execute.
* On TH(all-clusters-app), Verify following logs are seen:
CHIP:DMG: Response to InvokeRequestMessage overridden by fault injection
CHIP:DMG: Injecting the following response:Each response will be sent in a separate InvokeResponseMessage. The order of responses will be reversed from the original request.
disabled: true

- label: "Step 4: DUT sends the Invoke Request Message to the TH. The
Expand All @@ -154,7 +343,10 @@ tests:

`await devCtrl.SendBatchCommands(0x12344321, [chip.clusters.Command.InvokeRequestInfo(1, chip.clusters.OnOff.Commands.Toggle()), chip.clusters.Command.InvokeRequestInfo(2, chip.clusters.OnOff.Commands.Toggle())])`

Verify DUT doesn't crash by seeing next step execute.
* Verify DUT doesn't crash by seeing next step execute.
* On TH(all-clusters-app), Verify following logs are seen:
CHIP:DMG: Response to InvokeRequestMessage overridden by fault injection
CHIP:DMG: Injecting the following response:Single InvokeResponseMessages. Dropping response to second request
disabled: true

- label: "Step 5: DUT sends the Invoke Request Message to the TH. The
Expand Down
Loading