Skip to content

Merge TC_SU_2_7 into TC_SU_2_2 for single run and update. - #74067

Draft
jtrejoespinoza-grid wants to merge 9 commits into
project-chip:masterfrom
jtrejoespinoza-grid:merge_TCSU27_into_TCSU22
Draft

Merge TC_SU_2_7 into TC_SU_2_2 for single run and update.#74067
jtrejoespinoza-grid wants to merge 9 commits into
project-chip:masterfrom
jtrejoespinoza-grid:merge_TCSU27_into_TCSU22

Conversation

@jtrejoespinoza-grid

@jtrejoespinoza-grid jtrejoespinoza-grid commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR contains the changes to merge the TestCase TC_SU_2_7.py into TC_SU_2_2. py

New step order:

Implement this new step sequence in TC_SU_2_2.py (replacing its current 0-6 steps and folding in 2.7's steps). For each step, wire up both the attribute-based verification already in TC_SU_2_2 (where applicable) and the StateTransition/other event verification from TC_SU_2_7, using EventSubscriptionHandler alongside the existing AttributeSubscriptionHandler pattern already used in the file (see Step 4's dual-track pattern as precedent).

New Step Previous Test Case / Step Reference Action Verification
0 TC-SU-2.2 Step 0, TC-SU-2.7 Step 0 Commission the DUT (Requestor) with the TH/OTA-P (Provider).
1 TC-SU-2.2 Step 1 DUT sends QueryImage. TH/OTA-P responds Busy, DelayedActionTime=60s. DUT does not re-query before 120s (existing 2.2 logic).
2 TC-SU-2.2 Step 2 , TC-SU-2.7 Step 2 DUT sends QueryImage. TH/OTA-P responds NotAvailable. DUT does not re-query before 120s (existing 2.2 logic, unchanged). ADD: StateTransition Querying→DelayedOnQuery with reason kDelayByProvider (from 2.7 step 2).
3 TC-SU-2.2 Step 3 DUT sends QueryImage, Busy/180s, then on retry UpdateAvailable. DUT waits ≥180s before re-query (existing 2.2 logic). Transfer starts (existing). Do NOT abort immediately — hand off into step 4 instead of killing here.
4 TC-SU-2.2 Step 3 (abort portion), TC-SU-2.7 Step 6 Once kDownloading is confirmed (continuing from step 3's transfer), kill the provider mid-download to force an error (this replaces 2.2's abrupt "kill right after kDownloading" — same kill, but now verified). StateTransition Downloading→Idle, and this transition must take ≥300s (5 min BDX idle timeout) — from 2.7 step 6. DownloadError event with SoftwareVersion matching, BytesDownloaded>0, ProgressPercent>0, PlatformCode=NULL.
5 TC-SU-2.2 Step 4 DUT sends QueryImage. TH/OTA-P responds UpdateAvailable with an invalid BDX ImageURI. No transfer starts (existing 2.2 step 4 logic, unchanged).
6 TC-SU-2.7 Step 3 DUT sends QueryImage. TH/OTA-P does not respond (provider killed before announce). StateTransition Querying→Idle with reason kFailure (from 2.7 step 3).
7 TC-SU-2.7 Step 4 If BasicInformation.LocalConfigDisabled is supported, write it to False via attribute_guard/write_single_attribute (from 2.7 step 4).
8 TC-SU-2.7 Step 5 DUT sends QueryImage with RequestorCanConsent=True; provider responds UserConsentNeeded=True (needs --userConsentNeeded + app pipes, from 2.7 step 5). StateTransition Querying→DelayedOnUserConsent.
9 TC-SU-2.2 Step 5, TC-SU-2.7 Step 1, TC-SU-2.7 Step 7 The single full OTA. UpdateAvailable → DUT downloads V2 → provider sends ApplyUpdateResponse Action=AwaitNextAction (--applyUpdateAction awaitNextAction --delayedApplyActionTimeSec N) → after asserting DelayedOnApply, restart/reconfigure the provider to permit Proceed so the DUT's scheduled retry completes the apply → DUT reboots on V2. Full StateTransition sequence Querying→Downloading→Applying→Idle (2.2 existing + 2.7 step 1's event checks). StateTransition Applying→DelayedOnApply with reason kDelayByProvider (2.7 step 7). VersionApplied event with correct SoftwareVersion and non-null ProductID (2.7 step 1). Existing 2.2 basic-information version check after reboot.
10 TC-SU-2.2 Step 6 DUT sends QueryImage; provider serves the same V2 version. No transfer starts (existing 2.2 step 6, unchanged — reuses the already-applied V2 image).

This order consider the old version of 2.7: Not single ota update order (https://github.com/jtrejoespinoza-grid/connectedhomeip/blob/a50d879769df0c0fd984a3545954438ba025813a/src/python_testing/TC_SU_2_7.py)

Related issues

Fixes: project-chip/matter-test-scripts#804

Testing

Add the new test steps as sequence.
Update the numbers of the test steps.
Add missing steps between actions
Update log statements that mentions test step.

Run the test locally:

python3 scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SU_2_2.py

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the tests label Sep 10, 2026
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.81%. Comparing base (67c8272) to head (7fddb4f).
⚠️ Report is 83 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #74067      +/-   ##
==========================================
- Coverage   57.55%   56.81%   -0.74%     
==========================================
  Files        1921     2002      +81     
  Lines      125332   130443    +5111     
  Branches    14158    15188    +1030     
==========================================
+ Hits        72134    74114    +1980     
- Misses      53198    56329    +3131     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TC-SU] Merge 2.7 into 2.2

1 participant