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

[PICS-Removal] Removing automatable PICS from ICDM 2 1 test module #34933

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eb00219
Updated TC_ICDM_2_1 test module:
j-ororke Aug 12, 2024
f74cdc7
Restyled by autopep8
restyled-commits Aug 12, 2024
38cdc25
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Aug 12, 2024
dd77706
updated TC_ICDM_2_1: Attempting to resolve issue in CI/CD pipeline
j-ororke Aug 12, 2024
355e460
Restyled by autopep8
restyled-commits Aug 12, 2024
372e144
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Aug 12, 2024
6f9e1e5
Updated TC_ICDM_2_1 test module:
j-ororke Aug 13, 2024
076cbe6
Updating TC_ICDM_2_1 and test_TC_ICDM_2_1 test modules:
j-ororke Aug 13, 2024
267afbe
Restyled by autopep8
restyled-commits Aug 13, 2024
fa944cd
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Aug 26, 2024
a629150
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Dec 2, 2024
07bb37a
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Dec 18, 2024
d7747ed
Update TC_ICDM_2_1 test module:
j-ororke Dec 19, 2024
0d62747
Updating TC_ICDM_2_1 test module:
j-ororke Jan 20, 2025
fcb86b7
Updating TC_ICDM_2_1 and matter_testing support module:
j-ororke Jan 22, 2025
969a87f
Merge remote-tracking branch 'upstream/master' into remove_PICS_from_…
j-ororke Jan 23, 2025
4618ff4
Updating TC_ICDM_2_1 test module:
j-ororke Jan 23, 2025
2a59997
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Jan 23, 2025
0eb6b99
Restyled by autopep8
restyled-commits Jan 23, 2025
1b63d63
Restyled by isort
restyled-commits Jan 23, 2025
545232f
Updating TC_ICDM_2_1 test module:
j-ororke Jan 27, 2025
ddb3488
Merge branch 'master' into remove_PICS_from_ICDM_tests
j-ororke Feb 10, 2025
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
25 changes: 13 additions & 12 deletions src/python_testing/TC_ICDM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ async def test_TC_ICDM_2_1(self):
cluster = Clusters.Objects.IcdManagement
attributes = cluster.Attributes

attribute_list = await self._read_icdm_attribute_expect_success(attribute=attributes.AttributeList)

# Commissioning
self.step(1)
# Read feature map
Expand All @@ -138,8 +140,7 @@ async def test_TC_ICDM_2_1(self):

# Validate ActiveModeThreshold
self.step(2)
if self.check_pics("ICDM.S.A0002"):

if attributes.ActiveModeThreshold.attribute_id in attribute_list:
activeModeThreshold = await self._read_icdm_attribute_expect_success(
attributes.ActiveModeThreshold)
# Verify ActiveModeThreshold is not bigger than uint16
Expand All @@ -156,7 +157,7 @@ async def test_TC_ICDM_2_1(self):

# Validate ActiveModeDuration
self.step(3)
if self.check_pics("ICDM.S.A0001"):
if attributes.ActiveModeDuration.attribute_id in attribute_list:
activeModeDuration = await self._read_icdm_attribute_expect_success(
attributes.ActiveModeDuration)
# Verify ActiveModeDuration is not bigger than uint32
Expand All @@ -168,7 +169,7 @@ async def test_TC_ICDM_2_1(self):

# Validate IdleModeDuration
self.step(4)
if self.check_pics("ICDM.S.A0000"):
if attributes.IdleModeDuration.attribute_id in attribute_list:
idleModeDuration = await self._read_icdm_attribute_expect_success(
attributes.IdleModeDuration)
# Verify IdleModeDuration is not bigger than uint32
Expand All @@ -184,7 +185,7 @@ async def test_TC_ICDM_2_1(self):

# Validate ClientsSupportedPerFabric
self.step(5)
if self.pics_guard(self.check_pics("ICDM.S.A0005")):
if attributes.ClientsSupportedPerFabric.attribute_id in attribute_list:
clientsSupportedPerFabric = await self._read_icdm_attribute_expect_success(
attributes.ClientsSupportedPerFabric)

Expand All @@ -197,7 +198,7 @@ async def test_TC_ICDM_2_1(self):

# Validate RegisteredClients
self.step(6)
if self.pics_guard(self.check_pics("ICDM.S.A0003")):
if attributes.RegisteredClients.attribute_id in attribute_list:
registeredClients = await self._read_icdm_attribute_expect_success(
attributes.RegisteredClients)

Expand All @@ -206,8 +207,7 @@ async def test_TC_ICDM_2_1(self):

# Validate ICDCounter
self.step(7)
if self.pics_guard(self.check_pics("ICDM.S.A0004")):

if attributes.ICDCounter.attribute_id in attribute_list:
icdCounter = await self._read_icdm_attribute_expect_success(
attributes.ICDCounter)
# Verify ICDCounter is not bigger than uint32
Expand All @@ -216,7 +216,7 @@ async def test_TC_ICDM_2_1(self):

# Validate UserActiveModeTriggerHint
self.step(8)
if self.pics_guard(self.check_pics("ICDM.S.A0006")):
if attributes.UserActiveModeTriggerHint.attribute_id in attribute_list:
userActiveModeTriggerHint = await self._read_icdm_attribute_expect_success(
attributes.UserActiveModeTriggerHint)

Expand All @@ -233,7 +233,7 @@ async def test_TC_ICDM_2_1(self):

# Valdate UserActiveModeTriggerInstruction
self.step(9)
if self.check_pics("ICDM.S.A0007"):
if attributes.UserActiveModeTriggerInstruction.attribute_id in attribute_list:
userActiveModeTriggerInstruction = await self._read_icdm_attribute_expect_success(
attributes.UserActiveModeTriggerInstruction)

Expand Down Expand Up @@ -265,7 +265,7 @@ async def test_TC_ICDM_2_1(self):

# Verify OperatingMode
self.step(10)
if self.pics_guard(self.check_pics("ICDM.S.A0008")):
if attributes.OperatingMode.attribute_id in attribute_list:
operatingMode = await self._read_icdm_attribute_expect_success(
attributes.OperatingMode)

Expand All @@ -274,8 +274,9 @@ async def test_TC_ICDM_2_1(self):

asserts.assert_less(
operatingMode, modes.kUnknownEnumValue, "OperatingMode can only have 0 and 1 as valid values")

self.step(11)
if self.pics_guard(self.check_pics("ICDM.S.A0009")):
if attributes.MaximumCheckInBackOff.attribute_id in attribute_list:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment here as on the opstate tests - this gets rid of the skip marker. Though this test is already a mixed bag of whether that happens.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Cecille,
I have created a function in MatterBaseTest class named "attributes_guard" as you had mentioned using the check_attributes function in the matter_testing_scripts helper module.
This should work I hope, please see the update to the issue #370 you have filed and let me know if this will resolve the above comment.
Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

is that in this PR or a different PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Cecille,
Sorry, the above created attributes_guard function is actually implemented currently in PR #34290 for the Opstate PICS replacement tests.

maximumCheckInBackOff = await self._read_icdm_attribute_expect_success(attributes.MaximumCheckInBackOff)

asserts.assert_true(self.is_valid_uint32_value(maximumCheckInBackOff),
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/test_testing/test_TC_ICDM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_spec_to_attribute_cache(test_icdm: ICDMData) -> Attribute.AsyncReadTran
resp.attributes = {0: {c: {attr.FeatureMap: test_icdm.FeatureMap, attr.IdleModeDuration: test_icdm.IdleModeDuration, attr.ActiveModeDuration: test_icdm.ActiveModeDuration, attr.ActiveModeThreshold: test_icdm.ActiveModeThreshold,
attr.RegisteredClients: test_icdm.RegisteredClients, attr.ICDCounter: test_icdm.ICDCounter,
attr.ClientsSupportedPerFabric: test_icdm.ClientsSupportedPerFabric, attr.UserActiveModeTriggerHint: test_icdm.UserActiveModeTriggerHint,
attr.UserActiveModeTriggerInstruction: test_icdm.UserActiveModeTriggerInstruction, attr.OperatingMode: test_icdm.OperatingMode, attr.MaximumCheckInBackOff: test_icdm.MaximumCheckInBackOff}}}
attr.UserActiveModeTriggerInstruction: test_icdm.UserActiveModeTriggerInstruction, attr.OperatingMode: test_icdm.OperatingMode, attr.MaximumCheckInBackOff: test_icdm.MaximumCheckInBackOff, attr.AttributeList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 65528, 65529, 65531, 65532, 65533]}}}
return resp


Expand Down
Loading