project-chip / matter-test-scripts

Test scripts related to Matter Certification
https://csa-iot.org/
Apache License 2.0
9 stars 4 forks source link

python testing framework - consider adding guard functions for attribute / command / feature checks. #370

Open cecille opened 2 months ago

cecille commented 2 months ago

Consider adding easier-to-use guard functions for attribute / function / command existence checks.

Ex, something similar to pics_guard, but for features and attributes etc. There are now "has_feature" and "has_attribute" functions, it seems like this might be neater. We could force the tests to pull a full wildcard at the start of the tests (or at least a wildcard of the global attributes). We're kind of going there with the pics reduction stuff anyway.

j-ororke commented 2 months ago

I have created a function under MatterBaseTest class named "attributes_guard" as you had mentioned, this is currently implemented in the Remove_PICS_from_Opstate_Tests PR. Please let me know if this works for the attributes, if so, i could continue on with creating something similar for the commands and features as well.