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

[CERT-TEST-FAILURE] [TC-TSTAT-2.2] several test steps use hard-coded values for writing instead of the values read from another attribure #35748

Closed
bauerschwan opened this issue Sep 24, 2024 · 8 comments · Fixed by #36023
Assignees
Labels

Comments

@bauerschwan
Copy link
Contributor

bauerschwan commented Sep 24, 2024

Feature Area

Other

Test Case

TC-TSTAT-2.2

Reproduction steps

Perform test case with a DUT which uses different AbsMinHeatSetpointLimit values than the values hard-coded in the YAML script (f.e. 1000 for AbsMinHeatSetpointLimit)

Expected result:
Step 6a should use values derived from AbsMinHeatSetpointLimit and should succeed

Actual result:
Step 6a uses a hard-coded value (800) which is not in range of [AbsMinHeatSetpointLimit... AbsMaxHeatSetpointLimit]

Bug prevalence

every time this test case is performed

GitHub hash of the SDK that was being used

17b1a38

Platform

nrf

Anything else?

No response

@ReneJosefsen
Copy link
Contributor

As a nitpick here, the test case number is wrong in the description.

@raul-marquez-csa
Copy link
Contributor

raul-marquez-csa commented Oct 7, 2024

@bauerschwan, please provide the following:

  • Full list of steps with the stated issue
  • App used as (DUT)
  • Command used to run the test
  • Default PICS or custom PICS?
  • Logs describing the failure/error

@raul-marquez-csa
Copy link
Contributor

raul-marquez-csa commented Oct 7, 2024

@bauerschwan

I have run the test several times without failure, cannot reproduce the bug.
Without the info from my previous comment, I ran it like this:
./scripts/tests/run_test_suite.py --log-level debug --chip-tool out/linux-x64-chip-tool/chip-tool --target Test_TC_TSTAT_2_2 run --all-clusters-app out/linux-x64-thermostat/thermostat-app

However, some observations:

Step 6a uses a hard-coded value (800) which is not in range of [AbsMinHeatSetpointLimit... AbsMaxHeatSetpointLimit]

In the test plan and the YAML, the max value used is MaxHeatSetpointLimit, not AbsMaxHeatSetpointLimit

Test Plan
https://github.com/CHIP-Specifications/chip-test-plans/blob/b9cb9be6fa63c16433928b0ffb4d53d2ee04343c/src/cluster/thermostat.adoc#L759-L762
{3048B337-754B-4538-A85D-61AFD3395D60}

YAML

#Using saved values when optional attributes are available
- label:
"Step 6a: Test Harness Reads MinHeatSetpointLimit attribute from
Server DUT and verifies that the value is within range"
command: "readAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 && TSTAT.S.A0003
response:
constraints:
type: int16s
minValue: AbsMinHeatSetpointLimitValue
maxValue: MaxHeatSetpointLimitValue
#Using hard coded values when optional attributes are not available
- label:
"Step 6a: Test Harness Reads MinHeatSetpointLimit attribute from
Server DUT and verifies that the value is within range"
command: "readAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0016 && !TSTAT.S.A0003
response:
constraints:
type: int16s
minValue: 700
maxValue: 3000
- label:
"Step 6a: Test Harness Writes a value back that is different but valid
for MinHeatSetpointLimit attribute"
command: "writeAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015
arguments:
value: 800
- label:
"Step 6a: Test Harness Reads it back again to confirm the successful
write of MinHeatSetpointLimit attribute"
command: "readAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015
response:
value: 800

Also, as stated by Rene, the test case name in the description doesn't match the one in the title, are the issue details correct in the description?

Thanks.

@bauerschwan
Copy link
Contributor Author

I changed the wrong test case name. Sorry for the confusion.

@fessehaeve
Copy link
Contributor

@raul-marquez-csa the issue is not with the first 6a step - but the 3rd and 4th steps labeled 6a.
The 3rd "step 6a" attempts to write 800 to MinHeatSetpointLimit regardless of the AbsMinHeatSetpointLimit value.

YAML

- label:
"Step 6a: Test Harness Writes a value back that is different but valid
for MinHeatSetpointLimit attribute"
command: "writeAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015
arguments:
value: 800
- label:
"Step 6a: Test Harness Reads it back again to confirm the successful
write of MinHeatSetpointLimit attribute"
command: "readAttribute"
attribute: "MinHeatSetpointLimit"
PICS: TSTAT.S.F00 && TSTAT.S.A0015
response:
value: 800

You are not running to this issue since you are running the test against all-clusters-app which has AbsMinHeatSetpointLimit value of 700.

@CKnoerzer
Copy link

@raul-marquez-csa Is it possible to have in line 875 and line 884 instead of:
value: 800
something like:
value: AbsMinHeatSetpointLimitValue+100

@raul-marquez-csa
Copy link
Contributor

raul-marquez-csa commented Oct 21, 2024

A python implementation of this test case has been developed by @hasty, PR
[HVAC] Implement TC-TSTAT-2.2 #36023

@bauerschwan, is this update still a priority?

@bauerschwan
Copy link
Contributor Author

As soon as #36023 is merged, this issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

7 participants