Skip to content

[Camera] Add CameraAppTestSuite for Matter Camera TCs #210

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

Conversation

chulspro
Copy link

@chulspro chulspro commented Apr 15, 2025

Problem

  • For the Camera Controller
  • Add functionality to use camera-controller only for camera app test cases.
  • The test cases in FirstChipToolSuite are always executed with chip-tool.
  • The camera test cases should either run with camera-controller with the separate test suite within Yaml meant for camera test cases only.

Change overview

  • This PR adds a new Test Suite CameraAppTestSuite to test Matter Camera automated TCs only with chip-camera-controller.
  • The FirstChipToolSuite test suite in TH, which is used to run automated and semi-automated test cases, only runs the test cases using chip-tool.
  • Since the Camera/WebRTC TCs require chip-camera-controller to run the test cases, it cannot be clubbed with the existing FirstChipToolSuite(also TH allows running multiple test cases in suite at once). Hence a new test suite is required for Camera/WebRTC TCs alone.

Testing

  • Excute TestHarness and check WebRTC Requestor/Provider operations

…troller.

Signed-off-by: Sathvik K Gatti <[email protected]>
Signed-off-by: Suyambulingam Rathinasamy Muthupandi <[email protected]>
Signed-off-by: Charles Kim <[email protected]>
@chulspro chulspro changed the title [Camera] Adds support for camera app yaml test cases through camera-controller [Camera] Add CameraAppTestSuite for Matter Camera TCs Apr 15, 2025
Signed-off-by: Sathvik K Gatti <[email protected]>
Signed-off-by: Suyambulingam Rathinasamy Muthupandi <[email protected]>
Signed-off-by: Charles Kim <[email protected]>
Copy link
Contributor

@antonio-amjr antonio-amjr left a comment

Choose a reason for hiding this comment

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

Hi @chulspro,

This camera support should probably be merged on the next release of Test Harness, the v2.13+summer2025 version.
Please change this PR's base from main to the v2.13-develop to test it against the latest code for the next release.

@chulspro
Copy link
Author

@antonio-amjr : Okay, Thank you for sharing the exact brach. I will change PR's to v2.13-develop branch.

Copy link
Contributor

@antonio-amjr antonio-amjr left a comment

Choose a reason for hiding this comment

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

LGTM.
Just one simple change is required in a Unit Test file (explained in sequence) and some other minor suggestions

@@ -238,7 +238,8 @@ async def run_test(
[test_path], parser_config, test_parser_hooks
)

if server_type == ChipServerType.CHIP_TOOL:
#Reuse chip-tool adapter for camera-controller
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#Reuse chip-tool adapter for camera-controller
# Reuse chip-tool adapter for camera-controller

@@ -228,7 +228,7 @@ async def run_test(
pics_path = f"{PICS_FILE_PATH}"
self.logger.info(f"Using PICS file: {pics_path}")

if server_type == ChipServerType.CHIP_TOOL:
if server_type == ChipServerType.CHIP_TOOL or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if server_type == ChipServerType.CHIP_TOOL or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER:
if (
server_type == ChipServerType.CHIP_TOOL
or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER
):

@@ -238,7 +238,8 @@ async def run_test(
[test_path], parser_config, test_parser_hooks
)

if server_type == ChipServerType.CHIP_TOOL:
#Reuse chip-tool adapter for camera-controller
if server_type == ChipServerType.CHIP_TOOL or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if server_type == ChipServerType.CHIP_TOOL or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER:
if (
server_type == ChipServerType.CHIP_TOOL
or server_type == ChipServerType.CHIP_CAMERA_CONTROLLER
):

Comment on lines 219 to +220

class YamlCameraChipTestCase(YamlTestCase, ChipTest):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class YamlCameraChipTestCase(YamlTestCase, ChipTest):
class YamlCameraChipTestCase(YamlTestCase, ChipTest):

Comment on lines 116 to +117

class ChipCameraYamlTestSuite(YamlTestSuite, ChipSuite):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class ChipCameraYamlTestSuite(YamlTestSuite, ChipSuite):
class ChipCameraYamlTestSuite(YamlTestSuite, ChipSuite):

from .yaml_test_models import YamlTest


class YamlParserException(Exception):
"""Raised when an error occurs during the parser of yaml file."""


def _test_type(test: YamlTest) -> MatterTestType:
def _get_types(test: YamlTest) -> tuple[MatterTestType, SuiteType]:
Copy link
Contributor

@antonio-amjr antonio-amjr Apr 23, 2025

Choose a reason for hiding this comment

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

Please, also change the method name in the Unit Test file test_yaml_parser.py everywhere it's used.

If possible, please run the Unit Tests to verify if anything else is missing or an issue is encountered.

Copy link
Contributor

@antonio-amjr antonio-amjr left a comment

Choose a reason for hiding this comment

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

Sorry, I mistakenly approved the last review.
I'll leave here again my request to change the base to the v2.13-develop branch

@chulspro chulspro closed this by deleting the head repository Apr 23, 2025
@chulspro
Copy link
Author

I move this PR210 to PR214

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.

3 participants