SRV/TRAF/PlatTrafficRules.robot TC_MEC_SRV_TRAF_002_OK has multiple issues
Below test case has multiple issues to fix.
- There won't be any
TrafficRule
field in get response body, as expected in theCheck Result Contains
line. We couldn't find it in any of the MEC documents as well about this. -
Check Result Contains
line expects the body as a list of traffic rules, which means the request to get the traffic must beGET ALL
. Current script just query single rule and expects a list of rules, which is wrong.
TC_MEC_SRV_TRAF_002_OK
[Documentation]
... Check that the IUT responds with the information on a specific traffic rule
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get individual traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TrafficRule
Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID}
I guess the script can be fixed like below.
TC_MEC_SRV_TRAF_002_OK
[Documentation]
... Check that the IUT responds with the information on a specific traffic rule
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get list of traffic rules ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TrafficRuleList
Check Result Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID}