project-chip / project-chip/matter-test-scripts
[TC-EEVSE-2.2]Add a step to set the expected_state in Step 7 and Step 8e.(Matter1.4)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Description
Please follow the below template to file issues/concerns/feature enhancement against Test Scripts:
Summary Title:
[TC-EEVSE-2.2]Add a step to set the expected_state in Step 7 and Step 8e.
Description:
In Step 5, the expected_state is set to PluggedInCharging at line 198 of the code.
However, in Step 7 and Step 8e, this expected_state is reused, which causes the issue
As a result, during test execution, the DUT fails at this step. The log is as follows:
Test test_TC_EEVSE_2_2 failed for the following reason:
_* Details=<StateEnum.kPluggedInCharging: 3> != <StateEnum.kPluggedInDemand: 2> EnergyTransferStopped event State was 2 expected 3, Extras=None
*
- File "/usr/local/lib/python3.12/dist-packages/mobly/asserts.py", line 50, in _call_unittest_assertion
- mobly.signals.TestFailure: Details=<StateEnum.kPluggedInCharging: 3> != <StateEnum.kPluggedInDemand: 2> EnergyTransferStopped event State was 2 expected 3, Extras=None_
Reason:
When the EVSE state changes, it should trigger an Event. Therefore, in Step 7, since the configured charging time has expired, the device should trigger an EnergyTransferStopped Event.
This event includes a State field, as described in Section 9.3.10.4 of the specification.
The definition of this state field is further detailed in Section 9.3.10.4.2.
Accordingly, the state value at Step 7 must be PluggedInDemand.
However, in the script, line 198 sets expected_state = PluggedInCharging, which causes the test to fail at Step 7.
We suggest adding the following line of code before line 240: expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInDemand.
Similarly, before reading the state in Step 8e, the expected_state should be set to PluggedInCharging. We suggest adding the following line of code before line 276: expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging.
Steps to reproduce:
simulate an EEVSE Cluster, if a Stop event is sent at Step 7, the issue described above will be observed at that step.
Logs:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the test_TC_EEVSE_2_2 implementation and inspect the expected_state assignment around line 198, then trace Steps 7 and 8e around the referenced lines. Reproduce the scenario with a simulated EEVSE and verify that each step checks the state required by its EnergyTransferStopped event and that the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100