Commit 9009c9cd authored by Ranim Naimi's avatar Ranim Naimi
Browse files

added another tag, used the global context variable and added test case to the...

added another tag, used the global context variable and added test case to the file generating the doc
parent 3b9a64f0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ ${first_entity_filename}= building-simple-attributes-sample.jsonld
${second_entity_filename}=      building-simple-attributes-second-sample.jsonld
${entity_type}=                 Building
${airQualityLevel}=             airQualityLevel==6
${context}=                     https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld


*** Test Cases ***    Q_PARAMETER    EXPECTED_STATUS    EXPECTED_COUNT
@@ -30,13 +29,13 @@ ${context}= https://forge.etsi.org/rep/cim/ngsi-ld-test-suit
*** Keywords ***
Check that the total number of matching results is returned if the count parameter is set to true
    [Documentation]    If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.
    [Tags]    e-query    6_3_13
    [Tags]    e-query    5_7_2    6_3_13
    [Arguments]    ${q}    ${expected_status_code}    ${expected_count}
    ${response}=    Query Entities
    ...    entity_types=${entity_type}
    ...    q=${q}
    ...    count=${True}
    ...    context=${context}
    ...    context=${ngsild_test_suite_context}

    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    Check Response Headers Containing NGSILD-Results-Count    ${expected_count}    ${response.headers}
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ class InitialSetup:
            'Setup Initial Context Source Registration Subscription': InitialSetup.init_csr_sub(),
            'Setup Initial Context Source Registration Subscriptions': InitialSetup.init_csr_subs(),
            'Create Initial Context Source Registration and Mock Server': InitialSetup.init_csr_and_server(),
            'Setup Entities' : InitialSetup.init_entities(),
        }

        self.total_files = -1
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ class Requests:
                'params': ['entity_ids', 'entity_types', 'accept',
                           'attrs', 'context', 'geoproperty',
                           'options', 'limit', 'entity_id_pattern',
                           'georel', 'coordinates', 'geometry']
                           'georel', 'coordinates', 'geometry', 'count', 'q']
            },
            'Query Entities Via POST': {
                'positions': [],
+7 −0
Original line number Diff line number Diff line
@@ -224,6 +224,13 @@ class TestCIConsumptions(TestCase):

        self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)

    def test_019_07(self):
        robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot'
        expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_07.json'
        difference_file = f'{self.folder_test_suites}/doc/results/out_019_07.json'

        self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)

    def test_018_01_01(self):
        robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot'
        expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/018_01_01.json'