Skip to content

Add nfc-ethernet DUT pairing mode for python_testing suites - #351

Open
rquidute wants to merge 1 commit into
v2.16-developfrom
feature/1067-nfc-ethernet-python-testing
Open

Add nfc-ethernet DUT pairing mode for python_testing suites#351
rquidute wants to merge 1 commit into
v2.16-developfrom
feature/1067-nfc-ethernet-python-testing

Conversation

@rquidute

Copy link
Copy Markdown
Contributor

Summary

Adds nfc-ethernet as a valid DUT pairing mode for python_testing (SDK) tests only, so the Test Harness can commission Matter-over-Ethernet devices via NFC.

Background

  • Upstream connectedhomeip PR project-chip/connectedhomeip#43613 (adds nfc-ethernet to chip-tool) is still open, so YAML/chip-tool-based tests can't use this mode yet.
  • The companion PR project-chip/connectedhomeip#43657 ("Add nfc-ethernet in Python controller") is merged and present in our connectedhomeip submodule, so python_testing (SDK) tests can already accept nfc-ethernet as a --commissioning-method — this PR just exposes/maps it in the TH's config/dispatch layer.

Changes

  • app/constants/shared_constants.py: added NFC_ETHERNET = "nfc-ethernet" to DutPairingModeEnum and to NFC_PAIRING_MODES.
  • generate_command_arguments() in python_testing/models/utils.py needed no code change: nfc-ethernet isn't part of the wifi/thread pairing-mode tuples, so it falls straight through to the existing NFC handling that suppresses --discriminator/--passcode and injects NFC_Reader_index.
  • test_suite.py OTBR setup needed no change: nfc-ethernet is not in the BLE_THREAD/NFC_THREAD/THREAD_MESHCOP tuple that triggers OTBR startup.
  • Added test coverage mirroring existing nfc-wifi/nfc-thread tests:
    • test_collections/matter/sdk_tests/support/tests/python_tests/test_utils.py
    • test_collections/matter/sdk_tests/support/tests/matter/test_test_environment_config.py

Out of scope

  • YAML/chip-tool test support — blocked on upstream connectedhomeip#43613, which is still under review.

Related: project-chip/certification-tool#1067

Add NFC_ETHERNET to DutPairingModeEnum and NFC_PAIRING_MODES so
python_testing (SDK) tests can commission Matter-over-Ethernet devices
via NFC, mirroring the connectedhomeip Python controller support
already merged upstream (project-chip/connectedhomeip#43657).

generate_command_arguments() requires no code change: since
nfc-ethernet is not part of the wifi or thread pairing-mode tuples,
it falls straight through to the existing NFC handling that suppresses
--discriminator/--passcode and injects NFC_Reader_index.

YAML/chip-tool test support is intentionally out of scope here, since
chip-tool itself does not support nfc-ethernet yet
(project-chip/connectedhomeip#43613 is still open upstream).

Adds test coverage mirroring the existing nfc-wifi/nfc-thread tests
in test_utils.py and test_test_environment_config.py.

Related: project-chip/certification-tool#1067
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f114b54d-c482-433e-acaa-c83b7c0bd38e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b419fbf1-37f6-41a0-b489-70312701008d

📥 Commits

Reviewing files that changed from the base of the PR and between bd725d3 and e553986.

📒 Files selected for processing (3)
  • app/constants/shared_constants.py
  • test_collections/matter/sdk_tests/support/tests/matter/test_test_environment_config.py
  • test_collections/matter/sdk_tests/support/tests/python_tests/test_utils.py

Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds DutPairingModeEnum.NFC_ETHERNET with the value nfc-ethernet and includes it in NFC_PAIRING_MODES. Configuration tests now cover NFC Ethernet with and without discriminator or setup code. Utility tests verify NFC-Ethernet command generation, including the commissioning method, NFC reader index, shared parameters, and omitted network and commissioning credentials.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the addition of the nfc-ethernet DUT pairing mode for Python testing suites.
Description check ✅ Passed The description directly explains the nfc-ethernet pairing-mode change, its scope, related tests, and excluded YAML support.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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

@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@rquidute rquidute self-assigned this Aug 18, 2026
@rquidute

Copy link
Copy Markdown
Contributor Author

@coderabbitai review full

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

@rquidute I will review all changes in PR #351.

✅ Action performed

Full review finished.

oxesoft

This comment was marked as outdated.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants