SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
256 stars 445 forks source link

Add unit tests for appliances, rvc, and room ac #1448

Open ctowns opened 2 months ago

ctowns commented 2 months ago

Some of the Matter 1.2 device type unit tests were left out of the repo so that CI unit tests would not continuously fail due to missing capability definitions in the integration test framework. Once the CI is updated to use the latest lua libs, we can add these tests to the repo because the capability definitions will then be available in the CI lua libs.

Note: This issue is strictly related to unit tests - new capabilities do not have a lua libs dependency on hubs, so even old hubs will get the new capability definitions even if they are running older lua libs.

These unit test all pass locally when running the latest lua libs.

github-actions[bot] commented 2 months ago

Duplicate profile check: Passed - no duplicate profiles detected.

github-actions[bot] commented 2 months ago

Test Results

   61 files  ± 0    378 suites  +3   0s :stopwatch: ±0s 1 836 tests +15  1 827 :white_check_mark: + 6  0 :zzz: ±0  5 :x: +5  4 :fire: +4  3 192 runs  +23  3 182 :white_check_mark: +13  0 :zzz: ±0  6 :x: +6  4 :fire: +4 

For more details on these failures and errors, see this check.

Results for commit 2f693f7b. ± Comparison against base commit 2125c846.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

matter-appliance_coverage.xml

File Coverage
All files 47% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/embedded-cluster-utils.lua 40% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-dishwasher/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-laundry-washer/init.lua 42% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-refrigerator/init.lua 47% :x:

matter-rvc_coverage.xml

File Coverage
All files 48% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/embedded-cluster-utils.lua 40% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-dishwasher/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-laundry-washer/init.lua 42% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-refrigerator/init.lua 47% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-rvc/src/init.lua 48% :x:

matter-thermostat_coverage.xml

File Coverage
All files 81% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/embedded-cluster-utils.lua 40% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-dishwasher/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/init.lua 50% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-laundry-washer/init.lua 42% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-refrigerator/init.lua 47% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-rvc/src/init.lua 48% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/embedded-cluster-utils.lua 42% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 83% :x:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against 2f693f7bade03514d76e7a20e532272a48e2e2e0

ctowns commented 2 months ago

We can merge these in once CI lua libs have been updated. I will follow up on what the timing will be to update the lua libs.

@HunsupJung @yhoyoon I have tried to go through and write unit tests for the major functionality of the appliance, rvc, and room ac device types, but please take a look and add additional unit tests if there are any additional cases to test. Thank you!

Note, some of these unit tests are from the original Matter 1.2 device types PR, but they were intentionally removed to prevent CI unit tests from continuously failing. However, these tests all pass when running locally with the latest lua libs.

github-actions[bot] commented 2 months ago

Invitation URL: https://bestow-regional.api.smartthings.com/invite/Boj0AKe7rJMA

cjswedes commented 1 month ago

I just published the 53 release of the lua libs. Are these unit test changes still needed? They are running against those libs now.

lelandblue commented 1 month ago

@ctowns Should we keep or close this PR?