rsmp-nordic / rsmp_validator

Official RSMP Nordic automated test tool, build with Ruby and Rpec.
https://rsmp-nordic.github.io/rsmp_validator/
MIT License
4 stars 1 forks source link

ITC-3 reports occupancy (S0207) out of range #453

Open otterdahl opened 3 days ago

otterdahl commented 3 days ago

In recent runs, the ITC-3 reports S0207 occupancy with very large values. However, according to the specification S0207 "occupancy" needs to be between 0 and 100.

[
        {
            "sCI": "S0207",
            "n": "occupancy",
            "q": "recent",
            "s": "201,240,238,11583606,11583606,11583606,11583606,11583606,11583606,11583606"
        }
    ]
otterdahl commented 3 days ago

The validator doesn't catch this issue. Perhaps the test case can be extended

emiltin commented 2 days ago

The limit is specified in out yaml source at: https://github.com/rsmp-nordic/rsmp_schema/blob/main/schemas/tlc/1.2.1/sxl.yaml#L1017

However, it's not currently used when we convert the yaml to this JSON schema: https://github.com/rsmp-nordic/rsmp_schema/blob/main/schemas/tlc/1.2.1/statuses/S0207.json#L65

The reason is that values are send as strings, making validation overly complex with json schema, see: https://github.com/rsmp-nordic/rsmp_schema/issues/94

I think it would be best to catch this in the schema validation, rather than adding code to the validator tests - let's catch issues as soon as possible, we already have the limit defined in the sxl yaml.