Skip to content

Updates TC-DD-1.1 for script test steps clarification#713

Open
raul-marquez-csa wants to merge 3 commits into
project-chip:mainfrom
raul-marquez-csa:TC-DD-1.1-add-instructions
Open

Updates TC-DD-1.1 for script test steps clarification#713
raul-marquez-csa wants to merge 3 commits into
project-chip:mainfrom
raul-marquez-csa:TC-DD-1.1-add-instructions

Conversation

@raul-marquez-csa
Copy link
Copy Markdown
Contributor

@raul-marquez-csa raul-marquez-csa commented Oct 9, 2025

Addresses:
[TC-DD-1.1] Add detailed instructions and verification criteria in TC-DD-1.1 script #711

This is the current test plan for TC-DD-1.1
https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/devicediscovery.adoc#311-tc-dd-11-qr-code-onboarding-payload-verification-dut---commissionee

General updates:

  • Added "Verifying xxxx xxx..." logging to script steps
  • The expectations for each step were added to the test steps
  • Added clarifying comments
  • Implemented missing step 3 verification

Additional updates:

  • Updated the test description as per the latest test plan
  • Updated steps as per the latest test plan
  • Added _base38_decode and payload_padding_check functions to onboarding_script_support.py

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @raul-marquez-csa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on updating and clarifying the TC-DD-1.1 test script, which is responsible for verifying QR code onboarding payloads. The primary goal is to align the script with the most recent test plan specifications, ensuring that it provides more detailed instructions, explicit verification criteria, and improved logging. These changes collectively aim to create a more robust, transparent, and up-to-date testing process for Matter device onboarding.

Highlights

  • Test Script Description Update: The test script description for TC-DD-1.1 has been updated to refer to the 'Matter network' instead of the 'CHIP network', reflecting the latest branding.
  • Detailed Test Steps and Verification Criteria: The create_test_steps method has been significantly revised to include detailed verification criteria and expectations directly within each test step description, making the test plan clearer and more comprehensive.
  • Enhanced Logging and Execution Flow: New logger.info messages have been added before each verification check in the execute method, providing better visibility into the script's progress. The order of checks has also been adjusted to align with the updated test steps.
  • New Verification Checks: New verification steps have been introduced for the Custom Flow bit and 8-bit Discovery Capabilities bit mask. A placeholder for verifying the packed binary data structure has also been added, though it is currently marked as a TODO.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the TC-DD-1.1 test script to align with the latest test plan by adding more detailed instructions and logging. While the changes are a good improvement in terms of clarity and alignment with the test plan, I've found a critical syntax error in one of the new test step definitions and a high-severity logic error in how the test steps are advanced, which would cause incorrect test execution and reporting. Please address these issues.

Comment thread onboarding_payload_test_suite/tcdd11/tcdd11.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@raul-marquez-csa raul-marquez-csa changed the title TC-DD-1.1 script clarification update Updates TC-DD-1.1 for script test steps clarification Oct 21, 2025
@raul-marquez-csa
Copy link
Copy Markdown
Contributor Author

raul-marquez-csa commented Oct 21, 2025

Other than adding the clarifying logging, I found a mismatch between the script and test plan.

In the TC-DD-1.1 test plan

there's an extra step at the end, step 3.

Step3  |  Verify the packed binary data structure  |  Verify the packed binary data structure is padded with '0' bits at the end of the structure to the nearest byte boundary.

This step isn't currently implemented in the script. Please advise if this step is to be implemented in the script, or if it's to be removed from the test plan.

@Ashwinigrl
Copy link
Copy Markdown

Other than adding the clarifying logging, I found a mismatch between the script and test plan.

In the TC-DD-1.1 test plan

there's an extra step at the end, step 3.

Step3  |  Verify the packed binary data structure  |  Verify the packed binary data structure is padded with '0' bits at the end of the structure to the nearest byte boundary.

This step isn't currently implemented in the script. Please advise if this step is to be implemented in the script, or if it's to be removed from the test plan.

Hi @raul-marquez-csa, Packed Binary Data Structure is available in Spec hence it related test step for verifying this has to be added in script.

Spec Reference:
Image

@cecille Could you please help here to how to add this verification in script.

@raul-marquez-csa
Copy link
Copy Markdown
Contributor Author

Other than adding the clarifying logging, I found a mismatch between the script and test plan.
In the TC-DD-1.1 test plan
there's an extra step at the end, step 3.

Step3  |  Verify the packed binary data structure  |  Verify the packed binary data structure is padded with '0' bits at the end of the structure to the nearest byte boundary.

This step isn't currently implemented in the script. Please advise if this step is to be implemented in the script, or if it's to be removed from the test plan.

Hi @raul-marquez-csa, Packed Binary Data Structure is available in Spec hence it related test step for verifying this has to be added in script.

Spec Reference: Image

@cecille Could you please help here to how to add this verification in script.

Ok, implemented step 3 per spec.

@raul-marquez-csa
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Matter base38 decoding and a new payload padding verification check. It also refines the TC-DD-1.1 test case with more detailed step descriptions and improved logging. Feedback points out a logic error in the padding check which fails to account for optional TLV data, a misalignment in test step sequencing due to extra next_step() calls, and a formatting issue with multi-line strings in the test metadata.

Comment thread onboarding_payload_test_suite/onboarding_script_support.py
Comment thread onboarding_payload_test_suite/tcdd11/tcdd11.py
Comment thread onboarding_payload_test_suite/tcdd11/tcdd11.py
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.

2 participants