Commit 1d3eb381 authored by Marco Cavalli's avatar Marco Cavalli
Browse files

fix: update payload references in test cases and enhance documentation for variable usage

parent eef525bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ IOP_003_03_01 Query Entities Of Type OffstreetParking Via GET
    ...    broker_url=${b1_url}
    ...    context=${ngsild_test_suite_context}

    # Agent checks that a success response has been returned with the Full version of OffstreetParking:1 and OffstreetParking:2 without location
    # Agent checks that a success response has been returned with ${first_full_offstreet_payload_filename} and ${offstreet_no_location_payload_filename}
    Check Response Status Code    200    ${response_b1.status_code}
    ${expected_b1_ids}=    Create List    ${first_entity_id}    ${second_entity_id}
    Check Response Body Containing Entities URIS set to    ${expected_b1_ids}    ${response_b1.json()}
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ IOP_002_01_01 Retrieve OffStreetParking:1
    ...    type=OffStreetParking
    Check Response Status Code    200    ${response_b2.status_code}

    # Agent checks that the Entity returned in step (3) is the full Entity
    # Agent checks that the Entity returned in step (3) matches ${first_entity_payload_filename}
    ${expected_b2}=    Load Entity    ${first_entity_payload_filename}    ${first_entity_id}
    Remove From Dictionary    ${expected_b2}    @context
    Check Resource Set To    ${expected_b2}    ${response_b2.json()}
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ IOP_002_02_01 Retrieve OffStreetParking:1
    ...    broker_url=${b1_url}
    ...    type=OffStreetParking

    # Agent checks that a partial success response has been returned and that the Full version of OffStreetParking:1 was returned
    # Agent checks that a partial success response has been returned and that ${first_full_entity_payload_filename} was returned
    Check Response Status Code    200    ${response_b1.status_code}

    # Client sends an HTTP GET request to b2 to retrieve the Entity OffStreetParking:1
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ IOP_001_01_01 Create OffStreetParking:1
    ${expected_full_payload}=    Load Entity    ${entity_payload_filename}    ${entity_id}
    Remove From Dictionary    ${expected_full_payload}    @context

    # Agent checks (with local=true) that the full Entity was created in b1
    # Agent checks (with local=true) that ${entity_payload_filename} was created in b1
    ${response}=    Retrieve Entity
    ...    ${entity_id}
    ...    local=true
+14 −0
Original line number Diff line number Diff line
@@ -61,6 +61,20 @@ Add `[Tags]` to every test case. Use an `iop` tag for interoperability tests, on

Write every documentation step as a standalone line comment inside the test case, immediately before the Robot Framework statement it describes. A comment such as `# Client sends an HTTP GET request to b1` becomes one generated test step. To add details beneath a step, place consecutive comments beginning with `# -` after a normal parent comment. Do not use a `# -` item without a preceding parent comment, and do not rely on comments in setup keywords, keyword implementations, or trailing comments because only full-line comments from the test-case body populate `test_steps`.

When a documentation step refers to a payload that is created, returned, or compared, include the Robot Framework variable containing its path instead of writing the payload description or figure number manually. The variable must be declared in the `*** Variables ***` section and resolve to the relevant payload file. For example:

```robotframework
*** Variables ***
${entity_payload_filename}    interoperability/full-version-of-OffStreetParking1.jsonld

*** Test Cases ***
IOP_001_01_01 Create OffStreetParking:1
    # Client sends an HTTP POST request to b1 to create the entity defined in ${entity_payload_filename}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
```

During statistics generation, `${entity_payload_filename}` in the generated step is replaced with `full-version-of-OffStreetParking1.jsonld`. Only the filename is emitted; the directory path is removed. Do not include explicit figure numbers because the documentation generator infers the corresponding figure from the filename.

## Execution

### Using PyCharm
Loading