From 0da19e39ebfddc1e3344e35ff28a7cb1413606a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 16 Jan 2024 11:28:56 +0100 Subject: [PATCH 01/25] Resolve issues in 038_01, 038_02, and 038_05 --- .../038_01.robot | 15 +++++++- .../038_02.robot | 18 +++++++--- .../038_05.robot | 2 +- doc/analysis/generaterobotdata.py | 1 - resources/AssertionUtils.resource | 34 +++++++++++++++++++ resources/HttpUtils.resource | 5 +-- 6 files changed, 65 insertions(+), 10 deletions(-) diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot index 60796e30..9f671e39 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot @@ -26,9 +26,22 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample ... subscription_id=${subscription_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + + # We need to ignore the Additional Members ('lastFailure', 'lastNotification', 'timesFailed', 'timesSent') + ${ignored_attributes}= Create List + ... ${status_regex_expr} + ... ${lastfailure_regex_expr} + ... ${lastNotification_regex_expr} + ... ${timesFailed_regex_expr} + ... ${timesSent_regex_expr} + Check Created Resource Set To ${subscription_payload} ${response1.json()} ${ignored_attributes} + Check Dictionary Might Contain Additional Members ${response1.json()} lastNotification + Check Dictionary Might Contain Additional Members ${response1.json()} lastFailure + Check Dictionary Might Contain Additional Members ${response1.json()} lastSuccess + Check Dictionary Might Contain Additional Members ${response1.json()} timesSent + *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot index be5f0cae..fe198aac 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot @@ -4,13 +4,13 @@ Documentation Check that you can create a context source registration subs Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample.jsonld +${subscription_id}= ${EMPTY} *** Test Cases *** @@ -18,11 +18,15 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample [Documentation] Check that you can create a context source registration subscription without providing an id and it will be automatically generated [Tags] csrsub-create 5_11_2 ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} + Remove From Dictionary ${subscription_payload} id ${response}= Create Context Source Registration Subscription ${subscription_payload} - ${subscription_id}= Fetch Id From Response Location Header ${response.headers} - Check Response Status Code 201 ${response.status_code} - Check Response Headers Containing URI set to ${subscription_id} ${response.headers} + + Dictionary Should Contain Key ${response.headers} Location msg=HTTP Headers do not contain key 'Location' + ${subscription_id}= Get From Dictionary ${response.headers} Location Set Suite Variable ${subscription_id} + + Check Response Status Code 201 ${response.status_code} + ${response1}= Retrieve Context Source Registration Subscription ... subscription_id=${subscription_id} ... context=${ngsild_test_suite_context} @@ -33,4 +37,8 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample *** Keywords *** Delete Created Context Source Registration Subscriptions - Delete Context Source Registration Subscription ${subscription_id} + IF "${subscription_id}" != "${EMPTY}" + Delete Context Source Registration Subscription ${subscription_id} + ELSE + Log To Console \nThere was no Context Source Registration Subscription to delete\n + END diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot index e3774476..17a1935b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot @@ -20,7 +20,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire [Tags] csrsub-create 5_11_2 ${subscription_payload_sample}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${current_date}= Get Current Date time_zone=UTC result_format=${date_format} - ${expiresAt}= Add Time To Date ${current_date} 10 seconds date_format=${date_format} + ${expiresAt}= Add Time To Date ${current_date} 10 seconds result_format=${date_format} ${subscription_payload}= Update Value To JSON ${subscription_payload_sample} $..expiresAt ${expiresAt} ${response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${response.status_code} diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 65a6d527..6c027032 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -15,7 +15,6 @@ class GenerateRobotData: self.config_variables = ParseVariablesFile() self.robot = ParseRobotFile(filename=robot_file, execdir=execdir, config_file=self.config_variables) - # TODO: the robot file can provide several ApiUtils not only one self.apiutils = [ParseApiUtilsFile(filename=file) for file in self.robot.resource_files] self.robot.set_apiutils(self.apiutils) diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index f288c8a8..1650e4cd 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -14,6 +14,10 @@ ${notification_timestamps_regex_expr}= root\\['last.*'\\] ${notification_endpoint_uri_regex_expr}= root\\['endpoint'\\]\\['uri'\\] ${context_regex_expr}= root\\['@context'\\] ${status_regex_expr}= root\\['status'\\] +${lastfailure_regex_expr}= root\\['lastFailure'\\] +${lastNotification_regex_expr}= root\\['lastNotification'\\] +${timesFailed_regex_expr}= root\\['timesFailed'\\] +${timesSent_regex_expr}= root\\['timesSent'\\] *** Keywords *** @@ -444,3 +448,33 @@ Check Retrieving Context Source Registration ... accept=${accept} ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} + +Check Dictionary Might Contain Additional Members + # Check the Additional Members 5.2.14.2 in the NotificationParams data structure + [Arguments] ${dictionary} ${key} + Log Dictionary Might Contain Key with a specific type + Log Dictionary: ${dictionary} + Log Key: ${key} + + ${value}= Evaluate $dictionary.get($key) + + IF '${value}' != '' and '${value}' != 'None' + IF "${key}" == "lastNotification" or "${key}" == "lastFailure" or "${key}" == "lastSuccess" + # Need to check that there is a DateTime value + ${date}= Parse Ngsild Date ${dictionary}[${key}] + Should Not Be Equal + ... ${date} + ... ${None} + ... The Additional Member ${key} contains a value (${value}) that it is not in DateTime format + END + IF "${key}" == "timesSent" + # Need to check that there is a Integer value + ${type int}= Evaluate type(${dictionary}[${key}]).__name__ + Should Be Equal + ... ${type int} + ... int + ... The Additonal Member ${key} contains a value (${value}) that it is not in Number format + END + ELSE + Log The key '${key}' is not present in the dictionary + END diff --git a/resources/HttpUtils.resource b/resources/HttpUtils.resource index 8c68b6a0..b150ea68 100755 --- a/resources/HttpUtils.resource +++ b/resources/HttpUtils.resource @@ -1,10 +1,11 @@ *** Settings *** Variables ./variables.py -Library String +Library Collections *** Keywords *** Fetch Id From Response Location Header [Arguments] ${response_headers} - ${id}= Fetch From Right ${response_headers['Location']} / + Dictionary Should Contain Key ${response_headers} Location msg=HTTP Headers do not contain key 'Location' + ${id}= Get From Dictionary ${response_headers} Location RETURN ${id} -- GitLab From a579aeadc7506d5dca90eef18db942102a9f9948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 15 Feb 2024 09:43:09 +0100 Subject: [PATCH 02/25] Update keywords generation and update robotframework-tidy package --- README.md | 2 +- doc/analysis/generaterobotdata.py | 49 +++++++++++-------- doc/analysis/initial_setup.py | 14 ++++-- doc/analysis/parseapiutilsfile.py | 17 +++---- doc/analysis/parserobotfile.py | 4 +- doc/files/CommonBehaviours/044_01.json | 5 +- doc/files/CommonBehaviours/044_02.json | 5 +- .../Consumption/018_02.json | 4 +- .../Consumption/018_04.json | 4 +- .../Consumption/018_05.json | 1 + .../Consumption/018_06.json | 6 ++- .../Consumption/020_03.json | 5 +- .../Consumption/020_04.json | 6 ++- .../Consumption/020_05.json | 6 ++- .../Consumption/020_09.json | 6 ++- .../Consumption/021_01.json | 6 ++- .../Consumption/021_09.json | 6 ++- .../Consumption/021_10.json | 5 +- .../Consumption/021_11.json | 6 ++- .../Consumption/021_13.json | 6 ++- .../Consumption/022_01.json | 6 ++- .../Consumption/023_01.json | 6 ++- .../Consumption/025_01.json | 6 ++- .../Consumption/026_01.json | 6 ++- .../ContextInformation/Provision/001_01.json | 5 +- .../ContextInformation/Provision/001_02.json | 4 +- .../ContextInformation/Provision/001_04.json | 4 +- .../ContextInformation/Provision/001_05.json | 4 +- .../ContextInformation/Provision/001_07.json | 4 +- .../ContextInformation/Provision/002_02.json | 4 +- .../ContextInformation/Provision/003_01.json | 5 +- .../ContextInformation/Provision/003_03.json | 4 +- .../ContextInformation/Provision/003_04.json | 4 +- .../ContextInformation/Provision/003_05.json | 4 +- .../ContextInformation/Provision/003_07.json | 4 +- .../ContextInformation/Provision/004_01.json | 5 +- .../ContextInformation/Provision/004_02.json | 6 ++- .../ContextInformation/Provision/004_03.json | 6 ++- .../ContextInformation/Provision/004_04.json | 6 ++- .../ContextInformation/Provision/004_05.json | 4 +- .../ContextInformation/Provision/004_06.json | 4 +- .../ContextInformation/Provision/005_01.json | 6 ++- .../ContextInformation/Provision/005_02.json | 6 ++- .../ContextInformation/Provision/005_04.json | 8 +-- .../ContextInformation/Provision/006_01.json | 4 +- .../ContextInformation/Provision/006_02.json | 4 +- .../ContextInformation/Provision/006_03.json | 4 +- .../ContextInformation/Provision/007_01.json | 5 +- .../ContextInformation/Provision/007_02.json | 4 +- .../ContextInformation/Provision/007_03.json | 4 +- .../ContextInformation/Provision/009_01.json | 4 +- .../ContextInformation/Provision/009_02.json | 8 +-- .../ContextInformation/Provision/010_01.json | 6 ++- .../ContextInformation/Provision/010_02.json | 6 ++- .../ContextInformation/Provision/010_04.json | 6 ++- .../ContextInformation/Provision/010_05.json | 5 +- .../ContextInformation/Provision/011_01.json | 6 ++- .../ContextInformation/Provision/011_02.json | 6 ++- .../ContextInformation/Provision/011_04.json | 5 +- .../ContextInformation/Provision/012_01.json | 6 ++- .../ContextInformation/Provision/012_02.json | 6 ++- .../ContextInformation/Provision/012_03.json | 6 ++- .../ContextInformation/Provision/013_01.json | 5 +- .../ContextInformation/Provision/013_02.json | 6 ++- .../ContextInformation/Provision/013_03.json | 6 ++- .../ContextInformation/Provision/014_02.json | 4 +- .../ContextInformation/Provision/014_04.json | 5 +- .../ContextInformation/Provision/015_01.json | 6 ++- .../ContextInformation/Provision/015_02.json | 6 ++- .../ContextInformation/Provision/015_03.json | 6 ++- .../ContextInformation/Provision/016_02.json | 6 ++- .../ContextInformation/Provision/016_03.json | 6 ++- .../ContextInformation/Provision/017_02.json | 6 ++- .../ContextInformation/Provision/017_03.json | 6 ++- .../Subscription/028_02.json | 4 +- .../Subscription/028_03.json | 1 + .../Subscription/029_01.json | 4 +- .../Subscription/029_07.json | 1 + .../Subscription/029_08.json | 1 + .../Subscription/030_01.json | 4 +- .../Subscription/031_02.json | 6 ++- .../Subscription/032_01.json | 4 +- .../Subscription/046_01.json | 6 ++- .../Subscription/046_02.json | 5 +- .../Subscription/046_03.json | 6 ++- .../Subscription/046_04.json | 5 +- .../Subscription/046_05.json | 5 +- .../Subscription/046_07.json | 2 + .../Subscription/046_08.json | 2 + .../Subscription/046_09.json | 5 +- .../Subscription/046_10.json | 5 +- .../Subscription/046_11.json | 6 ++- .../Subscription/046_12.json | 6 ++- .../Subscription/046_13.json | 4 ++ .../Subscription/046_14.json | 6 ++- doc/files/ContextSource/Discovery/036_01.json | 4 +- doc/files/ContextSource/Discovery/036_05.json | 6 ++- doc/files/ContextSource/Discovery/037_01.json | 6 ++- doc/files/ContextSource/Discovery/037_03.json | 4 +- doc/files/ContextSource/Discovery/037_05.json | 5 +- doc/files/ContextSource/Discovery/037_06.json | 6 ++- doc/files/ContextSource/Discovery/037_07.json | 6 ++- doc/files/ContextSource/Discovery/037_09.json | 5 +- doc/files/ContextSource/Discovery/037_10.json | 6 ++- doc/files/ContextSource/Discovery/037_11.json | 6 ++- .../ContextSource/Registration/033_03.json | 5 +- .../ContextSource/Registration/033_10.json | 4 +- .../ContextSource/Registration/034_01.json | 6 ++- .../ContextSource/Registration/034_02.json | 6 ++- .../ContextSource/Registration/034_04.json | 5 +- .../ContextSource/Registration/034_05.json | 6 ++- .../ContextSource/Registration/034_06.json | 6 ++- .../ContextSource/Registration/035_02.json | 6 ++- .../RegistrationSubscription/038_07.json | 5 +- .../RegistrationSubscription/038_08.json | 4 +- .../RegistrationSubscription/039_01.json | 5 +- .../RegistrationSubscription/039_04.json | 6 ++- .../RegistrationSubscription/039_05.json | 5 +- .../RegistrationSubscription/040_01.json | 5 +- .../RegistrationSubscription/041_01.json | 5 +- .../RegistrationSubscription/041_02.json | 6 ++- .../RegistrationSubscription/041_03.json | 6 ++- .../RegistrationSubscription/041_04.json | 4 +- .../RegistrationSubscription/042_01.json | 4 +- .../RegistrationSubscription/047_02.json | 5 +- .../RegistrationSubscription/047_03.json | 5 +- .../RegistrationSubscription/047_04.json | 5 +- .../RegistrationSubscription/047_05.json | 5 +- .../RegistrationSubscription/047_06.json | 5 +- .../RegistrationSubscription/047_07.json | 6 ++- .../RegistrationSubscription/047_08.json | 5 +- .../RegistrationSubscription/047_10.json | 5 +- .../RegistrationSubscription/047_12.json | 5 +- .../RegistrationSubscription/047_13.json | 5 +- .../RegistrationSubscription/047_14.json | 5 +- .../RegistrationSubscription/047_15.json | 5 +- .../RegistrationSubscription/047_16.json | 6 ++- requirements.txt | 2 +- 138 files changed, 590 insertions(+), 167 deletions(-) diff --git a/README.md b/README.md index 74123594..91331c39 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ Robot Framework. Our recommendations are: - Install [Robot Framework Language Server](https://plugins.jetbrains.com/plugin/16086-robot-framework-language-server) - Define as variable the path of the working directory. In Settings > Languages & Frameworks > Robot Framework -(Project), insert the following: `{"EXECDIR": "{path}/auth-test-suite"}`. +(Project), insert the following: `{"EXECDIR": "{path}/ngsi-ld-test-suite"}`. ### Run configurations (PyCharm) diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 6c027032..ca6f418d 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -1,9 +1,9 @@ from os.path import dirname from robot.api import TestSuiteBuilder -from analysis.parserobotfile import ParseRobotFile -from analysis.parseapiutilsfile import ParseApiUtilsFile -from analysis.parsevariablesfile import ParseVariablesFile -from analysis.initial_setup import InitialSetup +from doc.analysis.parserobotfile import ParseRobotFile +from doc.analysis.parseapiutilsfile import ParseApiUtilsFile +from doc.analysis.parsevariablesfile import ParseVariablesFile +from doc.analysis.initial_setup import InitialSetup from re import match, findall, finditer, sub, MULTILINE @@ -102,7 +102,6 @@ class GenerateRobotData: self.initial_setup = InitialSetup() - def get_info(self): self.test_suite['robotpath'] = (self.robot_file.replace(f'{self.execdir}/TP/NGSI-LD/', '') .replace(f'/{self.robot.test_suite}.robot', '')) @@ -122,7 +121,7 @@ class GenerateRobotData: # Generate the initial_condition of the test suite self.test_suite['initial_condition'] = self.generate_initial_condition() - def generate_initial_condition(self) -> str : + def generate_initial_condition(self) -> str: aux = [x['setup'] for x in self.test_cases] if all(element == aux[0] for element in aux[1:]): aux = self.initial_setup.get_initial_condition(initial_condition=aux[0]) @@ -131,7 +130,8 @@ class GenerateRobotData: print(f'Something went wrong, the test suite {self.suite.resource.source} ' f'has different "setup" values for its test cases.') - def get_permutation_keys(self, data): + @staticmethod + def get_permutation_keys(data): all_keys = set().union(*data) excluded_keys = ['doc', 'permutation_tp_id', 'setup', 'teardown', 'name', 'tags'] all_keys = [x for x in all_keys if x not in excluded_keys] @@ -154,7 +154,7 @@ class GenerateRobotData: def get_params(self, test_case: str): test_case = self.get_data_template(string=test_case) - lines_starting_response = findall(r'^\s*\$\{response\}.*|^\s*\$\{notification\}.*', test_case, MULTILINE) + lines_starting_response = findall(r'^\s*\$\{response}.*|^\s*\$\{notification}.*', test_case, MULTILINE) # If there is more than one line, it means that the test case has several operations, all of them to # create the environment content to execute the last one, which is the correct one to test the Test Case @@ -171,7 +171,7 @@ class GenerateRobotData: aux = [x for x in aux if x != ''] params = list() - request = str() + request = list() # Get the list of params of the function, they are the keys if ' ... ' in aux[1]: @@ -181,7 +181,7 @@ class GenerateRobotData: # We are in the case that the attributes are in following lines for i in range(1, len(aux)): if ' ... ' in aux[i]: - regex = '(\s{4})*\s{4}\.{3}\s{4}(.*)' + regex = r'(\s{4})*\s{4}\.{3}\s{4}(.*)' param = match(pattern=regex, string=aux[i]) if aux: params.append(param.groups()[1]) @@ -193,8 +193,8 @@ class GenerateRobotData: matches = finditer(regex, response_to_check, MULTILINE) request = aux[0].split(' ')[2] - # We have two options from here, or the parameters are defined in the same line or the parameters are defined in - # following lines, next lines + # We have two options from here, or the parameters are defined in the same line or the parameters are + # defined in following lines, next lines for a_match in matches: # Check that we have 1 group matched if len(a_match.groups()) == 1: @@ -215,6 +215,9 @@ class GenerateRobotData: request, params = self.get_params(test_case=string) + verb = str() + query_param = str() + url = str() for data in self.apiutils: verb, url, query_param = data.get_response(keyword=request) if verb != '': @@ -245,6 +248,7 @@ class GenerateRobotData: key = header_key[0] value = self.get_header_value(key=key) else: + aux = list() # 2nd case, maybe the params are defined in the way = for k in self.headers: aux = [x for x in params if k in x] @@ -270,10 +274,10 @@ class GenerateRobotData: def get_values_url(self, keys: list, query_param: bool, request: str, params: list) -> str: data = [self.get_value_url(key=x, request=request, params=params) for x in keys] - if query_param == False: - data = '/'.join(data).replace('//', '/').replace('?/','?') + if not query_param: + data = '/'.join(data).replace('//', '/').replace('?/', '?') else: - aux = '/'.join(data[:-1]).replace('//', '/').replace('?/','?') + aux = '/'.join(data[:-1]).replace('//', '/').replace('?/', '?') data = f"{aux}?{data[-1]}" return data @@ -374,6 +378,8 @@ class GenerateRobotData: tp_id = self.generate_name() reference, pics = self.generate_reference(version=version) + # TODO: robotframework==7.0 has not property keywords in the class TestSuite(), we can get the data from + # [x.to_dict()['name'] for x in list(self.suite.resource.keywords)] but with some differences in execution code self.test_suite = { 'tp_id': tp_id, 'test_objective': self.suite.doc, @@ -381,7 +387,8 @@ class GenerateRobotData: 'config_id': str(), 'parent_release': version, 'pics_selection': pics, - 'keywords': [str(x) for x in self.suite.keywords], + # 'keywords': [str(x) for x in self.suite.keywords], + 'keywords': [x.to_dict()['name'] for x in list(self.suite.resource.keywords)], 'teardown': str(self.suite.teardown), 'initial_condition': str(), 'test_cases': list() @@ -493,7 +500,6 @@ class GenerateRobotData: self.args = dict() _ = [self.args.update(x) for x in args] - template_name = list(set([list(x.keywords)[0].name for x in self.suite.tests]))[0] # Due to the information of the tags are contained in the Keyword description of the template, we need to @@ -534,7 +540,8 @@ class GenerateRobotData: return reference, pics - def get_substring(self, string: str, key: str): + @staticmethod + def get_substring(string: str, key: str): pos1 = string.find(key) - 1 pos2 = string[pos1:].find('\n') result = string[pos1:pos1+pos2].split(' ') @@ -545,15 +552,15 @@ class GenerateRobotData: # check_tags = all(item == tags[0] for item in tags) # # if check_tags is False or len(tags) == 0: - # raise Exception(f'ERROR: the Test Suite {{self.suite.name}} has different clauses or no clauses (Tags): {tags}\n' - # f'Unable to select the corresponding Reference of this Test Suite') + # raise Exception(f'ERROR: the Test Suite {{self.suite.name}} has different clauses or no clauses (Tags): ' + # f'{tags}\nUnable to select the corresponding Reference of this Test Suite') # else: # # All the clauses are the same, so we select the first one # reference = f'{{self.references[version]}}{tags[0].replace("_", ".")}' # pics = f'PICS_{tags[0]}' # # return reference, pics - aux = [x for x in tags if match(pattern='^(\d+_\d+_\d+)', string=x)] + aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)', string=x)] if len(aux) == 0: raise Exception( diff --git a/doc/analysis/initial_setup.py b/doc/analysis/initial_setup.py index 0ac02753..a23d9077 100644 --- a/doc/analysis/initial_setup.py +++ b/doc/analysis/initial_setup.py @@ -227,12 +227,12 @@ class InitialSetup: if len(deleted_setup) != 0: print(f" WARNING: Some of the Setup functions were deleted:\n{deleted_setup}") else: - print(" INFO: All current Setup functions are used in the Robot files") + print(f" INFO: All current Setup functions are used in the Robot files") if len(not_included_keys) != 0: print(f" ERROR: Some Setup functions are not include in the Class:\n{not_included_keys}") else: - print(" INFO: All the current Setup functions used in Robot files are included in the Class") + print(f" INFO: All the current Setup functions used in Robot files are included in the Class") print() @@ -264,14 +264,20 @@ class InitialSetup: def get_initial_condition(self, initial_condition: str) -> str: try: - return self.init[initial_condition] + if initial_condition is not None: + data = self.init[initial_condition] + else: + data = '''with { + the SUT containing an initial state +}''' except KeyError: print(f"ERROR: the initial condition '{initial_condition}' is not defined in the dictionary. " f"Please check it and add the new initial condition.") data = '''with { the SUT containing an initial state }''' - return data + + return data if __name__ == "__main__": diff --git a/doc/analysis/parseapiutilsfile.py b/doc/analysis/parseapiutilsfile.py index 3c55f93a..d1caf382 100644 --- a/doc/analysis/parseapiutilsfile.py +++ b/doc/analysis/parseapiutilsfile.py @@ -21,10 +21,9 @@ class ParseApiUtilsFile: string = string[index:] string = string.split('\n') - index = None for i, item in enumerate(string): if 'response' in item: - regex = "\s{4}\$\{response\}=\s{4}(POST|GET|PUT|PATCH|DELETE).*" + regex = r"\s{4}\$\{response\}=\s{4}(POST|GET|PUT|PATCH|DELETE).*" match = re.match(pattern=regex, string=item) if match: @@ -35,8 +34,8 @@ class ParseApiUtilsFile: return verb, url, query_param @staticmethod - def get_url_request(url: str) -> list: - # We have two options, the url is defined in the same line of the response or it is defined in the following + def get_url_request(url: str) -> [list, bool]: + # We have two options, the url is defined in the same line of the response, or it is defined in the following # lines with '...' keys = list() parameters = list() @@ -57,7 +56,7 @@ class ParseApiUtilsFile: aux = parameters[0] query_param = True - keys = re.split(r'\$|/', aux) + keys = re.split(r'[$/]', aux) keys = [k for k in keys if k != ''] if len(parameters) != 0: @@ -68,7 +67,7 @@ class ParseApiUtilsFile: match = re.match(pattern=regex, string=url) if match: aux = match.groups()[0] - keys = re.split(r'\$|/', aux) + keys = re.split(r'[$/]', aux) keys = [k for k in keys if k != ''] return keys, query_param @@ -81,7 +80,7 @@ class ParseApiUtilsFile: def get_variables_data_variables(self, string): # Get the simple variables from the file - regex = "^(\$\{.*\})\s*(.*)\n" + regex = r"^(\$\{.*\})\s*(.*)\n" matches = re.finditer(regex, string, re.MULTILINE) for match in matches: @@ -94,7 +93,7 @@ class ParseApiUtilsFile: def get_variables_data_dictionaries(self, string): # Get the dictionary variables from the file - regex = '(\&\{.*\})' + regex = r'(\&\{.*\})' matches = re.finditer(regex, string, re.MULTILINE) for match in matches: # Check that we have two groups matched @@ -109,7 +108,7 @@ class ParseApiUtilsFile: index = aux.find('\n${') aux = aux[:index + 1] - regex = '\.{3}[ ]*([a-zA-Z]+)=(.*)\n' + regex = r'\.{3}[ ]*([a-zA-Z]+)=(.*)\n' matches2 = re.finditer(regex, aux, re.MULTILINE) dict_values = dict() for match2 in matches2: diff --git a/doc/analysis/parserobotfile.py b/doc/analysis/parserobotfile.py index 6fe294d6..2d9666b5 100644 --- a/doc/analysis/parserobotfile.py +++ b/doc/analysis/parserobotfile.py @@ -1,7 +1,7 @@ import re import os -from analysis.checks import Checks -from analysis.requests import Requests +from doc.analysis.checks import Checks +from doc.analysis.requests import Requests class ParseRobotFile: diff --git a/doc/files/CommonBehaviours/044_01.json b/doc/files/CommonBehaviours/044_01.json index 08dc3317..8f4f8182 100644 --- a/doc/files/CommonBehaviours/044_01.json +++ b/doc/files/CommonBehaviours/044_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_4", - "keywords": [], + "keywords": [ + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/CommonBehaviours/044_02.json b/doc/files/CommonBehaviours/044_02.json index 3ffd349f..e8b9b514 100644 --- a/doc/files/CommonBehaviours/044_02.json +++ b/doc/files/CommonBehaviours/044_02.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_4", - "keywords": [], + "keywords": [ + "Create Initial Subscription", + "Delete Initial Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/018_02.json b/doc/files/ContextInformation/Consumption/018_02.json index 68c66c6d..1d80e2b4 100644 --- a/doc/files/ContextInformation/Consumption/018_02.json +++ b/doc/files/ContextInformation/Consumption/018_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_1", - "keywords": [], + "keywords": [ + "Get Entity With Invalid Id" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/018_04.json b/doc/files/ContextInformation/Consumption/018_04.json index 2c1385c2..f2f433bf 100644 --- a/doc/files/ContextInformation/Consumption/018_04.json +++ b/doc/files/ContextInformation/Consumption/018_04.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_7", - "keywords": [], + "keywords": [ + "Delete Created Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/018_05.json b/doc/files/ContextInformation/Consumption/018_05.json index 0a4d7392..a9214289 100644 --- a/doc/files/ContextInformation/Consumption/018_05.json +++ b/doc/files/ContextInformation/Consumption/018_05.json @@ -6,6 +6,7 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_7", "keywords": [ + "Retrieve Entity In GeoJSON Representation", "Create Initial Entity", "Delete Created Entity" ], diff --git a/doc/files/ContextInformation/Consumption/018_06.json b/doc/files/ContextInformation/Consumption/018_06.json index 5e3077bf..f4443890 100644 --- a/doc/files/ContextInformation/Consumption/018_06.json +++ b/doc/files/ContextInformation/Consumption/018_06.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Review JSON-LD Resolution When retrieving an entity", + "Setup Initial Entity", + "Delete Created Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/020_03.json b/doc/files/ContextInformation/Consumption/020_03.json index ed4f98dc..34a1228e 100644 --- a/doc/files/ContextInformation/Consumption/020_03.json +++ b/doc/files/ContextInformation/Consumption/020_03.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_3", - "keywords": [], + "keywords": [ + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/020_04.json b/doc/files/ContextInformation/Consumption/020_04.json index 8bf0283e..01886e22 100644 --- a/doc/files/ContextInformation/Consumption/020_04.json +++ b/doc/files/ContextInformation/Consumption/020_04.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_3", - "keywords": [], + "keywords": [ + "Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal query", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/020_05.json b/doc/files/ContextInformation/Consumption/020_05.json index 1c9c8601..1b70c051 100644 --- a/doc/files/ContextInformation/Consumption/020_05.json +++ b/doc/files/ContextInformation/Consumption/020_05.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_3", - "keywords": [], + "keywords": [ + "Retrieve the temporal evolution of the last N instances of entity attributes", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/020_09.json b/doc/files/ContextInformation/Consumption/020_09.json index aa5e2355..50587ad0 100644 --- a/doc/files/ContextInformation/Consumption/020_09.json +++ b/doc/files/ContextInformation/Consumption/020_09.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_3", - "keywords": [], + "keywords": [ + "Retrieve the temporal evolution of an entity with an invalid request content", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/021_01.json b/doc/files/ContextInformation/Consumption/021_01.json index c05c5547..40990465 100644 --- a/doc/files/ContextInformation/Consumption/021_01.json +++ b/doc/files/ContextInformation/Consumption/021_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_4", - "keywords": [], + "keywords": [ + "Query the temporal evolution of entities", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/021_09.json b/doc/files/ContextInformation/Consumption/021_09.json index 15397ff1..f0904018 100644 --- a/doc/files/ContextInformation/Consumption/021_09.json +++ b/doc/files/ContextInformation/Consumption/021_09.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_4", - "keywords": [], + "keywords": [ + "Query the temporal evolution of entities matching the given NGSI-LD geo-query", + "Setup Initial Temporal Entities", + "Delete Initial Temporal Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an a list of Temporal Entities \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/021_10.json b/doc/files/ContextInformation/Consumption/021_10.json index 922a1c38..1f03a1b5 100644 --- a/doc/files/ContextInformation/Consumption/021_10.json +++ b/doc/files/ContextInformation/Consumption/021_10.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_4", - "keywords": [], + "keywords": [ + "Create Initial Context Source Registration and Mock Server", + "Delete Initial Context Source Registration and Mock Server" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing a Context Source Registration of a context source (CS1) \n providing temporal information of two entities of type Building between 2020-08-01T22:07:00Z and 2021-08-01T21:07:00Z\n and CS1 containing two temporal entities of type Building and temporal evolution of those entities in the mentioned interval.\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/021_11.json b/doc/files/ContextInformation/Consumption/021_11.json index b13757a8..eaca8c52 100644 --- a/doc/files/ContextInformation/Consumption/021_11.json +++ b/doc/files/ContextInformation/Consumption/021_11.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_4", - "keywords": [], + "keywords": [ + "Query the temporal evolution of entities with a limit to the number of entities to be retrieved", + "Setup Initial Temporal Entities", + "Delete Initial Temporal Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an a list of Temporal Entities \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/021_13.json b/doc/files/ContextInformation/Consumption/021_13.json index 9123eb14..39175c52 100644 --- a/doc/files/ContextInformation/Consumption/021_13.json +++ b/doc/files/ContextInformation/Consumption/021_13.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_4", - "keywords": [], + "keywords": [ + "Query the temporal evolution of entities using the entityOperations method", + "Setup Initial Temporal Entities", + "Delete Initial Temporal Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an a list of Temporal Entities \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/022_01.json b/doc/files/ContextInformation/Consumption/022_01.json index 62cde431..56246dee 100644 --- a/doc/files/ContextInformation/Consumption/022_01.json +++ b/doc/files/ContextInformation/Consumption/022_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_5", - "keywords": [], + "keywords": [ + "Retrieve Available Entity Types", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/023_01.json b/doc/files/ContextInformation/Consumption/023_01.json index 80cca411..441518b8 100644 --- a/doc/files/ContextInformation/Consumption/023_01.json +++ b/doc/files/ContextInformation/Consumption/023_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_6", - "keywords": [], + "keywords": [ + "Retrieve Details Of Available Entity Types", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/025_01.json b/doc/files/ContextInformation/Consumption/025_01.json index 825e469e..689a6980 100644 --- a/doc/files/ContextInformation/Consumption/025_01.json +++ b/doc/files/ContextInformation/Consumption/025_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_8", - "keywords": [], + "keywords": [ + "Retrieve Available Attributes", + "Setup Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Consumption/026_01.json b/doc/files/ContextInformation/Consumption/026_01.json index d94cc0c3..96bdf03a 100644 --- a/doc/files/ContextInformation/Consumption/026_01.json +++ b/doc/files/ContextInformation/Consumption/026_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_7_9", - "keywords": [], + "keywords": [ + "Retrieve Details Of Available Attributes", + "Setup Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/001_01.json b/doc/files/ContextInformation/Provision/001_01.json index 3abb22a9..ae3f33db 100644 --- a/doc/files/ContextInformation/Provision/001_01.json +++ b/doc/files/ContextInformation/Provision/001_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_1", - "keywords": [], + "keywords": [ + "Create Entity Scenarios", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/001_02.json b/doc/files/ContextInformation/Provision/001_02.json index cc166c74..cb3fc28b 100644 --- a/doc/files/ContextInformation/Provision/001_02.json +++ b/doc/files/ContextInformation/Provision/001_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_1", - "keywords": [], + "keywords": [ + "Create Entity With Invalid Request Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/001_04.json b/doc/files/ContextInformation/Provision/001_04.json index 5b664193..a15de64b 100644 --- a/doc/files/ContextInformation/Provision/001_04.json +++ b/doc/files/ContextInformation/Provision/001_04.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/001_05.json b/doc/files/ContextInformation/Provision/001_05.json index 256221ec..ac066491 100644 --- a/doc/files/ContextInformation/Provision/001_05.json +++ b/doc/files/ContextInformation/Provision/001_05.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/001_07.json b/doc/files/ContextInformation/Provision/001_07.json index 96278f09..70365280 100644 --- a/doc/files/ContextInformation/Provision/001_07.json +++ b/doc/files/ContextInformation/Provision/001_07.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/002_02.json b/doc/files/ContextInformation/Provision/002_02.json index b09439d2..1d180f7b 100644 --- a/doc/files/ContextInformation/Provision/002_02.json +++ b/doc/files/ContextInformation/Provision/002_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_6", - "keywords": [], + "keywords": [ + "Delete Entity Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/003_01.json b/doc/files/ContextInformation/Provision/003_01.json index 62bfec35..894d7b81 100644 --- a/doc/files/ContextInformation/Provision/003_01.json +++ b/doc/files/ContextInformation/Provision/003_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_7", - "keywords": [], + "keywords": [ + "Batch Create Entity Scenarios", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/003_03.json b/doc/files/ContextInformation/Provision/003_03.json index 3b29aa0e..fb10110b 100644 --- a/doc/files/ContextInformation/Provision/003_03.json +++ b/doc/files/ContextInformation/Provision/003_03.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_7", - "keywords": [], + "keywords": [ + "Create Batch Entity With Invalid Request Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/003_04.json b/doc/files/ContextInformation/Provision/003_04.json index 6a1062a9..bd57e633 100644 --- a/doc/files/ContextInformation/Provision/003_04.json +++ b/doc/files/ContextInformation/Provision/003_04.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/003_05.json b/doc/files/ContextInformation/Provision/003_05.json index dbe38f61..f58bd342 100644 --- a/doc/files/ContextInformation/Provision/003_05.json +++ b/doc/files/ContextInformation/Provision/003_05.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/003_07.json b/doc/files/ContextInformation/Provision/003_07.json index 71e53ac4..71f78cf9 100644 --- a/doc/files/ContextInformation/Provision/003_07.json +++ b/doc/files/ContextInformation/Provision/003_07.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_01.json b/doc/files/ContextInformation/Provision/004_01.json index ad9eaa23..6e13f445 100644 --- a/doc/files/ContextInformation/Provision/004_01.json +++ b/doc/files/ContextInformation/Provision/004_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Batch Upsert Entity Scenarios", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_02.json b/doc/files/ContextInformation/Provision/004_02.json index 545c6484..5383a3e4 100644 --- a/doc/files/ContextInformation/Provision/004_02.json +++ b/doc/files/ContextInformation/Provision/004_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Batch Upsert Non-existing And Existing Entities Scenarios", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_03.json b/doc/files/ContextInformation/Provision/004_03.json index c3b2ba6a..e3a0028c 100644 --- a/doc/files/ContextInformation/Provision/004_03.json +++ b/doc/files/ContextInformation/Provision/004_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Batch Upsert Existing Entities Scenarios", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_04.json b/doc/files/ContextInformation/Provision/004_04.json index 8ddb4413..70f095cf 100644 --- a/doc/files/ContextInformation/Provision/004_04.json +++ b/doc/files/ContextInformation/Provision/004_04.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Batch Upsert Entities With Update Option Scenarios", + "Setup Initial Entity", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_05.json b/doc/files/ContextInformation/Provision/004_05.json index 2b7aa4e5..d9e269ce 100644 --- a/doc/files/ContextInformation/Provision/004_05.json +++ b/doc/files/ContextInformation/Provision/004_05.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Delete Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/004_06.json b/doc/files/ContextInformation/Provision/004_06.json index 5fc8e198..ba6ce71e 100644 --- a/doc/files/ContextInformation/Provision/004_06.json +++ b/doc/files/ContextInformation/Provision/004_06.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_8", - "keywords": [], + "keywords": [ + "Batch Upsert Entity With Invalid Request Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/005_01.json b/doc/files/ContextInformation/Provision/005_01.json index ca5d74d8..5eb0a7a2 100644 --- a/doc/files/ContextInformation/Provision/005_01.json +++ b/doc/files/ContextInformation/Provision/005_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_9", - "keywords": [], + "keywords": [ + "Batch Update Entity Scenarios", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/005_02.json b/doc/files/ContextInformation/Provision/005_02.json index 57e8775c..12106f8b 100644 --- a/doc/files/ContextInformation/Provision/005_02.json +++ b/doc/files/ContextInformation/Provision/005_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_9", - "keywords": [], + "keywords": [ + "Batch Update Entity With NoOverwrite Option Scenarios", + "Setup Initial Entities", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/005_04.json b/doc/files/ContextInformation/Provision/005_04.json index db986616..12be9209 100644 --- a/doc/files/ContextInformation/Provision/005_04.json +++ b/doc/files/ContextInformation/Provision/005_04.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_9", - "keywords": [], + "keywords": [ + "Batch Update Entity With Invalid Request Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ @@ -43,8 +45,8 @@ } ], "permutations": [ - "when", - "then" + "then", + "when" ], "robotpath": "ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities", "robotfile": "005_04" diff --git a/doc/files/ContextInformation/Provision/006_01.json b/doc/files/ContextInformation/Provision/006_01.json index 75e9fd5d..9687c6ec 100644 --- a/doc/files/ContextInformation/Provision/006_01.json +++ b/doc/files/ContextInformation/Provision/006_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_10", - "keywords": [], + "keywords": [ + "Setup Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/006_02.json b/doc/files/ContextInformation/Provision/006_02.json index b43c0b51..271d3788 100644 --- a/doc/files/ContextInformation/Provision/006_02.json +++ b/doc/files/ContextInformation/Provision/006_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_10", - "keywords": [], + "keywords": [ + "Setup Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/006_03.json b/doc/files/ContextInformation/Provision/006_03.json index 7c16cd7c..d7d3ba19 100644 --- a/doc/files/ContextInformation/Provision/006_03.json +++ b/doc/files/ContextInformation/Provision/006_03.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_10", - "keywords": [], + "keywords": [ + "Batch Delete Entity With Invalid Request Scenarios" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/007_01.json b/doc/files/ContextInformation/Provision/007_01.json index 6f38a5fa..b35f5316 100644 --- a/doc/files/ContextInformation/Provision/007_01.json +++ b/doc/files/ContextInformation/Provision/007_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_11", - "keywords": [], + "keywords": [ + "Create Temporal Entity", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/007_02.json b/doc/files/ContextInformation/Provision/007_02.json index 4756eb1c..aad0ae7c 100644 --- a/doc/files/ContextInformation/Provision/007_02.json +++ b/doc/files/ContextInformation/Provision/007_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_11", - "keywords": [], + "keywords": [ + "Create Temporal Entity From File" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/007_03.json b/doc/files/ContextInformation/Provision/007_03.json index 784d6c03..acb58838 100644 --- a/doc/files/ContextInformation/Provision/007_03.json +++ b/doc/files/ContextInformation/Provision/007_03.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_11", - "keywords": [], + "keywords": [ + "Create Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/009_01.json b/doc/files/ContextInformation/Provision/009_01.json index 398efebe..9ce1428f 100644 --- a/doc/files/ContextInformation/Provision/009_01.json +++ b/doc/files/ContextInformation/Provision/009_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_16", - "keywords": [], + "keywords": [ + "Create Initial Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/009_02.json b/doc/files/ContextInformation/Provision/009_02.json index 16520950..e968b68c 100644 --- a/doc/files/ContextInformation/Provision/009_02.json +++ b/doc/files/ContextInformation/Provision/009_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_16", - "keywords": [], + "keywords": [ + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ @@ -43,8 +45,8 @@ } ], "permutations": [ - "when", - "then" + "then", + "when" ], "robotpath": "ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity", "robotfile": "009_02" diff --git a/doc/files/ContextInformation/Provision/010_01.json b/doc/files/ContextInformation/Provision/010_01.json index e87d84eb..8b042187 100644 --- a/doc/files/ContextInformation/Provision/010_01.json +++ b/doc/files/ContextInformation/Provision/010_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_3", - "keywords": [], + "keywords": [ + "Append Attributes Without Params", + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/010_02.json b/doc/files/ContextInformation/Provision/010_02.json index e33d782d..b52ce2fc 100644 --- a/doc/files/ContextInformation/Provision/010_02.json +++ b/doc/files/ContextInformation/Provision/010_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_3", - "keywords": [], + "keywords": [ + "Append Attributes", + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/010_04.json b/doc/files/ContextInformation/Provision/010_04.json index 23f35d05..d586ccca 100644 --- a/doc/files/ContextInformation/Provision/010_04.json +++ b/doc/files/ContextInformation/Provision/010_04.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_3", - "keywords": [], + "keywords": [ + "Append Attributes With Params", + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/010_05.json b/doc/files/ContextInformation/Provision/010_05.json index 342e2574..9f5502f4 100644 --- a/doc/files/ContextInformation/Provision/010_05.json +++ b/doc/files/ContextInformation/Provision/010_05.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_3", - "keywords": [], + "keywords": [ + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/011_01.json b/doc/files/ContextInformation/Provision/011_01.json index be00e166..4d49483d 100644 --- a/doc/files/ContextInformation/Provision/011_01.json +++ b/doc/files/ContextInformation/Provision/011_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_2", - "keywords": [], + "keywords": [ + "Update Attributes", + "Delete Initial Entities", + "Initialize Test" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/011_02.json b/doc/files/ContextInformation/Provision/011_02.json index 3b397700..194a07ae 100644 --- a/doc/files/ContextInformation/Provision/011_02.json +++ b/doc/files/ContextInformation/Provision/011_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_2", - "keywords": [], + "keywords": [ + "Update Attributes", + "Initialize Environment", + "Delete Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/011_04.json b/doc/files/ContextInformation/Provision/011_04.json index c4722c8c..45c677f5 100644 --- a/doc/files/ContextInformation/Provision/011_04.json +++ b/doc/files/ContextInformation/Provision/011_04.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_2", - "keywords": [], + "keywords": [ + "Update entity attributes with invalid entity fragments", + "Initialize Environment" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/012_01.json b/doc/files/ContextInformation/Provision/012_01.json index 214c4284..0cef4a7e 100644 --- a/doc/files/ContextInformation/Provision/012_01.json +++ b/doc/files/ContextInformation/Provision/012_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_4", - "keywords": [], + "keywords": [ + "Update Attributes", + "Initiate Test Case", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/012_02.json b/doc/files/ContextInformation/Provision/012_02.json index 39c1e02f..bfa02068 100644 --- a/doc/files/ContextInformation/Provision/012_02.json +++ b/doc/files/ContextInformation/Provision/012_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_4", - "keywords": [], + "keywords": [ + "Update Attributes", + "Setup Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/012_03.json b/doc/files/ContextInformation/Provision/012_03.json index d34e2f83..3fdf01b4 100644 --- a/doc/files/ContextInformation/Provision/012_03.json +++ b/doc/files/ContextInformation/Provision/012_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_4", - "keywords": [], + "keywords": [ + "Partial Update Attributes", + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/013_01.json b/doc/files/ContextInformation/Provision/013_01.json index fa912c9c..c6aed518 100644 --- a/doc/files/ContextInformation/Provision/013_01.json +++ b/doc/files/ContextInformation/Provision/013_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_5", - "keywords": [], + "keywords": [ + "Delete Attributes", + "Delete Initial Entities" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/013_02.json b/doc/files/ContextInformation/Provision/013_02.json index 3636c1f6..5bd57eb8 100644 --- a/doc/files/ContextInformation/Provision/013_02.json +++ b/doc/files/ContextInformation/Provision/013_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_5", - "keywords": [], + "keywords": [ + "Delete Attributes", + "Create Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/013_03.json b/doc/files/ContextInformation/Provision/013_03.json index cf0984c0..f356d197 100644 --- a/doc/files/ContextInformation/Provision/013_03.json +++ b/doc/files/ContextInformation/Provision/013_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_5", - "keywords": [], + "keywords": [ + "Delete Attributes", + "Setup Initial Entity", + "Delete Initial Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/014_02.json b/doc/files/ContextInformation/Provision/014_02.json index 82b0c7a0..d87206f9 100644 --- a/doc/files/ContextInformation/Provision/014_02.json +++ b/doc/files/ContextInformation/Provision/014_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_12", - "keywords": [], + "keywords": [ + "Add Attribute To Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/014_04.json b/doc/files/ContextInformation/Provision/014_04.json index bb7f5ced..531d1993 100644 --- a/doc/files/ContextInformation/Provision/014_04.json +++ b/doc/files/ContextInformation/Provision/014_04.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_12", - "keywords": [], + "keywords": [ + "Add an Attribute To a Temporal Entity From File", + "Initialize Test Case" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/015_01.json b/doc/files/ContextInformation/Provision/015_01.json index 7596620f..f22ca6fb 100644 --- a/doc/files/ContextInformation/Provision/015_01.json +++ b/doc/files/ContextInformation/Provision/015_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_13", - "keywords": [], + "keywords": [ + "Delete Attribute From A Temporal Entity", + "Initialize Setup", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/015_02.json b/doc/files/ContextInformation/Provision/015_02.json index 10c3eb79..8f13cfb2 100644 --- a/doc/files/ContextInformation/Provision/015_02.json +++ b/doc/files/ContextInformation/Provision/015_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_13", - "keywords": [], + "keywords": [ + "Delete attribute from temporal entity with unknow entity/attribute id", + "Create Temporal Entity", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/015_03.json b/doc/files/ContextInformation/Provision/015_03.json index d013e2bd..0c1348ac 100644 --- a/doc/files/ContextInformation/Provision/015_03.json +++ b/doc/files/ContextInformation/Provision/015_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_13", - "keywords": [], + "keywords": [ + "Delete An Attribute", + "Create Id", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/016_02.json b/doc/files/ContextInformation/Provision/016_02.json index c9740ac1..afbfea92 100644 --- a/doc/files/ContextInformation/Provision/016_02.json +++ b/doc/files/ContextInformation/Provision/016_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_14", - "keywords": [], + "keywords": [ + "Modify Attribute Instance Temporal Entity", + "Create Id", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/016_03.json b/doc/files/ContextInformation/Provision/016_03.json index d516bf5c..7295217a 100644 --- a/doc/files/ContextInformation/Provision/016_03.json +++ b/doc/files/ContextInformation/Provision/016_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_14", - "keywords": [], + "keywords": [ + "Modify Attribute Instance Temporal Entity", + "Create Id", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/017_02.json b/doc/files/ContextInformation/Provision/017_02.json index 7c64617c..07eb33a7 100644 --- a/doc/files/ContextInformation/Provision/017_02.json +++ b/doc/files/ContextInformation/Provision/017_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_15", - "keywords": [], + "keywords": [ + "Delete attribute instance", + "Create Temporal Entity", + "Delete Temporal Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n and an attribute with an id set to ${atrId}\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Provision/017_03.json b/doc/files/ContextInformation/Provision/017_03.json index 795f6b22..f4beadac 100644 --- a/doc/files/ContextInformation/Provision/017_03.json +++ b/doc/files/ContextInformation/Provision/017_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_6_15", - "keywords": [], + "keywords": [ + "Delete An Attribute Instance", + "Create Id", + "Delete Intitial Temporal Representation Of Entity" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/028_02.json b/doc/files/ContextInformation/Subscription/028_02.json index 67385877..4e6d5ea4 100644 --- a/doc/files/ContextInformation/Subscription/028_02.json +++ b/doc/files/ContextInformation/Subscription/028_02.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_1", - "keywords": [], + "keywords": [ + "Create Subscription With Invalid Request" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/028_03.json b/doc/files/ContextInformation/Subscription/028_03.json index 5d78e548..4891b3fb 100644 --- a/doc/files/ContextInformation/Subscription/028_03.json +++ b/doc/files/ContextInformation/Subscription/028_03.json @@ -6,6 +6,7 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_1", "keywords": [ + "Create Subscription With Invalid/Empty Id", "Delete Initial Subscriptions" ], "teardown": "Delete Initial Subscriptions", diff --git a/doc/files/ContextInformation/Subscription/029_01.json b/doc/files/ContextInformation/Subscription/029_01.json index 7df9d7b7..8c26e079 100644 --- a/doc/files/ContextInformation/Subscription/029_01.json +++ b/doc/files/ContextInformation/Subscription/029_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_2", - "keywords": [], + "keywords": [ + "Update Subscription With Non present Or Invalid Id" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/029_07.json b/doc/files/ContextInformation/Subscription/029_07.json index 3c429666..6a08d578 100644 --- a/doc/files/ContextInformation/Subscription/029_07.json +++ b/doc/files/ContextInformation/Subscription/029_07.json @@ -6,6 +6,7 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_2", "keywords": [ + "Activate Paused Subscription With isActive Member", "Setup Initial Subscriptions", "Delete Initial Subscriptions" ], diff --git a/doc/files/ContextInformation/Subscription/029_08.json b/doc/files/ContextInformation/Subscription/029_08.json index 6e5d90e5..580d4fcf 100644 --- a/doc/files/ContextInformation/Subscription/029_08.json +++ b/doc/files/ContextInformation/Subscription/029_08.json @@ -6,6 +6,7 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_2", "keywords": [ + "Activate Paused Subscription With isActive And ExpiresAt Members", "Setup Initial Subscriptions", "Delete Initial Subscriptions" ], diff --git a/doc/files/ContextInformation/Subscription/030_01.json b/doc/files/ContextInformation/Subscription/030_01.json index 070fccfe..bc24b221 100644 --- a/doc/files/ContextInformation/Subscription/030_01.json +++ b/doc/files/ContextInformation/Subscription/030_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_3", - "keywords": [], + "keywords": [ + "Retrieve Subscription With Invalid Id" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/031_02.json b/doc/files/ContextInformation/Subscription/031_02.json index a016811e..48803e36 100644 --- a/doc/files/ContextInformation/Subscription/031_02.json +++ b/doc/files/ContextInformation/Subscription/031_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_4", - "keywords": [], + "keywords": [ + "Query Subscriptions With Limit And Page Parameters", + "Setup Initial Subscriptions", + "Delete Initial Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id} \n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/032_01.json b/doc/files/ContextInformation/Subscription/032_01.json index 442f3277..6d4787d7 100644 --- a/doc/files/ContextInformation/Subscription/032_01.json +++ b/doc/files/ContextInformation/Subscription/032_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_5", - "keywords": [], + "keywords": [ + "Delete Subscription With Non present Or Invalid Id" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextInformation/Subscription/046_01.json b/doc/files/ContextInformation/Subscription/046_01.json index b45635aa..63c2a98c 100644 --- a/doc/files/ContextInformation/Subscription/046_01.json +++ b/doc/files/ContextInformation/Subscription/046_01.json @@ -7,7 +7,11 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Add Initial Entity", + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_02.json b/doc/files/ContextInformation/Subscription/046_02.json index d332377b..4d38100b 100644 --- a/doc/files/ContextInformation/Subscription/046_02.json +++ b/doc/files/ContextInformation/Subscription/046_02.json @@ -7,7 +7,10 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_03.json b/doc/files/ContextInformation/Subscription/046_03.json index bbd4bc4e..af2e1cec 100644 --- a/doc/files/ContextInformation/Subscription/046_03.json +++ b/doc/files/ContextInformation/Subscription/046_03.json @@ -7,7 +7,11 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Add Initial Entity", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_04.json b/doc/files/ContextInformation/Subscription/046_04.json index 9947c7af..f51309a4 100644 --- a/doc/files/ContextInformation/Subscription/046_04.json +++ b/doc/files/ContextInformation/Subscription/046_04.json @@ -7,7 +7,10 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_05.json b/doc/files/ContextInformation/Subscription/046_05.json index 52cd374c..0b1a30fa 100644 --- a/doc/files/ContextInformation/Subscription/046_05.json +++ b/doc/files/ContextInformation/Subscription/046_05.json @@ -7,7 +7,10 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_07.json b/doc/files/ContextInformation/Subscription/046_07.json index 297f9225..ef588be6 100644 --- a/doc/files/ContextInformation/Subscription/046_07.json +++ b/doc/files/ContextInformation/Subscription/046_07.json @@ -7,6 +7,8 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Suite", + "Setup Initial Subscriptions", + "After Test", "After Suite" ], "teardown": "After Suite", diff --git a/doc/files/ContextInformation/Subscription/046_08.json b/doc/files/ContextInformation/Subscription/046_08.json index 06213e44..71e9f8d4 100644 --- a/doc/files/ContextInformation/Subscription/046_08.json +++ b/doc/files/ContextInformation/Subscription/046_08.json @@ -7,6 +7,8 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Suite", + "Setup Initial Subscriptions", + "After Test", "After Suite" ], "teardown": "After Suite", diff --git a/doc/files/ContextInformation/Subscription/046_09.json b/doc/files/ContextInformation/Subscription/046_09.json index f151279e..dda1bb2d 100644 --- a/doc/files/ContextInformation/Subscription/046_09.json +++ b/doc/files/ContextInformation/Subscription/046_09.json @@ -7,7 +7,10 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_10.json b/doc/files/ContextInformation/Subscription/046_10.json index 38c079e3..7f94d577 100644 --- a/doc/files/ContextInformation/Subscription/046_10.json +++ b/doc/files/ContextInformation/Subscription/046_10.json @@ -7,7 +7,10 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_11.json b/doc/files/ContextInformation/Subscription/046_11.json index f279fb73..5cf674a1 100644 --- a/doc/files/ContextInformation/Subscription/046_11.json +++ b/doc/files/ContextInformation/Subscription/046_11.json @@ -7,7 +7,11 @@ "pics_selection": "PICS_5_8_6", "keywords": [ "Before Test", - "After Test" + "Setup Initial Subscriptions", + "Add Initial Entity", + "After Test", + "Delete Initial Subscriptions", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_12.json b/doc/files/ContextInformation/Subscription/046_12.json index 4649f01a..324c7945 100644 --- a/doc/files/ContextInformation/Subscription/046_12.json +++ b/doc/files/ContextInformation/Subscription/046_12.json @@ -6,8 +6,12 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_6", "keywords": [ + "Setup Initial Subscriptions", + "Delete Initial Subscriptions", "Before Test", - "After Test" + "After Test", + "Add Initial Entity", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextInformation/Subscription/046_13.json b/doc/files/ContextInformation/Subscription/046_13.json index 9bed3792..785d6b2b 100644 --- a/doc/files/ContextInformation/Subscription/046_13.json +++ b/doc/files/ContextInformation/Subscription/046_13.json @@ -6,6 +6,10 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_6", "keywords": [ + "Setup Initial Subscription", + "Delete Initial Subscription", + "Add Initial Entity", + "Delete Initial Entity", "Before Test", "After Test" ], diff --git a/doc/files/ContextInformation/Subscription/046_14.json b/doc/files/ContextInformation/Subscription/046_14.json index d2c1783c..fd449970 100644 --- a/doc/files/ContextInformation/Subscription/046_14.json +++ b/doc/files/ContextInformation/Subscription/046_14.json @@ -6,8 +6,12 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_8_6", "keywords": [ + "Setup Initial Subscriptions", + "Delete Initial Subscriptions", "Before Test", - "After Test" + "After Test", + "Add Initial Entity", + "Delete Initial Entity" ], "teardown": "After Test", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextSource/Discovery/036_01.json b/doc/files/ContextSource/Discovery/036_01.json index c48b2b5a..10bdf526 100644 --- a/doc/files/ContextSource/Discovery/036_01.json +++ b/doc/files/ContextSource/Discovery/036_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_1", - "keywords": [], + "keywords": [ + "Retrieve Context Source Registration With An Invalid Id" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/036_05.json b/doc/files/ContextSource/Discovery/036_05.json index e8f342b8..8bb976c1 100644 --- a/doc/files/ContextSource/Discovery/036_05.json +++ b/doc/files/ContextSource/Discovery/036_05.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Review JSON-LD resolution when retrieving a context source registration", + "Setup Initial Context Source Registration", + "Delete Created Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_01.json b/doc/files/ContextSource/Discovery/037_01.json index 4d8e4d53..18f0d823 100644 --- a/doc/files/ContextSource/Discovery/037_01.json +++ b/doc/files/ContextSource/Discovery/037_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query A Context Source Registration", + "Setup Initial Context Source Registrations", + "Delete Created Context Source Registrations" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a list of Context Source Registrations (CSRs) providing latest information about some entities\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_03.json b/doc/files/ContextSource/Discovery/037_03.json index 75a7830f..2c69eb04 100644 --- a/doc/files/ContextSource/Discovery/037_03.json +++ b/doc/files/ContextSource/Discovery/037_03.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration With Invalid Query Param" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_05.json b/doc/files/ContextSource/Discovery/037_05.json index fd37f26b..39f253e4 100644 --- a/doc/files/ContextSource/Discovery/037_05.json +++ b/doc/files/ContextSource/Discovery/037_05.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration Matching EntityInfo of RegistrationInfo", + "Delete Created Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_06.json b/doc/files/ContextSource/Discovery/037_06.json index db192f06..be354984 100644 --- a/doc/files/ContextSource/Discovery/037_06.json +++ b/doc/files/ContextSource/Discovery/037_06.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration Matching Properties And Relationships Of RegistrationInfo", + "Setup Initial Context Source Registration", + "Delete Created Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_07.json b/doc/files/ContextSource/Discovery/037_07.json index 88fd6779..fa9ed461 100644 --- a/doc/files/ContextSource/Discovery/037_07.json +++ b/doc/files/ContextSource/Discovery/037_07.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration Matching Geoquery", + "Setup Initial Context Source Registration", + "Delete Created Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_09.json b/doc/files/ContextSource/Discovery/037_09.json index 2a7a7104..42d50248 100644 --- a/doc/files/ContextSource/Discovery/037_09.json +++ b/doc/files/ContextSource/Discovery/037_09.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration Matching Temporal Query", + "Delete Created Context Source Registrations" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_10.json b/doc/files/ContextSource/Discovery/037_10.json index 0cb7f5ca..234494dc 100644 --- a/doc/files/ContextSource/Discovery/037_10.json +++ b/doc/files/ContextSource/Discovery/037_10.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration With Query Params", + "Setup Initial Context Source Registrations", + "Delete Created Context Source Registrations" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a list of Context Source Registrations (CSRs) providing latest information about some entities\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Discovery/037_11.json b/doc/files/ContextSource/Discovery/037_11.json index 7edb7d5e..0fe705c9 100644 --- a/doc/files/ContextSource/Discovery/037_11.json +++ b/doc/files/ContextSource/Discovery/037_11.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_10_2", - "keywords": [], + "keywords": [ + "Query Context Source Registration With Limit And Offset Parameters", + "Setup Initial Context Source Registrations", + "Delete Created Context Source Registrations" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a list of Context Source Registrations (CSRs) providing latest information about some entities\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/033_03.json b/doc/files/ContextSource/Registration/033_03.json index 5833d7e1..becde7a4 100644 --- a/doc/files/ContextSource/Registration/033_03.json +++ b/doc/files/ContextSource/Registration/033_03.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_2", - "keywords": [], + "keywords": [ + "Delete Created Context Source Registrations", + "Create New Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/033_10.json b/doc/files/ContextSource/Registration/033_10.json index ae9d5f5c..8399b16f 100644 --- a/doc/files/ContextSource/Registration/033_10.json +++ b/doc/files/ContextSource/Registration/033_10.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_6_3_5", - "keywords": [], + "keywords": [ + "Create Context Source With Invalid Content" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/034_01.json b/doc/files/ContextSource/Registration/034_01.json index c0d0a772..2f925d76 100644 --- a/doc/files/ContextSource/Registration/034_01.json +++ b/doc/files/ContextSource/Registration/034_01.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_3", - "keywords": [], + "keywords": [ + "Update A Context Source", + "Delete Updated Context Source Registration", + "Initialize the Test Case" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/034_02.json b/doc/files/ContextSource/Registration/034_02.json index 8147792d..3a882fd0 100644 --- a/doc/files/ContextSource/Registration/034_02.json +++ b/doc/files/ContextSource/Registration/034_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_3", - "keywords": [], + "keywords": [ + "Update A Context Source", + "Create Initial Context Source Registration", + "Delete Initial Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/034_04.json b/doc/files/ContextSource/Registration/034_04.json index 7e02e0b5..e7f36234 100644 --- a/doc/files/ContextSource/Registration/034_04.json +++ b/doc/files/ContextSource/Registration/034_04.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_3", - "keywords": [], + "keywords": [ + "Create Initial Context Source Registration", + "Delete Initial Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/034_05.json b/doc/files/ContextSource/Registration/034_05.json index 2edadfb9..96164acc 100644 --- a/doc/files/ContextSource/Registration/034_05.json +++ b/doc/files/ContextSource/Registration/034_05.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_3", - "keywords": [], + "keywords": [ + "Update A Context Source", + "Delete Updated Context Source Registration", + "Initialize the Test Case" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/034_06.json b/doc/files/ContextSource/Registration/034_06.json index 7cd03b78..d316831c 100644 --- a/doc/files/ContextSource/Registration/034_06.json +++ b/doc/files/ContextSource/Registration/034_06.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_3", - "keywords": [], + "keywords": [ + "Update A Context Source", + "Create Initial Context Source Registration", + "Delete Initial Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/Registration/035_02.json b/doc/files/ContextSource/Registration/035_02.json index cbec8856..dd43d171 100644 --- a/doc/files/ContextSource/Registration/035_02.json +++ b/doc/files/ContextSource/Registration/035_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_9_4", - "keywords": [], + "keywords": [ + "Delete A Context Source", + "Delete Created Context Source Registrations", + "Create Initial Context Source Registration" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT contains a Context Source Registration \n with id equal to ${context_source_registration_id}\n and payload set to ${context_source_registration_payload_file_path}\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/038_07.json b/doc/files/ContextSource/RegistrationSubscription/038_07.json index dde1a2c5..3685bc23 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_07.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_07.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_2", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Initial Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/038_08.json b/doc/files/ContextSource/RegistrationSubscription/038_08.json index 037ccaed..580e5feb 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_08.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_08.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_2", - "keywords": [], + "keywords": [ + "Create Invalid Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/039_01.json b/doc/files/ContextSource/RegistrationSubscription/039_01.json index 59fccbe1..dd2c24b2 100644 --- a/doc/files/ContextSource/RegistrationSubscription/039_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/039_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_3", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscriptions", + "Delete Initial Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/039_04.json b/doc/files/ContextSource/RegistrationSubscription/039_04.json index 78f3d36a..20eeb8b6 100644 --- a/doc/files/ContextSource/RegistrationSubscription/039_04.json +++ b/doc/files/ContextSource/RegistrationSubscription/039_04.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_3", - "keywords": [], + "keywords": [ + "Update Context Source Registration Subscription With Invalid Fragment", + "Setup Initial Context Source Registration Subscriptions", + "Delete Initial Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/039_05.json b/doc/files/ContextSource/RegistrationSubscription/039_05.json index fb7b5736..1654e7c1 100644 --- a/doc/files/ContextSource/RegistrationSubscription/039_05.json +++ b/doc/files/ContextSource/RegistrationSubscription/039_05.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_3", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscriptions", + "Delete Initial Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/040_01.json b/doc/files/ContextSource/RegistrationSubscription/040_01.json index 24590fa0..96cf6229 100644 --- a/doc/files/ContextSource/RegistrationSubscription/040_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/040_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_4", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/041_01.json b/doc/files/ContextSource/RegistrationSubscription/041_01.json index c18b4d80..ae1c333b 100644 --- a/doc/files/ContextSource/RegistrationSubscription/041_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/041_01.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_5", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscriptions", + "Delete Created Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/041_02.json b/doc/files/ContextSource/RegistrationSubscription/041_02.json index a652f73d..2c2fd639 100644 --- a/doc/files/ContextSource/RegistrationSubscription/041_02.json +++ b/doc/files/ContextSource/RegistrationSubscription/041_02.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_5", - "keywords": [], + "keywords": [ + "Query Context Source Registration Subscriptions With Limit Parameter", + "Setup Initial Context Source Registration Subscriptions", + "Delete Created Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/041_03.json b/doc/files/ContextSource/RegistrationSubscription/041_03.json index d3b63f7a..86ef3a3f 100644 --- a/doc/files/ContextSource/RegistrationSubscription/041_03.json +++ b/doc/files/ContextSource/RegistrationSubscription/041_03.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_5", - "keywords": [], + "keywords": [ + "Query Context Source Registration Subscriptions With Limit And Page Parameters", + "Setup Initial Context Source Registration Subscriptions", + "Delete Created Context Source Registration Subscriptions" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a set of Context Source Registration Subscriptions (CSRSs)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/041_04.json b/doc/files/ContextSource/RegistrationSubscription/041_04.json index 656a1916..6881f553 100644 --- a/doc/files/ContextSource/RegistrationSubscription/041_04.json +++ b/doc/files/ContextSource/RegistrationSubscription/041_04.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_5", - "keywords": [], + "keywords": [ + "Query Context Source Registration Subscriptions With Invalid Limit And Page Parameters" + ], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/042_01.json b/doc/files/ContextSource/RegistrationSubscription/042_01.json index 01ab87db..969d588f 100644 --- a/doc/files/ContextSource/RegistrationSubscription/042_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/042_01.json @@ -5,7 +5,9 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_6", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_02.json b/doc/files/ContextSource/RegistrationSubscription/047_02.json index 54128041..9dc469de 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_02.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_02.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Create Initial Context Source Registration and Context Source Registration Subscription", + "Delete Created Context Source Registration And Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration (CSR1) providing latest information about some entities\n and the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_03.json b/doc/files/ContextSource/RegistrationSubscription/047_03.json index 5f9a411e..17c0f990 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_03.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_03.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_04.json b/doc/files/ContextSource/RegistrationSubscription/047_04.json index 3fe3ea31..75dc0a5d 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_04.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_04.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_05.json b/doc/files/ContextSource/RegistrationSubscription/047_05.json index 5dd4140e..3dc8423b 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_05.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_05.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_06.json b/doc/files/ContextSource/RegistrationSubscription/047_06.json index 4c5b3cc9..adc4aab7 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_06.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_06.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_07.json b/doc/files/ContextSource/RegistrationSubscription/047_07.json index 56815937..d2fd8e5f 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_07.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_07.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Do Not Receive cSourceNotification If Subscription Status Is Not Active", + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_08.json b/doc/files/ContextSource/RegistrationSubscription/047_08.json index ea59296b..d45c2ec4 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_08.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_08.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Create Initial Context Source Registration and Context Source Registration Subscription", + "Delete Created Context Source Registration And Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration (CSR1) providing latest information about some entities\n and the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_10.json b/doc/files/ContextSource/RegistrationSubscription/047_10.json index 2b444a09..4e045b57 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_10.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_10.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_12.json b/doc/files/ContextSource/RegistrationSubscription/047_12.json index a5f73644..c803769b 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_12.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_12.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_13.json b/doc/files/ContextSource/RegistrationSubscription/047_13.json index 8a3fd2af..ce25aa3f 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_13.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_13.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_14.json b/doc/files/ContextSource/RegistrationSubscription/047_14.json index 33c7266a..ef061334 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_14.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_14.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_15.json b/doc/files/ContextSource/RegistrationSubscription/047_15.json index 88382cb7..aaa79e1e 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_15.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_15.json @@ -5,7 +5,10 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Setup Initial Context Source Registration Subscription", + "Delete Created Context Source Registration And Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/doc/files/ContextSource/RegistrationSubscription/047_16.json b/doc/files/ContextSource/RegistrationSubscription/047_16.json index a5dc97e0..763b945e 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_16.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_16.json @@ -5,7 +5,11 @@ "config_id": "", "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", - "keywords": [], + "keywords": [ + "Receive cSourceNotification For Newly Matching Context Source Registrations", + "Create Initial Context Source Registrations And Context Source Registration Subscription", + "Delete Created Context Source Registrations And Context Source Registration Subscription" + ], "teardown": "None", "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing a list of Context Source Registrations (CSRs) providing latest information about some entities\n and the SUT containing a Context Source Registration Subscription (CSRS1)\n}", "test_cases": [ diff --git a/requirements.txt b/requirements.txt index b98ebc40..7599dc9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ robotframework-requests==0.9.6 deepdiff==6.7.1 prettydiff==0.1.0 robotframework-httpctrl==0.3.1 -robotframework-tidy==4.6.0 +robotframework-tidy==4.9.0 -- GitLab From b17919471ebb6e9bd763521bc165c2680442f0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Fri, 16 Feb 2024 11:31:14 +0100 Subject: [PATCH 03/25] Update CommonBehaviours tags --- .../VerifyGETWithoutAccept/045_01.robot | 8 ++++---- .../VerifyLdContextNotAvailable/043_01.robot | 10 +++++----- .../VerifyMergePatchJson/044_01.robot | 2 +- .../VerifyMergePatchJson/044_02.robot | 2 +- .../VerifyNotAcceptableMediaType/049_01.robot | 10 +++++----- .../VerifyNotAcceptableMediaType/049_02.robot | 6 +++--- .../VerifyUnsupportedMediaType/048_01.robot | 12 ++++++------ doc/files/CommonBehaviours/043_01.json | 11 ++++++++--- doc/files/CommonBehaviours/044_01.json | 1 + doc/files/CommonBehaviours/044_02.json | 1 + doc/files/CommonBehaviours/045_01.json | 8 ++++++-- doc/files/CommonBehaviours/048_01.json | 12 +++++++++--- doc/files/CommonBehaviours/049_01.json | 9 +++++++-- doc/files/CommonBehaviours/049_02.json | 7 +++++-- 14 files changed, 62 insertions(+), 37 deletions(-) diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot index abd654da..04e4af9f 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot @@ -29,7 +29,7 @@ ${content_type}= application/json *** Test Cases *** 045_01_01 Endpoint /entities/{entityId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/entities/{entityId}) - [Tags] e-query 6_3_4 + [Tags] e-query cb-get 6_3_4 ${id}= Generate Random Entity Id ${building_id_prefix} ${response}= Create Entity Selecting Content Type ... ${building_filename} @@ -47,7 +47,7 @@ ${content_type}= application/json 045_01_02 Endpoint /subscriptions/{subscriptionId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId}) - [Tags] sub-retrieve 6_3_4 + [Tags] sub-retrieve cb-get 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} @@ -61,7 +61,7 @@ ${content_type}= application/json 045_01_03 Endpoint /csourceRegistrations/ [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/csourceRegistrations/) - [Tags] csr-query 6_3_4 + [Tags] csr-query cb-get 6_3_4 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} @@ -79,7 +79,7 @@ ${content_type}= application/json 045_01_04 Endpoint /temporal/entities [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/temporal/entities) - [Tags] te-query 6_3_4 + [Tags] te-query cb-get 6_3_4 ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot index 14069952..44a8ff10 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot @@ -24,7 +24,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration *** Test Cases *** 043_01_01 Create entity [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create entity) - [Tags] e-create 5_2_2 + [Tags] e-create cb-ldcontext 5_2_2 ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${response}= Create Entity Selecting Content Type ... ${building_filename} @@ -39,7 +39,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_02 Create subscription [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create subscription) - [Tags] sub-create 5_2_2 + [Tags] sub-create cb-ldcontext 5_2_2 ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${expected_status_code} ${response.status_code} @@ -51,7 +51,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_03 Create Temporal Representation of Entities [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities) - [Tags] te-create 5_2_2 + [Tags] te-create cb-ldcontext 5_2_2 ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} @@ -66,7 +66,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_04 Batch entity create [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Batch entity create) - [Tags] be-create 5_2_2 + [Tags] be-create cb-ldcontext 5_2_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} ${first_entity}= Load Entity ${building_filename} ${first_entity_id} @@ -83,7 +83,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_05 Create context source registration [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create context source registration) - [Tags] csr-create 5_2_2 + [Tags] csr-create cb-ldcontext 5_2_2 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot index 5ee38366..af2fbf78 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot @@ -19,7 +19,7 @@ ${attribute_id}= brandName *** Test Cases *** 044_01_01 endpoint /entities/{entityId}/attrs/{attrId} [Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type - [Tags] ea-partial-update 6_3_4 + [Tags] ea-partial-update cb-mergepatch 6_3_4 ${response}= Partial Update Entity Attributes ... entityId=${entity_id} ... attributeId=${attribute_id} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot index 9dbb7183..a228f94b 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot @@ -19,7 +19,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update-samp *** Test Cases *** 044_02_01 Endpoint /subscriptions/{subscriptionId} [Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type - [Tags] sub-update 6_3_4 + [Tags] sub-update cb-mergepatch 6_3_4 ${response}= Update Subscription ... ${subscription_id} ... ${subscription_fragment} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot index 38654ea2..b835ad1c 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot @@ -21,7 +21,7 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: *** Test Cases *** 049_01_01 Endpoint get /entities/{entityId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /entities/{entityId}) - [Tags] e-query 6_3_4 + [Tags] e-query cb-noacceptable-medtype 6_3_4 ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${response}= Query Entity ... id=${entity_id} @@ -31,7 +31,7 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: 049_01_02 Endpoint get /subscriptions/{subscriptionId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId}) - [Tags] sub-retrieve 6_3_4 + [Tags] sub-retrieve cb-noacceptable-medtype 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Retrieve Subscription ... id=${id} @@ -41,19 +41,19 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: 049_01_03 Endpoint get /csourceRegistrations/ [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceRegistrations/) - [Tags] csr-query 6_3_4 + [Tags] csr-query cb-noacceptable-medtype 6_3_4 ${response}= Query Context Source Registrations With Return type=Building accept=${accept} Check Response Status Code ${status_code} ${response.status_code} 049_01_04 Endpoint get /csourceSubscriptions/ [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/) - [Tags] csrsub-query 6_3_4 + [Tags] csrsub-query cb-noacceptable-medtype 6_3_4 ${response}= Query Context Source Registration Subscriptions accept=${accept} Check Response Status Code ${status_code} ${response.status_code} 049_01_05 Endpoint get /temporal/entities [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities) - [Tags] te-query 6_3_4 + [Tags] te-query cb-noacceptable-medtype 6_3_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot index a3586c9a..75a72642 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot @@ -17,7 +17,7 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: *** Test Cases *** 049_02_01 Retrieve subscription by id [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header is "application/geo+json" for operations different than "Retrieve Entity" and "Query Entity" (get /subscriptions/{subscriptionId}) - [Tags] sub-retrieve 6_3_4 + [Tags] sub-retrieve cb-noacceptable-medtype 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Retrieve Subscription ... id=${id} @@ -26,7 +26,7 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: 049_02_02 Query temporal entities [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header is "application/geo+json" for operations different than "Retrieve Entity" and "Query Entity" (get /temporal/entities) - [Tags] te-query 6_3_4 + [Tags] te-query cb-noacceptable-medtype 6_3_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} @@ -37,6 +37,6 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: 049_02_03 Query context source registration [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header is "application/geo+json" for operations different than "Retrieve Entity" and "Query Entity" (get /csourceRegistrations) - [Tags] csr-query 6_3_4 + [Tags] csr-query cb-noacceptable-medtype 6_3_4 ${response}= Query Context Source Registrations With Return type=Building accept=${accept} Check Response Status Code ${status_code} ${response.status_code} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot index d49ea021..9b0dd212 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot @@ -26,7 +26,7 @@ ${content_type}= application/xml *** Test Cases *** 048_01_01 Endpoint patch /entities/{entityId}/attrs/{attrId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId}) - [Tags] ea-partial-update 6_3_4 + [Tags] ea-partial-update cb-unsupport-medtype 6_3_4 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} ${response}= Partial Update Entity Attributes ... entityId=${entity_id} @@ -38,7 +38,7 @@ ${content_type}= application/xml 048_01_02 Endpoint patch /subscriptions/{subscriptionId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /subscriptions/{subscriptionId}) - [Tags] sub-update 6_3_4 + [Tags] sub-update cb-unsupport-medtype 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Update Subscription ${id} ${subscription_fragment} ${content_type} Check Response Status Code 415 ${response.status_code} @@ -46,7 +46,7 @@ ${content_type}= application/xml 048_01_03 Endpoint post /entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entities/) - [Tags] e-create 6_3_4 + [Tags] e-create cb-unsupport-medtype 6_3_4 ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${response}= Create Entity Selecting Content Type ... ${building_filename} @@ -57,7 +57,7 @@ ${content_type}= application/xml 048_01_04 Endpoint post /subscriptions/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /subscriptions/) - [Tags] sub-create 6_3_4 + [Tags] sub-create cb-unsupport-medtype 6_3_4 ${subscriptions_id}= Generate Random Entity Id ${subscription_id_prefix} ${response}= Create Subscription ${subscriptions_id} ${subscription_filename} ${content_type} Check Response Status Code 415 ${response.status_code} @@ -65,7 +65,7 @@ ${content_type}= application/xml 048_01_05 Endpoint post /entityOperations/create [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entityOperations/create) - [Tags] be-create 6_3_4 + [Tags] be-create cb-unsupport-medtype 6_3_4 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} ${first_entity}= Load Entity ${building_filename} ${first_entity_id} @@ -78,7 +78,7 @@ ${content_type}= application/xml 048_01_06 Endpoint post /temporal/entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /temporal/entities/) - [Tags] te-create 6_3_4 + [Tags] te-create cb-unsupport-medtype 6_3_4 ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/doc/files/CommonBehaviours/043_01.json b/doc/files/CommonBehaviours/043_01.json index 6de10553..28c0d936 100644 --- a/doc/files/CommonBehaviours/043_01.json +++ b/doc/files/CommonBehaviours/043_01.json @@ -15,6 +15,7 @@ "doc": "Verify receiving 503 \u2013 LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create entity)", "tags": [ "5_2_2", + "cb-ldcontext", "e-create" ], "setup": null, @@ -31,6 +32,7 @@ "doc": "Verify receiving 503 \u2013 LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create subscription)", "tags": [ "5_2_2", + "cb-ldcontext", "sub-create" ], "setup": null, @@ -47,6 +49,7 @@ "doc": "Verify receiving 503 \u2013 LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities)", "tags": [ "5_2_2", + "cb-ldcontext", "te-create" ], "setup": null, @@ -63,7 +66,8 @@ "doc": "Verify receiving 503 \u2013 LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Batch entity create)", "tags": [ "5_2_2", - "be-create" + "be-create", + "cb-ldcontext" ], "setup": null, "teardown": "Batch Delete Entities", @@ -79,6 +83,7 @@ "doc": "Verify receiving 503 \u2013 LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create context source registration)", "tags": [ "5_2_2", + "cb-ldcontext", "csr-create" ], "setup": null, @@ -91,9 +96,9 @@ } ], "permutations": [ - "when", "endpoint", - "then" + "then", + "when" ], "robotpath": "CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable", "robotfile": "043_01" diff --git a/doc/files/CommonBehaviours/044_01.json b/doc/files/CommonBehaviours/044_01.json index 8f4f8182..b1d9fea9 100644 --- a/doc/files/CommonBehaviours/044_01.json +++ b/doc/files/CommonBehaviours/044_01.json @@ -18,6 +18,7 @@ "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", "tags": [ "6_3_4", + "cb-mergepatch", "ea-partial-update" ], "setup": "Create Initial Entity", diff --git a/doc/files/CommonBehaviours/044_02.json b/doc/files/CommonBehaviours/044_02.json index e8b9b514..1a732496 100644 --- a/doc/files/CommonBehaviours/044_02.json +++ b/doc/files/CommonBehaviours/044_02.json @@ -18,6 +18,7 @@ "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", "tags": [ "6_3_4", + "cb-mergepatch", "sub-update" ], "setup": "Create Initial Subscription", diff --git a/doc/files/CommonBehaviours/045_01.json b/doc/files/CommonBehaviours/045_01.json index 26ec1a40..3d36e6a4 100644 --- a/doc/files/CommonBehaviours/045_01.json +++ b/doc/files/CommonBehaviours/045_01.json @@ -15,6 +15,7 @@ "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/entities/{entityId})", "tags": [ "6_3_4", + "cb-get", "e-query" ], "setup": null, @@ -31,6 +32,7 @@ "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/subscriptions/{subscriptionId})", "tags": [ "6_3_4", + "cb-get", "sub-retrieve" ], "setup": null, @@ -47,6 +49,7 @@ "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/csourceRegistrations/)", "tags": [ "6_3_4", + "cb-get", "csr-query" ], "setup": null, @@ -63,6 +66,7 @@ "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/temporal/entities)", "tags": [ "6_3_4", + "cb-get", "te-query" ], "setup": null, @@ -75,9 +79,9 @@ } ], "permutations": [ - "when", "endpoint", - "then" + "then", + "when" ], "robotpath": "CommonBehaviours/CommonResponses/VerifyGETWithoutAccept", "robotfile": "045_01" diff --git a/doc/files/CommonBehaviours/048_01.json b/doc/files/CommonBehaviours/048_01.json index d5e4a14d..db54305a 100644 --- a/doc/files/CommonBehaviours/048_01.json +++ b/doc/files/CommonBehaviours/048_01.json @@ -15,6 +15,7 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (patch /entities/{entityId}/attrs/{attrId})", "tags": [ "6_3_4", + "cb-unsupport-medtype", "ea-partial-update" ], "setup": null, @@ -31,6 +32,7 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (patch /subscriptions/{subscriptionId})", "tags": [ "6_3_4", + "cb-unsupport-medtype", "sub-update" ], "setup": null, @@ -47,6 +49,7 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /entities/)", "tags": [ "6_3_4", + "cb-unsupport-medtype", "e-create" ], "setup": null, @@ -63,6 +66,7 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /subscriptions/)", "tags": [ "6_3_4", + "cb-unsupport-medtype", "sub-create" ], "setup": null, @@ -79,7 +83,8 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /entityOperations/create)", "tags": [ "6_3_4", - "be-create" + "be-create", + "cb-unsupport-medtype" ], "setup": null, "teardown": "Batch Delete Entities", @@ -95,6 +100,7 @@ "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /temporal/entities/)", "tags": [ "6_3_4", + "cb-unsupport-medtype", "te-create" ], "setup": null, @@ -107,10 +113,10 @@ } ], "permutations": [ - "when", "endpoint", "http_verb", - "then" + "then", + "when" ], "robotpath": "CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType", "robotfile": "048_01" diff --git a/doc/files/CommonBehaviours/049_01.json b/doc/files/CommonBehaviours/049_01.json index 4cec1af7..33750fcf 100644 --- a/doc/files/CommonBehaviours/049_01.json +++ b/doc/files/CommonBehaviours/049_01.json @@ -15,6 +15,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /entities/{entityId})", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "e-query" ], "setup": null, @@ -31,6 +32,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /subscriptions/{subscriptionId})", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "sub-retrieve" ], "setup": null, @@ -47,6 +49,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /csourceRegistrations/)", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "csr-query" ], "setup": null, @@ -63,6 +66,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /csourceSubscriptions/)", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "csrsub-query" ], "setup": null, @@ -79,6 +83,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /temporal/entities)", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "te-query" ], "setup": null, @@ -91,9 +96,9 @@ } ], "permutations": [ - "when", "endpoint", - "then" + "then", + "when" ], "robotpath": "CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType", "robotfile": "049_01" diff --git a/doc/files/CommonBehaviours/049_02.json b/doc/files/CommonBehaviours/049_02.json index 2fd1ec2e..ae9b3bff 100644 --- a/doc/files/CommonBehaviours/049_02.json +++ b/doc/files/CommonBehaviours/049_02.json @@ -15,6 +15,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header is \"application/geo+json\" for operations different than \"Retrieve Entity\" and \"Query Entity\" (get /subscriptions/{subscriptionId})", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "sub-retrieve" ], "setup": null, @@ -31,6 +32,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header is \"application/geo+json\" for operations different than \"Retrieve Entity\" and \"Query Entity\" (get /temporal/entities)", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "te-query" ], "setup": null, @@ -47,6 +49,7 @@ "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header is \"application/geo+json\" for operations different than \"Retrieve Entity\" and \"Query Entity\" (get /csourceRegistrations)", "tags": [ "6_3_4", + "cb-noacceptable-medtype", "csr-query" ], "setup": null, @@ -59,9 +62,9 @@ } ], "permutations": [ - "when", "endpoint", - "then" + "then", + "when" ], "robotpath": "CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType", "robotfile": "049_02" -- GitLab From 6483b1728506d10e8dd43e18f23c63acd7f4d4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 20 Feb 2024 17:21:25 +0100 Subject: [PATCH 04/25] Starting point of @context management --- .../Consumption/ListContexts/052_01.robot | 0 .../Consumption/ServeContext/053_01.robot | 43 ++++++++ .../Consumption/ServeContext/053_02.robot | 48 +++++++++ .../Consumption/ServeContext/053_03.robot | 56 +++++++++++ .../Provision/AddContext/050_01.robot | 47 +++++++++ .../Provision/AddContext/050_02.robot | 50 ++++++++++ .../Provision/DeleteContext/051_01.robot | 0 .../@context-duplicated-key.json | 7 ++ data/jsonldContext/@context-incorrect.json | 5 + .../jsonldContext/@context-minimal-valid.json | 7 ++ data/jsonldContext/@context-wrong-json.json | 5 + .../expected-detailed-@context.json | 0 .../ApiUtils/JSON-LD@ContextServer.resource | 99 +++++++++++++++++++ resources/AssertionUtils.resource | 4 + 14 files changed, 371 insertions(+) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot create mode 100644 data/jsonldContext/@context-duplicated-key.json create mode 100644 data/jsonldContext/@context-incorrect.json create mode 100644 data/jsonldContext/@context-minimal-valid.json create mode 100644 data/jsonldContext/@context-wrong-json.json create mode 100644 data/jsonldContext/expected-detailed-@context.json create mode 100644 resources/ApiUtils/JSON-LD@ContextServer.resource diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot new file mode 100644 index 00000000..e69de29b diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot new file mode 100644 index 00000000..e6cf791b --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Check that you can serve a previous created @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** +053_01_01 Serve a @context without details + [Documentation] Check that you can serve a @context + [Tags] ctx-serve 5_13_4 + + ${response}= Serve a @context ${uri} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + Check Context Response Body Content ${filename} ${response.json()} + + +*** Keywords *** +Create Initial @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot new file mode 100644 index 00000000..efa39298 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot @@ -0,0 +1,48 @@ +*** Settings *** +Documentation Check that you can serve a previous created @context with details equal to False + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context +Test Template Serve a @context with details equal to true + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS +053_02_01 Serve a @context with details equal to False + [Tags] ctx-serve 5_13_4 + ${False} + + +*** Keywords *** +Create Initial @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Serve a @context with details equal to true + [Documentation] Check that you can serve a @context with details + [Arguments] ${details} + + ${response}= Serve a @context ${uri} ${details} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + Check Context Response Body Content ${filename} ${response.json()} + +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot new file mode 100644 index 00000000..8e901433 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot @@ -0,0 +1,56 @@ +*** Settings *** +Documentation Check that you can serve a previous created @context with details equal to True + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context +Test Template Serve a @context with details equal to true + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS +053_02_01 Serve a @context with details equal to True + [Tags] ctx-serve 5_13_4 + ${True} + + +*** Keywords *** +Create Initial @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Serve a @context with details equal to true + [Documentation] Check that you can serve a @context with details + [Arguments] ${details} + + ${response}= Serve a @context ${uri} ${details} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + + # URL; + # localId; + # kind; + # timestamp; + # lastUsage [OPTIONAL]; + # numberOfHits [OPTIONAL]; + # extraInfo [OPTIONAL, used by implementations to report any kind of custom information]. + Check Context Response Body Containing Detailed Information ${response.json()} + +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot new file mode 100644 index 00000000..74e0bc86 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot @@ -0,0 +1,47 @@ +*** Settings *** +Documentation Check that you can add a @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Teardown Delete Initial @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_201}= Created +${reason_204}= No Content +${context_hosted}= hosted + + +*** Test Cases *** +050_01_01 Add a valid @context + [Documentation] Check that you can add a @context + [Tags] ctx-add 5_13_2 + + ${response}= Add a new @context ${filename} + + Check Response Status Code 201 ${response.status_code} + Check Response Does Not Contain Body ${response} + Check Response Reason set to ${response.reason} ${reason_201} + + Dictionary Should Contain Key ${response.headers} Location msg=HTTP Headers do not contain key 'Location' + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + + Log URI: ${uri} + + # Need to check that the kind value of the created context is "hosted" + ${response_serve}= Serve a @context ${uri} True + Check Response Kind set to ${response.kind} ${context_hosted} + + Log URI: ${response_serve} + + +*** Keywords *** +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot new file mode 100644 index 00000000..f3c35ba9 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Check that you receive a 400 Bad Request creating a @context if the content is incorrect + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Teardown Delete @context if it was created by error +Test Template Add @context scenarios + + +*** Variables *** +${wrong_context_filename}= @context-incorrect.json +${wrong_json_filename}= @context-wrong-json.json +${wrong_duplicated_key}= @context-duplicated-key.json +${reason_400}= Bad Request +${problem_type}= https://uri.etsi.org/ngsi-ld/errors/InvalidRequest + + +*** Test Cases *** FILENAME REASON +050_02_01 Checking Incorrect Payload + [Tags] ctx-add 5_13_2 + ${wrong_context_filename} ${reason_400} +050_02_02 Checking Wrong JSON + [Tags] ctx-add 5_13_2 + ${wrong_json_filename} ${reason_400} +050_02_02 Checking Duplicated Key in JSON + [Tags] ctx-add 5_13_2 + ${wrong_duplicated_key} ${reason_400} + + +*** Keywords *** +Add @context scenarios + [Documentation] Check that the payload include "@context" + [Arguments] ${filename} ${reason} + + ${response}= Add a new @context ${filename} + Set Suite Variable ${response} + + Check Response Status Code 400 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason} + + Check Response Body Containing ProblemDetails Element ${response.json()} ${problem_type} + +Delete @context if it was created by error + IF '${response.status_code}'!='400' + ${uri}= Fetch Id From Response Location Header ${response.headers} + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot new file mode 100644 index 00000000..e69de29b diff --git a/data/jsonldContext/@context-duplicated-key.json b/data/jsonldContext/@context-duplicated-key.json new file mode 100644 index 00000000..2f5d5a43 --- /dev/null +++ b/data/jsonldContext/@context-duplicated-key.json @@ -0,0 +1,7 @@ +{ + "@context": { + "A1": "urn:ngsi-ld:attributes:A1", + "A1": "urn:ngsi-ld:attributes:A2", + "A3": "urn:ngsi-ld:attributes:A3" + } +} diff --git a/data/jsonldContext/@context-incorrect.json b/data/jsonldContext/@context-incorrect.json new file mode 100644 index 00000000..d9ed4a10 --- /dev/null +++ b/data/jsonldContext/@context-incorrect.json @@ -0,0 +1,5 @@ +{ + "A1": "urn:ngsi-ld:attributes:A1", + "A2": "urn:ngsi-ld:attributes:A2", + "A3": "urn:ngsi-ld:attributes:A3" +} diff --git a/data/jsonldContext/@context-minimal-valid.json b/data/jsonldContext/@context-minimal-valid.json new file mode 100644 index 00000000..1acfdee0 --- /dev/null +++ b/data/jsonldContext/@context-minimal-valid.json @@ -0,0 +1,7 @@ +{ + "@context": { + "A1": "urn:ngsi-ld:attributes:A1", + "A2": "urn:ngsi-ld:attributes:A2", + "A3": "urn:ngsi-ld:attributes:A3" + } +} diff --git a/data/jsonldContext/@context-wrong-json.json b/data/jsonldContext/@context-wrong-json.json new file mode 100644 index 00000000..af29c924 --- /dev/null +++ b/data/jsonldContext/@context-wrong-json.json @@ -0,0 +1,5 @@ +{ + "A1": "urn:ngsi-ld:attributes:A1" + "A2": "urn:ngsi-ld:attributes:A2" + "A3": "urn:ngsi-ld:attributes:A3" +} diff --git a/data/jsonldContext/expected-detailed-@context.json b/data/jsonldContext/expected-detailed-@context.json new file mode 100644 index 00000000..e69de29b diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource new file mode 100644 index 00000000..ed21efd2 --- /dev/null +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -0,0 +1,99 @@ +*** Settings *** +Variables ${EXECDIR}/resources/variables.py +Library ${EXECDIR}/libraries/logUtils.py +Library Collections +Library JSONLibrary +Library RequestsLibrary +Library OperatingSystem +Library String + + +*** Variables *** +${JSONLDCONTEXTS_ENDPOINT_PATH} jsonldContexts + +${CONTENT_TYPE_JSON} application/json + +${response} ${EMPTY} + + +*** Keywords *** +Add a new @context + [Arguments] ${filename} + ${file_content}= Get File ${EXECDIR}/data/jsonldContext/${filename} + + &{headers}= Create Dictionary Content-Type=application/json + ${response}= POST + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH} + ... data=${file_content} + ... headers=${headers} + ... expected_status=any + + Output ${response} Add a new @context + RETURN ${response} + +Serve a @context + [Arguments] ${contextId} ${details}=${EMPTY} + + &{params}= Create Dictionary + + IF '${details}'!='' + Set To Dictionary ${params} details=${details} + END + + ${response}= GET + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... params=${params} + ... expected_status=any + + Output ${response} Serve a @context + RETURN ${response} + +Delete a @context without reload + [Arguments] ${contextId} + + ${response}= DELETE + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... expected_status=any + + Status Should Be 204 ${response} + + Output ${response} Delete a @context without reload + RETURN ${response} + +Delete a @context with reload + [Arguments] ${contextId} ${reload} + + @{params}= Create List + Append To List ${params} reload=${reload} + + ${response}= DELETE + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId}?${params} + ... expected_status=any + + Status Should Be 204 ${response} + + Output ${response} Delete a @context with reload + RETURN ${response} + +Check Context Response Body Content + [Arguments] ${expectation_filename} ${response_body} + ${context_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${expectation_filename} + Dictionaries Should Be Equal ${response_body} ${context_payload} + +Check Context Response Body Containing Detailed Information + [Arguments] ${response_body} + Should Not Be Empty ${response_body['url']} + Should Not Be Empty ${response_body['localId']} + Should Not Be Empty ${response_body['kind']} + Should Not Be Empty ${response_body['timestamp']} + + Should Be String ${response_body['url']} + Should Be String ${response_body['localId']} + Should Be String ${response_body['kind']} + + ${value}= Evaluate response_body.get('timestamp') + ${date}= Parse Ngsild Date ${response_body}['timestamp'] + Should Not Be Equal + ... ${date} + ... ${None} + ... The timestamp key contains a value (${value}) that it is not in DateTime format diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 1650e4cd..d4d81851 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -351,6 +351,10 @@ Check Response Reason set to [Arguments] ${response_reason} ${reason} Should Be Equal ${response_reason} ${reason} +Check Response Kind set to + [Arguments] ${response_kind} ${kind} + Should Be Equal ${response_kind} ${kind} + Check RL Response Body Containing ProblemDetails Element Containing Type Element set to [Arguments] ${response_body} ${type} ${json_response_body}= Set Variable ${response_body} -- GitLab From e986c49ac7a75f4018d960ff2acf598e844c9326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 20 Feb 2024 19:49:29 +0100 Subject: [PATCH 05/25] Update delete @context operation --- .../Consumption/ServeContext/053_02.robot | 2 +- .../Consumption/ServeContext/053_03.robot | 28 +++++++-------- .../Provision/DeleteContext/051_01.robot | 36 +++++++++++++++++++ .../Provision/DeleteContext/051_02.robot | 27 ++++++++++++++ .../ApiUtils/JSON-LD@ContextServer.resource | 21 ++++++----- resources/AssertionUtils.resource | 9 +++-- 6 files changed, 98 insertions(+), 25 deletions(-) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot index efa39298..aa1b8853 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot @@ -21,7 +21,7 @@ ${reason_204}= No Content *** Test Cases *** DETAILS 053_02_01 Serve a @context with details equal to False [Tags] ctx-serve 5_13_4 - ${False} + false *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot index 8e901433..caf997b9 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot @@ -13,15 +13,16 @@ Test Template Serve a @context with details equal to true *** Variables *** -${filename}= @context-minimal-valid.json -${reason_200}= OK -${reason_204}= No Content +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content +${context_hosted}= hosted -*** Test Cases *** DETAILS +*** Test Cases *** DETAILS CONTEXT_TYPE 053_02_01 Serve a @context with details equal to True [Tags] ctx-serve 5_13_4 - ${True} + true ${context_hosted} *** Keywords *** @@ -33,7 +34,7 @@ Create Initial @context Serve a @context with details equal to true [Documentation] Check that you can serve a @context with details - [Arguments] ${details} + [Arguments] ${details} ${context_type} ${response}= Serve a @context ${uri} ${details} @@ -41,14 +42,13 @@ Serve a @context with details equal to true Check Response Reason set to ${response.reason} ${reason_200} Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} - # URL; - # localId; - # kind; - # timestamp; - # lastUsage [OPTIONAL]; - # numberOfHits [OPTIONAL]; - # extraInfo [OPTIONAL, used by implementations to report any kind of custom information]. - Check Context Response Body Containing Detailed Information ${response.json()} + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response.json()} ${context_type} + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response.json()} lastUsage + Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + Check Dictionary Might Contain Additional Members ${response.json()} extraInfo Delete Initial @context ${response_delete}= Delete a @context without reload ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot index e69de29b..7fd3fa61 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot @@ -0,0 +1,36 @@ +*** Settings *** +Documentation Check that you can delete a previous created hosted @context without reload param + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial hosted @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_204}= No Content +${context_hosted}= hosted + + +*** Test Cases *** DETAILS CONTEXT_TYPE +051_01_01 Delete a @context whose kind is hosted without reload param + [Documentation] Check that you can delete a hosted @context + [Tags] ctx-serve 5_13_4 + + ${response}= Delete a @context without reload ${uri} + + Check Response Status Code 204 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_204} + Check Response Does Not Contain Body ${response} + + +*** Keywords *** +Create Initial hosted @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot new file mode 100644 index 00000000..28a49c89 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot @@ -0,0 +1,27 @@ +*** Settings *** +Documentation Check that you get an error when trying to delete an unknown @context identifier + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_404}= Not Found + + +*** Test Cases *** +051_02_01 Delete a @context whose kind is hosted without reload param and unknown @context identifier + [Documentation] Check that an error message is obtained in the response when we try to delete a @context without unknonwn id + [Tags] ctx-serve 5_13_4 + + ${random_url}= Generate Random String 16 [NUMBERS] + ${response}= Delete a @context without reload ${random_url} + + Check Response Status Code 404 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_404} + + Check Response Body Containing ProblemDetails Element ${response.json()} ${ERROR_TYPE_RESOURCE_NOT_FOUND} diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index ed21efd2..b7d36ca3 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -15,6 +15,8 @@ ${CONTENT_TYPE_JSON} application/json ${response} ${EMPTY} +@{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated + *** Keywords *** Add a new @context @@ -55,8 +57,6 @@ Delete a @context without reload ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} ... expected_status=any - Status Should Be 204 ${response} - Output ${response} Delete a @context without reload RETURN ${response} @@ -70,8 +70,6 @@ Delete a @context with reload ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId}?${params} ... expected_status=any - Status Should Be 204 ${response} - Output ${response} Delete a @context with reload RETURN ${response} @@ -81,16 +79,23 @@ Check Context Response Body Content Dictionaries Should Be Equal ${response_body} ${context_payload} Check Context Response Body Containing Detailed Information - [Arguments] ${response_body} - Should Not Be Empty ${response_body['url']} + [Arguments] ${response_body} ${context_type} + Should Not Be Empty ${response_body['URL']} Should Not Be Empty ${response_body['localId']} Should Not Be Empty ${response_body['kind']} - Should Not Be Empty ${response_body['timestamp']} - Should Be String ${response_body['url']} + Should Be String ${response_body['URL']} Should Be String ${response_body['localId']} Should Be String ${response_body['kind']} + IF $response_body['kind'] not in $ALLOWED_CONTEXT + fail The value of kind:"${response_body['kind']}" is not allowed + END + + Should Be Equal ${response_body['kind']} ${context_type} + + # TODO: v1.8.1 change timestamp -> createdAt + Should Not Be Empty ${response_body['timestamp']} ${value}= Evaluate response_body.get('timestamp') ${date}= Parse Ngsild Date ${response_body}['timestamp'] Should Not Be Equal diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index d4d81851..841764fe 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -463,7 +463,7 @@ Check Dictionary Might Contain Additional Members ${value}= Evaluate $dictionary.get($key) IF '${value}' != '' and '${value}' != 'None' - IF "${key}" == "lastNotification" or "${key}" == "lastFailure" or "${key}" == "lastSuccess" + IF "${key}" == "lastNotification" or "${key}" == "lastFailure" or "${key}" == "lastSuccess" or "${key}" == "lastUsage" # Need to check that there is a DateTime value ${date}= Parse Ngsild Date ${dictionary}[${key}] Should Not Be Equal @@ -471,7 +471,7 @@ Check Dictionary Might Contain Additional Members ... ${None} ... The Additional Member ${key} contains a value (${value}) that it is not in DateTime format END - IF "${key}" == "timesSent" + IF "${key}" == "timesSent" or "${key}" == "numberOfHits" # Need to check that there is a Integer value ${type int}= Evaluate type(${dictionary}[${key}]).__name__ Should Be Equal @@ -479,6 +479,11 @@ Check Dictionary Might Contain Additional Members ... int ... The Additonal Member ${key} contains a value (${value}) that it is not in Number format END + IF "${key}" == "extraInfo" + ${is_json}= Evaluate json.loads('''${value}''') if isinstance('''${value}''', str) else None + IF ${is_json} is not None Log Variable is a JSON object + IF ${is_json} is None Log Variable is not a JSON object + END ELSE Log The key '${key}' is not present in the dictionary END -- GitLab From bb2e934d91fafac696d9ad78700b64c4013b4c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 21 Feb 2024 09:28:53 +0100 Subject: [PATCH 06/25] Adding permutations in the List @context operation --- .../Consumption/ListContexts/052_01.robot | 54 +++++++++++ .../Consumption/ListContexts/052_02.robot | 68 ++++++++++++++ .../Consumption/ListContexts/052_03.robot | 90 +++++++++++++++++++ .../Consumption/ListContexts/052_04.robot | 45 ++++++++++ .../@context-minimal-second-valid.json | 7 ++ .../@context-minimal-third-valid.json | 7 ++ .../ApiUtils/JSON-LD@ContextServer.resource | 84 +++++++++++++++-- 7 files changed, 348 insertions(+), 7 deletions(-) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot create mode 100644 data/jsonldContext/@context-minimal-second-valid.json create mode 100644 data/jsonldContext/@context-minimal-third-valid.json diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot index e69de29b..656c6550 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot @@ -0,0 +1,54 @@ +*** Settings *** +Documentation Check that you can list all the @context available in the broker with no previous add @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Template List @contexts with no previous created @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND +052_01_01 List @contexts with neither details or kind and not previously created @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} ${EMPTY} +052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} hosted +052_01_03 List @contexts with no details and kind equal to cached and not previously created @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} cached +052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} implicitlycreated +052_01_05 List @contexts with details equal to false and no kind and not previously created @context + [Tags] ctx-serve 5_13_4 + false ${EMPTY} +052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context + [Tags] ctx-serve 5_13_4 + false hosted +052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context + [Tags] ctx-serve 5_13_4 + false cached +052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context + [Tags] ctx-serve 5_13_4 + false implicitlycreated + + +*** Keywords *** +List @contexts with no previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Context Response Body Containing a list with one URL equal to default @context ${response.json()} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot new file mode 100644 index 00000000..89d7d960 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot @@ -0,0 +1,68 @@ +*** Settings *** +Documentation Check that you can list all the @context available in the broker with one add @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context +Test Template List @contexts with one previous created @context + + +*** Variables *** +${first_filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND +052_02_01 List @contexts with neither details or kind and with previously one add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} ${EMPTY} +052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} hosted +052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} cached +052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} implicitlycreated +052_02_05 List @contexts with details equal to false and no kind and with previously one add @context + [Tags] ctx-serve 5_13_4 + false ${EMPTY} +052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context + [Tags] ctx-serve 5_13_4 + false hosted +052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context + [Tags] ctx-serve 5_13_4 + false cached +052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context + [Tags] ctx-serve 5_13_4 + false implicitlycreated + + +*** Keywords *** +Create Initial @context + ${response}= Add a new @context ${first_filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +List @contexts with one previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} + + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Context Response Body Containing a list with more than one URL ${response.json()} 2 ${uri} + +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot new file mode 100644 index 00000000..db08467b --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot @@ -0,0 +1,90 @@ +*** Settings *** +Documentation Check that you can list all the @context available in the broker with several add @contexts + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial set of @contexts +Test Teardown Delete Initial @contexts +Test Template List @contexts with several previous created @context + + +*** Variables *** +${first_filename}= @context-minimal-valid.json +${second_filename}= @context-minimal-second-valid.json +${third_filename}= @context-minimal-third-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND +052_03_01 List @contexts with neither details or kind and with previously several add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} ${EMPTY} +052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} hosted +052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} cached +052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} implicitlycreated +052_03_05 List @contexts with details equal to false and no kind and with previously several add @context + [Tags] ctx-serve 5_13_4 + false ${EMPTY} +052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context + [Tags] ctx-serve 5_13_4 + false hosted +052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context + [Tags] ctx-serve 5_13_4 + false cached +052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context + [Tags] ctx-serve 5_13_4 + false implicitlycreated + + +*** Keywords *** +Create Initial set of @contexts + ${response}= Add a new @context ${first_filename} + Check Response Status Code 201 ${response.status_code} + ${first_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${first_uri} + + ${response}= Add a new @context ${second_filename} + Check Response Status Code 201 ${response.status_code} + ${second_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${second_uri} + + ${response}= Add a new @context ${third_filename} + Check Response Status Code 201 ${response.status_code} + ${third_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${third_uri} + + @{uris}= Create List + Append To List ${uris} ${first_uri} + Append To List ${uris} ${second_uri} + Append To List ${uris} ${third_uri} + Set Suite Variable ${uris} + +List @contexts with several previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} + + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Context Response Body Containing a list with several URLs ${response.json()} 4 ${uris} + +Delete Initial @contexts + FOR ${uri} IN @{uris} + Log URI: ${uri} + + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} + END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot new file mode 100644 index 00000000..7566c09a --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot @@ -0,0 +1,45 @@ +*** Settings *** +Documentation Check that you get an error when try to list @context with wrong details or kind + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Template List @contexts with no previous created @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${reason_400}= Bad Request +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND +052_04_01 List @contexts with no details and kind equal to other and not previously created @context + [Tags] ctx-serve 5_13_4 + ${EMPTY} other +052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context + [Tags] ctx-serve 5_13_4 + other ${EMPTY} +052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context + [Tags] ctx-serve 5_13_4 + other other +052_04_04 List @contexts with no details and kind equal to other and not previously created @context + [Tags] ctx-serve 5_13_4 + true other +052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context + [Tags] ctx-serve 5_13_4 + other hosted + + +*** Keywords *** +List @contexts with no previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 400 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_400} + Check Response Body Containing ProblemDetails Element ${response.json()} ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/data/jsonldContext/@context-minimal-second-valid.json b/data/jsonldContext/@context-minimal-second-valid.json new file mode 100644 index 00000000..ccd1b9d5 --- /dev/null +++ b/data/jsonldContext/@context-minimal-second-valid.json @@ -0,0 +1,7 @@ +{ + "@context": { + "B1": "urn:ngsi-ld:attributes:B1", + "B2": "urn:ngsi-ld:attributes:B2", + "B3": "urn:ngsi-ld:attributes:B3" + } +} diff --git a/data/jsonldContext/@context-minimal-third-valid.json b/data/jsonldContext/@context-minimal-third-valid.json new file mode 100644 index 00000000..c20f8518 --- /dev/null +++ b/data/jsonldContext/@context-minimal-third-valid.json @@ -0,0 +1,7 @@ +{ + "@context": { + "C1": "urn:ngsi-ld:attributes:C1", + "C2": "urn:ngsi-ld:attributes:C2", + "C3": "urn:ngsi-ld:attributes:C3" + } +} diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index b7d36ca3..87884f40 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -13,6 +13,8 @@ ${JSONLDCONTEXTS_ENDPOINT_PATH} jsonldContexts ${CONTENT_TYPE_JSON} application/json +${CORE_@CONTEXT} https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld + ${response} ${EMPTY} @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated @@ -21,6 +23,7 @@ ${response} ${EMPTY} *** Keywords *** Add a new @context [Arguments] ${filename} + ${file_content}= Get File ${EXECDIR}/data/jsonldContext/${filename} &{headers}= Create Dictionary Content-Type=application/json @@ -36,16 +39,19 @@ Add a new @context Serve a @context [Arguments] ${contextId} ${details}=${EMPTY} - &{params}= Create Dictionary - IF '${details}'!='' + &{params}= Create Dictionary Set To Dictionary ${params} details=${details} - END - ${response}= GET - ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} - ... params=${params} - ... expected_status=any + ${response}= GET + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... params=${params} + ... expected_status=any + ELSE + ${response}= GET + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... expected_status=any + END Output ${response} Serve a @context RETURN ${response} @@ -75,11 +81,13 @@ Delete a @context with reload Check Context Response Body Content [Arguments] ${expectation_filename} ${response_body} + ${context_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${expectation_filename} Dictionaries Should Be Equal ${response_body} ${context_payload} Check Context Response Body Containing Detailed Information [Arguments] ${response_body} ${context_type} + Should Not Be Empty ${response_body['URL']} Should Not Be Empty ${response_body['localId']} Should Not Be Empty ${response_body['kind']} @@ -102,3 +110,65 @@ Check Context Response Body Containing Detailed Information ... ${date} ... ${None} ... The timestamp key contains a value (${value}) that it is not in DateTime format + +List @contexts + [Arguments] ${details}=${EMPTY} ${kind}=${EMPTY} + + &{params}= Create Dictionary + + IF '${details}'=='' and '${kind}'=='' + ${response}= GET + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH} + ... expected_status=any + ELSE + IF '${details}'!='' + Set To Dictionary ${params} details=${details} + END + + IF '${kind}'!='' Set To Dictionary ${params} kind=${kind} + + ${params_as_string}= Catenate SEPARATOR=& @{params} + + ${response}= GET + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}?${params_as_string} + ... params=${params} + ... expected_status=any + END + + Output ${response} List @contexts + RETURN ${response} + +Check Context Response Body Containing a list with one URL equal to default @context + [Arguments] ${response_body} + + Length Should Be ${response_body} 1 msg=The length of the strings array of @contexts is not 1 + + Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + +Check Context Response Body Containing a list with more than one URL + [Arguments] ${response_body} ${expected_length} ${the_other_context} + + Length Should Be + ... ${response_body} + ... ${expected_length} + ... msg=The length of the strings array of @contexts is not ${expected_length} + + Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + Should Be Equal ${response_body[1]} ${the_other_context} + +Check Context Response Body Containing a list with several URLs + [Arguments] ${response_body} ${expected_length} ${list_contexts} + + Length Should Be + ... ${response_body} + ... ${expected_length} + ... msg=The length of the strings array of @contexts is not ${expected_length} + + Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + # Log URI: ${uri_context} index: ${index} + ${index}= Evaluate ${index} + 1 + + Should Be Equal ${response_body[${index}]} ${uri_context} + END -- GitLab From d4307d5930eadb6cd7960228000ba9638890a7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 21 Feb 2024 18:31:11 +0100 Subject: [PATCH 07/25] Complete the management of Cached @context --- .../Consumption/ListContexts/052_01.robot | 12 ++-- .../Consumption/ListContexts/052_02.robot | 12 ++-- .../Consumption/ListContexts/052_03.robot | 12 ++-- .../Consumption/ListContexts/052_04.robot | 2 +- .../Consumption/ServeContext/053_01.robot | 26 +++++--- .../Consumption/ServeContext/053_02.robot | 21 +++++-- .../Consumption/ServeContext/053_03.robot | 56 ----------------- .../Provision/AddContext/050_01.robot | 32 ++++++---- .../Provision/AddContext/050_02.robot | 3 - .../Provision/AddContext/050_03.robot | 61 +++++++++++++++++++ .../Provision/AddContext/050_04.robot | 47 ++++++++++++++ .../Provision/DeleteContext/051_01.robot | 7 +-- .../Provision/DeleteContext/051_03.robot | 43 +++++++++++++ .../@context-cached-one-valid.json | 5 ++ data/jsonldContext/@context-cached-valid.json | 6 ++ .../ApiUtils/JSON-LD@ContextServer.resource | 50 +++++++++++++-- resources/AssertionUtils.resource | 10 +-- 17 files changed, 283 insertions(+), 122 deletions(-) delete mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot create mode 100644 data/jsonldContext/@context-cached-one-valid.json create mode 100644 data/jsonldContext/@context-cached-valid.json diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot index 656c6550..e4477ddc 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot @@ -22,25 +22,25 @@ ${reason_204}= No Content ${EMPTY} ${EMPTY} 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context [Tags] ctx-serve 5_13_4 - ${EMPTY} hosted + ${EMPTY} Hosted 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context [Tags] ctx-serve 5_13_4 - ${EMPTY} cached + ${EMPTY} Cached 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context [Tags] ctx-serve 5_13_4 - ${EMPTY} implicitlycreated + ${EMPTY} ImplicitlyCreated 052_01_05 List @contexts with details equal to false and no kind and not previously created @context [Tags] ctx-serve 5_13_4 false ${EMPTY} 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context [Tags] ctx-serve 5_13_4 - false hosted + false Hosted 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context [Tags] ctx-serve 5_13_4 - false cached + false Cached 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context [Tags] ctx-serve 5_13_4 - false implicitlycreated + false ImplicitlyCreated *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot index 89d7d960..af5aa522 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot @@ -24,25 +24,25 @@ ${reason_204}= No Content ${EMPTY} ${EMPTY} 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} hosted + ${EMPTY} Hosted 052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} cached + ${EMPTY} Cached 052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} implicitlycreated + ${EMPTY} ImplicitlyCreated 052_02_05 List @contexts with details equal to false and no kind and with previously one add @context [Tags] ctx-serve 5_13_4 false ${EMPTY} 052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context [Tags] ctx-serve 5_13_4 - false hosted + false Hosted 052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context [Tags] ctx-serve 5_13_4 - false cached + false Cached 052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context [Tags] ctx-serve 5_13_4 - false implicitlycreated + false ImplicitlyCreated *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot index db08467b..c9ba7ca3 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot @@ -26,25 +26,25 @@ ${reason_204}= No Content ${EMPTY} ${EMPTY} 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} hosted + ${EMPTY} Hosted 052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} cached + ${EMPTY} Cached 052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_4 - ${EMPTY} implicitlycreated + ${EMPTY} ImplicitlyCreated 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context [Tags] ctx-serve 5_13_4 false ${EMPTY} 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_4 - false hosted + false Hosted 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context [Tags] ctx-serve 5_13_4 - false cached + false Cached 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_4 - false implicitlycreated + false ImplicitlyCreated *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot index 7566c09a..90147c24 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot @@ -31,7 +31,7 @@ ${reason_204}= No Content true other 052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context [Tags] ctx-serve 5_13_4 - other hosted + other Hosted *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot index e6cf791b..0bef8ca9 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot @@ -9,6 +9,7 @@ Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context +Test Template Serve a @context with details *** Variables *** @@ -17,17 +18,13 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** +*** Test Cases *** DETAILS 053_01_01 Serve a @context without details - [Documentation] Check that you can serve a @context [Tags] ctx-serve 5_13_4 - - ${response}= Serve a @context ${uri} - - Check Response Status Code 200 ${response.status_code} - Check Response Reason set to ${response.reason} ${reason_200} - Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} - Check Context Response Body Content ${filename} ${response.json()} + ${EMPTY} +053_01_02 Serve a @context with details equal to false + [Tags] ctx-serve 5_13_4 + false *** Keywords *** @@ -37,6 +34,17 @@ Create Initial @context ${uri}= Fetch Id From Response Location Header ${response.headers} Set Suite Variable ${uri} +Serve a @context with details + [Documentation] Check that you can serve a @context with details equal to empty or false + [Arguments] ${details} + + ${response}= Serve a @context ${uri} ${details} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + Check Context Response Body Content ${filename} ${response.json()} + Delete Initial @context ${response_delete}= Delete a @context without reload ${uri} Check Response Status Code 204 ${response_delete.status_code} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot index aa1b8853..3e723a51 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you can serve a previous created @context with details equal to False +Documentation Check that you can serve a previous created @context with details equal to True Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -18,10 +18,10 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS -053_02_01 Serve a @context with details equal to False +*** Test Cases *** DETAILS CONTEXT_TYPE +053_02_01 Serve a @context with details equal to True [Tags] ctx-serve 5_13_4 - false + true Hosted *** Keywords *** @@ -33,14 +33,23 @@ Create Initial @context Serve a @context with details equal to true [Documentation] Check that you can serve a @context with details - [Arguments] ${details} + [Arguments] ${details} ${context_type} ${response}= Serve a @context ${uri} ${details} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} - Check Context Response Body Content ${filename} ${response.json()} + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response.json()} ${context_type} + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response.json()} lastUsage + Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${response.json()} Delete Initial @context ${response_delete}= Delete a @context without reload ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot deleted file mode 100644 index caf997b9..00000000 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot +++ /dev/null @@ -1,56 +0,0 @@ -*** Settings *** -Documentation Check that you can serve a previous created @context with details equal to True - -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections - -Test Setup Create Initial @context -Test Teardown Delete Initial @context -Test Template Serve a @context with details equal to true - - -*** Variables *** -${filename}= @context-minimal-valid.json -${reason_200}= OK -${reason_204}= No Content -${context_hosted}= hosted - - -*** Test Cases *** DETAILS CONTEXT_TYPE -053_02_01 Serve a @context with details equal to True - [Tags] ctx-serve 5_13_4 - true ${context_hosted} - - -*** Keywords *** -Create Initial @context - ${response}= Add a new @context ${filename} - Check Response Status Code 201 ${response.status_code} - ${uri}= Fetch Id From Response Location Header ${response.headers} - Set Suite Variable ${uri} - -Serve a @context with details equal to true - [Documentation] Check that you can serve a @context with details - [Arguments] ${details} ${context_type} - - ${response}= Serve a @context ${uri} ${details} - - Check Response Status Code 200 ${response.status_code} - Check Response Reason set to ${response.reason} ${reason_200} - Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} - - # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values - Check Context Response Body Containing Detailed Information ${response.json()} ${context_type} - - # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response.json()} lastUsage - Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits - Check Dictionary Might Contain Additional Members ${response.json()} extraInfo - -Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot index 74e0bc86..1f1c9a1c 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you can add a @context +Documentation Check that you can add a hosted @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -7,19 +7,29 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context +Test Template Add a valid @context *** Variables *** -${filename}= @context-minimal-valid.json -${reason_201}= Created -${reason_204}= No Content -${context_hosted}= hosted +${filename_dictionary}= @context-minimal-valid.json +${filename_list}= @context-cached-valid.json +${reason_201}= Created +${reason_204}= No Content -*** Test Cases *** -050_01_01 Add a valid @context - [Documentation] Check that you can add a @context +*** Test Cases *** FILENAME CONTEXT_TYPE +050_01_01 Add a valid hosted @context from key=value + [Tags] ctx-add 5_13_2 + ${filename_dictionary} Hosted +050_01_02 Add a valid cached @context from URI [Tags] ctx-add 5_13_2 + ${filename_list} Hosted + + +*** Keywords *** +Add a valid @context + [Documentation] Check that you can add a @context + [Arguments] ${filename} ${context_type} ${response}= Add a new @context ${filename} @@ -34,13 +44,11 @@ ${context_hosted}= hosted Log URI: ${uri} # Need to check that the kind value of the created context is "hosted" - ${response_serve}= Serve a @context ${uri} True - Check Response Kind set to ${response.kind} ${context_hosted} + ${response_serve}= Serve a @context ${uri} true + Check Response Kind set to ${response_serve.json()} ${context_type} Log URI: ${response_serve} - -*** Keywords *** Delete Initial @context ${response_delete}= Delete a @context without reload ${uri} Check Response Status Code 204 ${response_delete.status_code} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot index f3c35ba9..b0b80439 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot @@ -24,9 +24,6 @@ ${problem_type}= https://uri.etsi.org/ngsi-ld/errors/InvalidReque 050_02_02 Checking Wrong JSON [Tags] ctx-add 5_13_2 ${wrong_json_filename} ${reason_400} -050_02_02 Checking Duplicated Key in JSON - [Tags] ctx-add 5_13_2 - ${wrong_duplicated_key} ${reason_400} *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot new file mode 100644 index 00000000..e0b2805a --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot @@ -0,0 +1,61 @@ +*** Comments *** +# POST /subscription (Content-Type: application/ld+json) +# { +# "@context: { "a: "http://a,b,c/a" }, +# "id": ... +# } +# +# implicitycreate @context + + +*** Settings *** +Documentation Check that you can create a implicitycreate @context through creating a subscription + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create Initial Subscription +Test Teardown Delete Initial Subscription + + +*** Variables *** +${subscription_id_prefix}= urn:ngsi-ld:Subscription: +${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld + + +*** Test Cases *** +050_03_01 Check + [Documentation] Check that you can create a subscription + [Tags] sub-create 5_8_1 + ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + Set Suite Variable ${subscription_id} + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + ${expected_subscription}= Load Test Sample ${subscription_expectation_file_path} ${subscription_id} + ${response1}= Retrieve Subscription + ... id=${subscription_id} + ... accept=${CONTENT_TYPE_LD_JSON} + ... context=${ngsild_test_suite_context} + Check Created Resource Set To ${expected_subscription} ${response1.json()} + + +*** Keywords *** +Create Initial Subscription + ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + ${expected_subscription}= Load Test Sample ${subscription_expectation_file_path} ${subscription_id} + ${response1}= Retrieve Subscription + ... id=${subscription_id} + ... accept=${CONTENT_TYPE_LD_JSON} + ... context=${ngsild_test_suite_context} + Check Created Resource Set To ${expected_subscription} ${response1.json()} + +Delete Initial Subscription + Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot new file mode 100644 index 00000000..077e5d8d --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot @@ -0,0 +1,47 @@ +*** Settings *** +Documentation Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Teardown Delete Initial @context + + +*** Variables *** +${filename_list}= @context-cached-valid.json +${reason_201}= Created +${reason_204}= No Content + + +*** Test Cases *** +050_04_01 Add a valid hosted @context with URIs and check that the URIs are Cached @contexts + [Documentation] Check that you can add a @context + [Tags] ctx-add 5_13_2 + + ${response}= Add a new @context ${filename_list} + + Check Response Status Code 201 ${response.status_code} + Check Response Does Not Contain Body ${response} + Check Response Reason set to ${response.reason} ${reason_201} + + Dictionary Should Contain Key ${response.headers} Location msg=HTTP Headers do not contain key 'Location' + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + + Log URI: ${uri} + + # Need to check that the kind value of the created context is "hosted" + ${response_serve}= Serve a @context ${uri} true + Check Response Kind set to ${response_serve.json()} Hosted + + # Need to check that each of the URIs are Cached @contexts + Check Cached @Contexts ${filename_list} + + +*** Keywords *** +Delete Initial @context + ${response_delete}= Delete a @context without reload ${uri} + Check Response Status Code 204 ${response_delete.status_code} + Check Response Reason set to ${response_delete.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot index 7fd3fa61..5968b108 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot @@ -11,12 +11,11 @@ Test Setup Create Initial hosted @context *** Variables *** -${filename}= @context-minimal-valid.json -${reason_204}= No Content -${context_hosted}= hosted +${filename}= @context-minimal-valid.json +${reason_204}= No Content -*** Test Cases *** DETAILS CONTEXT_TYPE +*** Test Cases *** 051_01_01 Delete a @context whose kind is hosted without reload param [Documentation] Check that you can delete a hosted @context [Tags] ctx-serve 5_13_4 diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot new file mode 100644 index 00000000..1997b4b0 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Check that you can delete a previous created cached @context without reload param + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial cached @context + + +*** Variables *** +${filename}= @context-cached-one-valid.json +${reason_204}= No Content + + +*** Test Cases *** +051_03_01 Delete a @context whose kind is hosted without reload param + [Documentation] Check that you can delete a hosted @context + [Tags] ctx-serve 5_13_4 + + ${response}= Delete a @context without reload ${contextId} + + Check Response Status Code 204 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_204} + Check Response Does Not Contain Body ${response} + + +*** Keywords *** +Create Initial cached @context + ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} + ${contextId}= Get From Dictionary ${entity_payload} @context + ${contextId}= Get From List ${contextId} 0 + + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + + ${response}= Serve a @context ${contextId} true + Check Response Kind set to ${response.json()} Cached + + Set Global Variable ${contextId} diff --git a/data/jsonldContext/@context-cached-one-valid.json b/data/jsonldContext/@context-cached-one-valid.json new file mode 100644 index 00000000..98d492f7 --- /dev/null +++ b/data/jsonldContext/@context-cached-one-valid.json @@ -0,0 +1,5 @@ +{ + "@context": [ + "http://smartdatamodels.org/context.jsonld" + ] +} diff --git a/data/jsonldContext/@context-cached-valid.json b/data/jsonldContext/@context-cached-valid.json new file mode 100644 index 00000000..6a113497 --- /dev/null +++ b/data/jsonldContext/@context-cached-valid.json @@ -0,0 +1,6 @@ +{ + "@context": [ + "http://smartdatamodels.org/context.jsonld", + "https://fiware.github.io/data-models/context.jsonld" + ] +} diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index 87884f40..570aecd2 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -1,5 +1,6 @@ *** Settings *** Variables ${EXECDIR}/resources/variables.py +Resource ${EXECDIR}/resources/AssertionUtils.resource Library ${EXECDIR}/libraries/logUtils.py Library Collections Library JSONLibrary @@ -103,13 +104,19 @@ Check Context Response Body Containing Detailed Information Should Be Equal ${response_body['kind']} ${context_type} # TODO: v1.8.1 change timestamp -> createdAt - Should Not Be Empty ${response_body['timestamp']} - ${value}= Evaluate response_body.get('timestamp') - ${date}= Parse Ngsild Date ${response_body}['timestamp'] + # Should Not Be Empty ${response_body['timestamp']} + # ${value}= Evaluate response_body.get('timestamp') + # ${date}= Parse Ngsild Date ${response_body}['timestamp'] + # Should Not Be Equal + # ... ${date} + # ... ${None} + # ... The timestamp key contains a value (${value}) that it is not in DateTime format + Should Not Be Empty ${response_body['createdAt']} + ${date}= Parse Ngsild Date ${response_body['createdAt']} Should Not Be Equal ... ${date} ... ${None} - ... The timestamp key contains a value (${value}) that it is not in DateTime format + ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format List @contexts [Arguments] ${details}=${EMPTY} ${kind}=${EMPTY} @@ -127,11 +134,11 @@ List @contexts IF '${kind}'!='' Set To Dictionary ${params} kind=${kind} - ${params_as_string}= Catenate SEPARATOR=& @{params} + ${string_list}= Evaluate [f'{key}={value}' for key, value in ${params}.items()] + ${params_as_string}= Evaluate '&'.join(${string_list}) ${response}= GET ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}?${params_as_string} - ... params=${params} ... expected_status=any END @@ -172,3 +179,34 @@ Check Context Response Body Containing a list with several URLs Should Be Equal ${response_body[${index}]} ${uri_context} END + +Check Cached @Contexts + [Arguments] ${filename} + + ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} + ${contexts}= Get From Dictionary ${entity_payload} @context + + &{params}= Create Dictionary + Set To Dictionary ${params} details=true + + FOR ${contextId} IN @{contexts} + ${response}= Serve a @context ${contextId} true + Check Response Kind set to ${response.json()} Cached + END + + Output ${response} List @contexts + +Check Context Detailed Information Keys + [Arguments] ${my_dict} + + # TODO: spec v1.8.1 timestamp -> createdAt + ${expected_keys}= Create List URL localId kind timestamp lastUsage numberOfHits extraInfo + ${actual_keys}= Get Dictionary Keys ${my_dict} + + FOR ${key} IN @{expected_keys} + Remove Values From List ${actual_keys} ${key} + END + + Should Be Empty + ... ${actual_keys} + ... msg=The @context detailed information contains keys not expected: ${actual_keys} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 841764fe..73949618 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -352,8 +352,8 @@ Check Response Reason set to Should Be Equal ${response_reason} ${reason} Check Response Kind set to - [Arguments] ${response_kind} ${kind} - Should Be Equal ${response_kind} ${kind} + [Arguments] ${response} ${kind} + Should Be Equal ${response['kind']} ${kind} Check RL Response Body Containing ProblemDetails Element Containing Type Element set to [Arguments] ${response_body} ${type} @@ -479,11 +479,7 @@ Check Dictionary Might Contain Additional Members ... int ... The Additonal Member ${key} contains a value (${value}) that it is not in Number format END - IF "${key}" == "extraInfo" - ${is_json}= Evaluate json.loads('''${value}''') if isinstance('''${value}''', str) else None - IF ${is_json} is not None Log Variable is a JSON object - IF ${is_json} is None Log Variable is not a JSON object - END + IF "${key}" == "extraInfo" Log Found "extraInfo" key ELSE Log The key '${key}' is not present in the dictionary END -- GitLab From 860b67bc333b8a77599babb1ef1662d41f1e5be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 21 Feb 2024 21:47:17 +0100 Subject: [PATCH 08/25] Review tags and adding error management --- .../Consumption/ListContexts/052_01.robot | 16 ++-- .../Consumption/ListContexts/052_02.robot | 20 ++--- .../Consumption/ListContexts/052_03.robot | 21 ++--- .../Consumption/ListContexts/052_04.robot | 10 +-- .../Consumption/ListContexts/052_05.robot | 80 +++++++++++++++++ .../Consumption/ServeContext/053_01.robot | 4 +- .../Consumption/ServeContext/053_02.robot | 4 +- .../Consumption/ServeContext/053_03.robot | 52 +++++++++++ .../Provision/AddContext/050_01.robot | 4 +- .../Provision/AddContext/050_02.robot | 3 +- .../Provision/AddContext/050_03.robot | 4 +- .../Provision/AddContext/050_04.robot | 4 +- .../Provision/DeleteContext/051_01.robot | 4 +- .../Provision/DeleteContext/051_02.robot | 5 +- .../Provision/DeleteContext/051_03.robot | 4 +- .../Provision/DeleteContext/051_04.robot | 62 +++++++++++++ .../ApiUtils/JSON-LD@ContextServer.resource | 86 +++++++++++++------ 17 files changed, 296 insertions(+), 87 deletions(-) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot index e4477ddc..3feb9d9d 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot @@ -18,28 +18,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_01_01 List @contexts with neither details or kind and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ${EMPTY} 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Hosted 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Cached 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ImplicitlyCreated 052_01_05 List @contexts with details equal to false and no kind and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ${EMPTY} 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Hosted 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Cached 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ImplicitlyCreated diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot index af5aa522..db1c3321 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot @@ -20,28 +20,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_02_01 List @contexts with neither details or kind and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ${EMPTY} 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Hosted 052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Cached 052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ImplicitlyCreated 052_02_05 List @contexts with details equal to false and no kind and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ${EMPTY} 052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Hosted 052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Cached 052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ImplicitlyCreated @@ -63,6 +63,4 @@ List @contexts with one previous created @context Check Context Response Body Containing a list with more than one URL ${response.json()} 2 ${uri} Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot index c9ba7ca3..9eff4160 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot @@ -22,28 +22,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_03_01 List @contexts with neither details or kind and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ${EMPTY} 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Hosted 052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} Cached 052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} ImplicitlyCreated 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ${EMPTY} 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Hosted 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false Cached 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 false ImplicitlyCreated @@ -83,8 +83,5 @@ List @contexts with several previous created @context Delete Initial @contexts FOR ${uri} IN @{uris} Log URI: ${uri} - - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot index 90147c24..0cab266b 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot @@ -18,19 +18,19 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_04_01 List @contexts with no details and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 ${EMPTY} other 052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 other ${EMPTY} 052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 other other 052_04_04 List @contexts with no details and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 true other 052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_3 other Hosted diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot new file mode 100644 index 00000000..6dc9b34c --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot @@ -0,0 +1,80 @@ +*** Settings *** +Documentation Check that you can list all the @context available in the broker with several add @contexts with details equal to true + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial set of @contexts +Test Teardown Delete Initial @contexts +Test Template List @contexts with several previous created @context + + +*** Variables *** +${first_filename}= @context-minimal-valid.json +${second_filename}= @context-minimal-second-valid.json +${third_filename}= @context-minimal-third-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND +052_03_05 List @contexts with details equal to false and no kind and with previously several add @context + [Tags] ctx-serve 5_13_3 + true ${EMPTY} +052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context + [Tags] ctx-serve 5_13_3 + true Hosted +052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context + [Tags] ctx-serve 5_13_3 + true Cached +052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context + [Tags] ctx-serve 5_13_3 + true ImplicitlyCreated + + +*** Keywords *** +Create Initial set of @contexts + ${response}= Add a new @context ${first_filename} + Check Response Status Code 201 ${response.status_code} + ${first_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${first_uri} + + ${response}= Add a new @context ${second_filename} + Check Response Status Code 201 ${response.status_code} + ${second_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${second_uri} + + ${response}= Add a new @context ${third_filename} + Check Response Status Code 201 ${response.status_code} + ${third_uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${third_uri} + + @{uris}= Create List + Append To List ${uris} ${first_uri} + Append To List ${uris} ${second_uri} + Append To List ${uris} ${third_uri} + Set Suite Variable ${uris} + +List @contexts with several previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} + + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + + # We need to check the list of responses + Check Context Response Body Containing a JSONObject with details of the @contexts + ... ${response.json()} + ... 4 + ... ${uris} + +Delete Initial @contexts + FOR ${uri} IN @{uris} + Log URI: ${uri} + Delete a @context ${uri} + END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot index 0bef8ca9..2192a9bd 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot @@ -46,6 +46,4 @@ Serve a @context with details Check Context Response Body Content ${filename} ${response.json()} Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot index 3e723a51..92b7ae65 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot @@ -52,6 +52,4 @@ Serve a @context with details equal to true Check Context Detailed Information Keys ${response.json()} Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot new file mode 100644 index 00000000..9116302f --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that you get an error when try to serve a @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context +Test Template Serve @context with no previous created @context + + +*** Variables *** +${filename}= @context-minimal-valid.json +${cached_id}= https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld +${reason_400}= Bad Request +${reason_404}= Not Found +${reason_422}= Unprocessable + + +*** Test Cases *** CONTEXTID DETAILS STATUSCODE REASON ERROR +052_04_01 Serve a @contexts with a wrong id and correct details + [Tags] ctx-serve 5_13_4 + wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} +052_04_02 Serve a @contexts with a valid id and incorrect details + [Tags] ctx-serve 5_13_4 + ${uri} other 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} +052_04_03 Serve a @contexts with a wrong id and correct details + [Tags] ctx-serve 5_13_4 + ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} + + +*** Keywords *** +Serve @context with no previous created @context + [Documentation] Check that an error is returned when we request for a @context that does not exist + [Arguments] ${contextid} ${details} ${statuscode} ${reason} ${error} + ${response}= Serve a @context ${contextid} ${details} + + Check Response Status Code ${statuscode} ${response.status_code} + Check Response Reason set to ${response.reason} ${reason} + Check Response Body Containing ProblemDetails Element ${response.json()} ${error} + +Create Initial @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Delete Initial @context + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot index 1f1c9a1c..f711a001 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot @@ -50,6 +50,4 @@ Add a valid @context Log URI: ${response_serve} Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot index b0b80439..70a3f4c7 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot @@ -42,6 +42,5 @@ Add @context scenarios Delete @context if it was created by error IF '${response.status_code}'!='400' ${uri}= Fetch Id From Response Location Header ${response.headers} - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} + Delete a @context ${uri} END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot index e0b2805a..94aa7476 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot @@ -25,9 +25,9 @@ ${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld *** Test Cases *** -050_03_01 Check +050_03_01 Check the creation of ImplicitelyCreted @context [Documentation] Check that you can create a subscription - [Tags] sub-create 5_8_1 + [Tags] sub-create 5_13_2 ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} Set Suite Variable ${subscription_id} ${response}= Create Subscription diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot index 077e5d8d..fe2b4de3 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot @@ -42,6 +42,4 @@ ${reason_204}= No Content *** Keywords *** Delete Initial @context - ${response_delete}= Delete a @context without reload ${uri} - Check Response Status Code 204 ${response_delete.status_code} - Check Response Reason set to ${response_delete.reason} ${reason_204} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot index 5968b108..c8211db3 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot @@ -18,9 +18,9 @@ ${reason_204}= No Content *** Test Cases *** 051_01_01 Delete a @context whose kind is hosted without reload param [Documentation] Check that you can delete a hosted @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_5 - ${response}= Delete a @context without reload ${uri} + ${response}= Delete a @context ${uri} Check Response Status Code 204 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot index 28a49c89..56929c59 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot @@ -9,17 +9,16 @@ Library Collections *** Variables *** -${filename}= @context-minimal-valid.json ${reason_404}= Not Found *** Test Cases *** 051_02_01 Delete a @context whose kind is hosted without reload param and unknown @context identifier [Documentation] Check that an error message is obtained in the response when we try to delete a @context without unknonwn id - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_5 ${random_url}= Generate Random String 16 [NUMBERS] - ${response}= Delete a @context without reload ${random_url} + ${response}= Delete a @context ${random_url} Check Response Status Code 404 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_404} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot index 1997b4b0..8bfa1091 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot @@ -18,9 +18,9 @@ ${reason_204}= No Content *** Test Cases *** 051_03_01 Delete a @context whose kind is hosted without reload param [Documentation] Check that you can delete a hosted @context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_5 - ${response}= Delete a @context without reload ${contextId} + ${response}= Delete a @context ${contextId} Check Response Status Code 204 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_204} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot new file mode 100644 index 00000000..23434ed8 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot @@ -0,0 +1,62 @@ +*** Settings *** +Documentation Check that you get an error when try to delete a @context + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Library Collections + +Test Setup Create Initial @context +Test Teardown Delete Initial @context +Test Template Delete a @context with wrong data + + +*** Variables *** +${filename}= @context-minimal-valid.json +${cached_id}= https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld +${reason_400}= Bad Request +${reason_404}= Not Found +${reason_422}= Unprocessable + + +*** Test Cases *** CONTEXTID RELOAD STATUSCODE REASON ERROR +052_04_01 Delete a @contexts with a wrong id and reload equal to true + [Tags] ctx-delete 5_13_5 + wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} +052_04_02 Delete a @contexts with a wrong id and reload equal to false + [Tags] ctx-delete 5_13_5 + wrong_id_context false 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} +052_04_03 Delete a @contexts with a wrong id and wrong reload value + [Tags] ctx-delete 5_13_5 + wrong_id_context ${EMPTY} 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} +052_04_04 Delete a @contexts with a wrong id and wrong reload value + [Tags] ctx-delete 5_13_5 + wrong_id_context xxx 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} +052_04_05 Delete a Hosted @contexts with a valid id and reload equal to true + [Tags] ctx-delete 5_13_5 + ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} +052_04_06 Delete a cached @contexts with reload false + [Tags] ctx-delete 5_13_5 + ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} +# TODO: Check the case of reload=true and Cached context -> error downloading the @context: LdContextNotAvailable + + +*** Keywords *** +Delete a @context with wrong data + [Documentation] Check that you can delete a hosted @context + [Arguments] ${contextid} ${reload} ${statuscode} ${reason} ${error} + ${response}= Delete a @context ${contextid} ${reload} + + Check Response Status Code ${statuscode} ${response.status_code} + Check Response Reason set to ${response.reason} ${reason} + Check Response Body Containing ProblemDetails Element ${response.json()} ${error} + +Create Initial @context + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Delete Initial @context + Delete a @context ${uri} diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index 570aecd2..72c3e6de 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -20,6 +20,8 @@ ${response} ${EMPTY} @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated +${ERROR_OPERATION_NOT_SUPPORTED} https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported + *** Keywords *** Add a new @context @@ -57,27 +59,24 @@ Serve a @context Output ${response} Serve a @context RETURN ${response} -Delete a @context without reload - [Arguments] ${contextId} - - ${response}= DELETE - ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} - ... expected_status=any +Delete a @context + [Arguments] ${contextId} ${reload}=${EMPTY} - Output ${response} Delete a @context without reload - RETURN ${response} - -Delete a @context with reload - [Arguments] ${contextId} ${reload} - - @{params}= Create List - Append To List ${params} reload=${reload} + IF '${reload}'!='' + &{params}= Create Dictionary + Set To Dictionary ${params} reload=${reload} - ${response}= DELETE - ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId}?${params} - ... expected_status=any + ${response}= DELETE + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... params=${params} + ... expected_status=any + ELSE + ${response}= DELETE + ... url=${url}/${JSONLDCONTEXTS_ENDPOINT_PATH}/${contextId} + ... expected_status=any + END - Output ${response} Delete a @context with reload + Output ${response} Delete a @context RETURN ${response} Check Context Response Body Content @@ -104,19 +103,18 @@ Check Context Response Body Containing Detailed Information Should Be Equal ${response_body['kind']} ${context_type} # TODO: v1.8.1 change timestamp -> createdAt - # Should Not Be Empty ${response_body['timestamp']} - # ${value}= Evaluate response_body.get('timestamp') - # ${date}= Parse Ngsild Date ${response_body}['timestamp'] - # Should Not Be Equal - # ... ${date} - # ... ${None} - # ... The timestamp key contains a value (${value}) that it is not in DateTime format - Should Not Be Empty ${response_body['createdAt']} - ${date}= Parse Ngsild Date ${response_body['createdAt']} + Should Not Be Empty ${response_body['timestamp']} + ${date}= Parse Ngsild Date ${response_body['timestamp']} Should Not Be Equal ... ${date} ... ${None} - ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format + ... The createdAt key contains a value (${response_body['timestamp']}) that it is not in DateTime format +# Should Not Be Empty ${response_body['createdAt']} +# ${date}= Parse Ngsild Date ${response_body['createdAt']} +# Should Not Be Equal +# ... ${date} +# ... ${None} +# ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format List @contexts [Arguments] ${details}=${EMPTY} ${kind}=${EMPTY} @@ -210,3 +208,35 @@ Check Context Detailed Information Keys Should Be Empty ... ${actual_keys} ... msg=The @context detailed information contains keys not expected: ${actual_keys} + +Check Context Response Body Containing a JSONObject with details of the @contexts + [Arguments] ${response} ${expected_length} ${list_contexts} + + ${obtained_length}= Get Length ${response} + Length Should Be + ... ${response} + ... ${expected_length} + ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} + + FOR ${index} ${item} IN ENUMERATE @{response} + # Log ${index} ${item} + + ${URL}= Get From Dictionary ${item} URL + IF '${URL}'=='https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' + ${context_kind}= Set Variable Cached + ELSE + ${context_kind}= Set Variable Hosted + END + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${item} ${context_kind} + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${item} lastUsage + Check Dictionary Might Contain Additional Members ${item} numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${item} + END + + Log Por aquir -- GitLab From b300df110ce075238e6ee3e6fe241ce5388c195d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 22 Feb 2024 10:22:45 +0100 Subject: [PATCH 09/25] Management of kind parameters with Hosted and Cached @contexts --- .../Consumption/ListContexts/052_01.robot | 22 +++++------ .../Consumption/ListContexts/052_02.robot | 32 +++++++++------- .../Consumption/ListContexts/052_03.robot | 38 ++++++++++--------- .../Consumption/ListContexts/052_05.robot | 14 +++---- .../Provision/DeleteContext/051_04.robot | 4 +- .../ApiUtils/JSON-LD@ContextServer.resource | 38 +++++++++++++------ 6 files changed, 86 insertions(+), 62 deletions(-) diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot index 3feb9d9d..365258ed 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot @@ -16,39 +16,39 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND +*** Test Cases *** DETAILS KIND COUNT 052_01_01 List @contexts with neither details or kind and not previously created @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ${EMPTY} + ${EMPTY} ${EMPTY} 1 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Hosted + ${EMPTY} Hosted 0 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Cached + ${EMPTY} Cached 1 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ImplicitlyCreated + ${EMPTY} ImplicitlyCreated 0 052_01_05 List @contexts with details equal to false and no kind and not previously created @context [Tags] ctx-serve 5_13_3 - false ${EMPTY} + false ${EMPTY} 1 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context [Tags] ctx-serve 5_13_3 - false Hosted + false Hosted 0 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context [Tags] ctx-serve 5_13_3 - false Cached + false Cached 1 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context [Tags] ctx-serve 5_13_3 - false ImplicitlyCreated + false ImplicitlyCreated 0 *** Keywords *** List @contexts with no previous created @context [Documentation] Check that you can list @contexts - [Arguments] ${details} ${kind} + [Arguments] ${details} ${kind} ${count} ${response}= List @contexts ${details} ${kind} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} - Check Context Response Body Containing a list with one URL equal to default @context ${response.json()} + Check Context Response Body Containing a list of identifiers ${response.json()} ${count} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot index db1c3321..9a66529b 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot @@ -18,31 +18,31 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND +*** Test Cases *** DETAILS KIND COUNT 052_02_01 List @contexts with neither details or kind and with previously one add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ${EMPTY} + ${EMPTY} ${EMPTY} 2 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Hosted + ${EMPTY} Hosted 1 052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Cached + ${EMPTY} Cached 1 052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ImplicitlyCreated + ${EMPTY} ImplicitlyCreated 0 052_02_05 List @contexts with details equal to false and no kind and with previously one add @context [Tags] ctx-serve 5_13_3 - false ${EMPTY} + false ${EMPTY} 2 052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context [Tags] ctx-serve 5_13_3 - false Hosted + false Hosted 1 052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context [Tags] ctx-serve 5_13_3 - false Cached + false Cached 1 052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context [Tags] ctx-serve 5_13_3 - false ImplicitlyCreated + false ImplicitlyCreated 0 *** Keywords *** @@ -50,17 +50,23 @@ Create Initial @context ${response}= Add a new @context ${first_filename} Check Response Status Code 201 ${response.status_code} ${uri}= Fetch Id From Response Location Header ${response.headers} - Set Suite Variable ${uri} + @{uri_list}= Create List + Append To List ${uri_list} ${uri} + Set Suite Variable ${uri_list} List @contexts with one previous created @context [Documentation] Check that you can list @contexts - [Arguments] ${details} ${kind} + [Arguments] ${details} ${kind} ${count} ${response}= List @contexts ${details} ${kind} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} - Check Context Response Body Containing a list with more than one URL ${response.json()} 2 ${uri} + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${count} + ... ${uri_list} + ... ${kind} Delete Initial @context - Delete a @context ${uri} + Delete a @context ${uri_list[0]} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot index 9eff4160..f8620041 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot @@ -20,31 +20,31 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND +*** Test Cases *** DETAILS KIND COUNT 052_03_01 List @contexts with neither details or kind and with previously several add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ${EMPTY} + ${EMPTY} ${EMPTY} 4 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Hosted + ${EMPTY} Hosted 3 052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} Cached + ${EMPTY} Cached 1 052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_3 - ${EMPTY} ImplicitlyCreated + ${EMPTY} ImplicitlyCreated 0 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context [Tags] ctx-serve 5_13_3 - false ${EMPTY} + false ${EMPTY} 4 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_3 - false Hosted + false Hosted 3 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context [Tags] ctx-serve 5_13_3 - false Cached + false Cached 1 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_3 - false ImplicitlyCreated + false ImplicitlyCreated 0 *** Keywords *** @@ -64,24 +64,28 @@ Create Initial set of @contexts ${third_uri}= Fetch Id From Response Location Header ${response.headers} Set Suite Variable ${third_uri} - @{uris}= Create List - Append To List ${uris} ${first_uri} - Append To List ${uris} ${second_uri} - Append To List ${uris} ${third_uri} - Set Suite Variable ${uris} + @{uri_list}= Create List + Append To List ${uri_list} ${first_uri} + Append To List ${uri_list} ${second_uri} + Append To List ${uri_list} ${third_uri} + Set Suite Variable ${uri_list} List @contexts with several previous created @context [Documentation] Check that you can list @contexts - [Arguments] ${details} ${kind} + [Arguments] ${details} ${kind} ${count} ${response}= List @contexts ${details} ${kind} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} - Check Context Response Body Containing a list with several URLs ${response.json()} 4 ${uris} + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${count} + ... ${uri_list} + ... ${kind} Delete Initial @contexts - FOR ${uri} IN @{uris} + FOR ${uri} IN @{uri_list} Log URI: ${uri} Delete a @context ${uri} END diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot index 6dc9b34c..71073b65 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot @@ -20,19 +20,19 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND +*** Test Cases *** DETAILS KIND COUNT 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context [Tags] ctx-serve 5_13_3 - true ${EMPTY} + true ${EMPTY} 4 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_3 - true Hosted + true Hosted 3 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context [Tags] ctx-serve 5_13_3 - true Cached + true Cached 1 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_3 - true ImplicitlyCreated + true ImplicitlyCreated 0 *** Keywords *** @@ -60,7 +60,7 @@ Create Initial set of @contexts List @contexts with several previous created @context [Documentation] Check that you can list @contexts - [Arguments] ${details} ${kind} + [Arguments] ${details} ${kind} ${count} ${response}= List @contexts ${details} ${kind} @@ -70,7 +70,7 @@ List @contexts with several previous created @context # We need to check the list of responses Check Context Response Body Containing a JSONObject with details of the @contexts ... ${response.json()} - ... 4 + ... ${count} ... ${uris} Delete Initial @contexts diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot index 23434ed8..722c966f 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot @@ -36,9 +36,7 @@ ${reason_422}= Unprocessable 052_04_05 Delete a Hosted @contexts with a valid id and reload equal to true [Tags] ctx-delete 5_13_5 ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} -052_04_06 Delete a cached @contexts with reload false - [Tags] ctx-delete 5_13_5 - ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} +# TODO: reload=true and Implicitily created @context # TODO: Check the case of reload=true and Cached context -> error downloading the @context: LdContextNotAvailable diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index 72c3e6de..919cce5d 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -143,23 +143,39 @@ List @contexts Output ${response} List @contexts RETURN ${response} -Check Context Response Body Containing a list with one URL equal to default @context - [Arguments] ${response_body} - - Length Should Be ${response_body} 1 msg=The length of the strings array of @contexts is not 1 - - Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} - -Check Context Response Body Containing a list with more than one URL - [Arguments] ${response_body} ${expected_length} ${the_other_context} +Check Context Response Body Containing a list of identifiers + [Arguments] ${response_body} ${expected_length} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} + # TODO: ${CORE_@CONTEXT} should come from configuration Length Should Be ... ${response_body} ... ${expected_length} ... msg=The length of the strings array of @contexts is not ${expected_length} - Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} - Should Be Equal ${response_body[1]} ${the_other_context} + IF ${expected_length}==0 + Should Be Empty ${response_body} + ELSE + IF ${expected_length}==1 + ${length_list_contexts}= Get Length ${list_contexts} + IF '${kind}' == 'Cached' or ${length_list_contexts} == 0 + Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + ELSE + Should Be Equal ${response_body[0]} ${list_contexts[0]} + END + ELSE + IF ${expected_length}>1 + IF '${kind}' == '' + Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + ELSE + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + # Log URI: ${uri_context} index: ${index} + # ${index}= Evaluate ${index} + 1 + Should Be Equal ${response_body[${index}]} ${uri_context} + END + END + END + END + END Check Context Response Body Containing a list with several URLs [Arguments] ${response_body} ${expected_length} ${list_contexts} -- GitLab From 79046d6959609363665cd38ff999a164a3789fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 22 Feb 2024 20:14:10 +0100 Subject: [PATCH 10/25] Adding LdContextNotAvailable testing over Cached @context and reload=true --- .../Consumption/ListContexts/052_01.robot | 4 -- .../Consumption/ListContexts/052_02.robot | 3 - .../Consumption/ListContexts/052_03.robot | 3 - .../Consumption/ListContexts/052_04.robot | 4 -- .../Consumption/ListContexts/052_05.robot | 11 ++-- .../Consumption/ServeContext/053_01.robot | 3 - .../Consumption/ServeContext/053_02.robot | 3 - .../Consumption/ServeContext/053_03.robot | 5 +- .../Consumption/ServeContext/053_04.robot | 49 +++++++++++++++ .../Provision/AddContext/050_01.robot | 2 - .../Provision/AddContext/050_02.robot | 1 - .../Provision/AddContext/050_04.robot | 2 - .../Provision/DeleteContext/051_01.robot | 3 - .../Provision/DeleteContext/051_02.robot | 4 -- .../Provision/DeleteContext/051_03.robot | 3 - .../Provision/DeleteContext/051_04.robot | 3 - .../Provision/DeleteContext/051_05.robot | 62 +++++++++++++++++++ .../minimal-entity-using-@context.jsonld | 10 +++ .../ContextInformationProvision.resource | 13 ++++ .../ApiUtils/JSON-LD@ContextServer.resource | 19 +++++- resources/ContextServerUtils.resource | 26 ++++++++ 21 files changed, 182 insertions(+), 51 deletions(-) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot create mode 100644 data/jsonldContext/minimal-entity-using-@context.jsonld create mode 100644 resources/ContextServerUtils.resource diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot index 365258ed..66184afb 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot @@ -2,10 +2,6 @@ Documentation Check that you can list all the @context available in the broker with no previous add @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Template List @contexts with no previous created @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot index 9a66529b..c764b19a 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot @@ -2,10 +2,7 @@ Documentation Check that you can list all the @context available in the broker with one add @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot index f8620041..d0b6a690 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot @@ -2,10 +2,7 @@ Documentation Check that you can list all the @context available in the broker with several add @contexts Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial set of @contexts Test Teardown Delete Initial @contexts diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot index 0cab266b..45478b76 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot @@ -2,10 +2,6 @@ Documentation Check that you get an error when try to list @context with wrong details or kind Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Template List @contexts with no previous created @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot index 71073b65..77f58b01 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot @@ -2,10 +2,7 @@ Documentation Check that you can list all the @context available in the broker with several add @contexts with details equal to true Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial set of @contexts Test Teardown Delete Initial @contexts @@ -21,16 +18,16 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT -052_03_05 List @contexts with details equal to false and no kind and with previously several add @context +052_05_01 List @contexts with details equal to false and no kind and with previously several add @context [Tags] ctx-serve 5_13_3 true ${EMPTY} 4 -052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context +052_05_02 List @contexts with details equal to false and kind equal to hosted and with previously several add @context [Tags] ctx-serve 5_13_3 true Hosted 3 -052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context +052_05_03 List @contexts with details equal to false and kind equal to cached abd with previously several add @context [Tags] ctx-serve 5_13_3 true Cached 1 -052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context +052_05_04 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context [Tags] ctx-serve 5_13_3 true ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot index 2192a9bd..3b7b1a70 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot @@ -2,10 +2,7 @@ Documentation Check that you can serve a previous created @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot index 92b7ae65..8884bdea 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot @@ -2,10 +2,7 @@ Documentation Check that you can serve a previous created @context with details equal to True Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot index 9116302f..b7b06a1c 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot @@ -2,10 +2,7 @@ Documentation Check that you get an error when try to serve a @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context @@ -17,7 +14,7 @@ ${filename}= @context-minimal-valid.json ${cached_id}= https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld ${reason_400}= Bad Request ${reason_404}= Not Found -${reason_422}= Unprocessable +${reason_422}= Unprocessable Content *** Test Cases *** CONTEXTID DETAILS STATUSCODE REASON ERROR diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot new file mode 100644 index 00000000..6ee18f76 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot @@ -0,0 +1,49 @@ +*** Settings *** +Documentation Check that you can get an increase numberOfHits after creation of a @context and using it + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Setup Create Initial @context condition +Test Teardown Delete Initial @context condition + + +*** Variables *** +${filename}= @context-minimal-valid.json +${entityfile}= minimal-entity-using-@context.jsonld +${entity_context_id}= urn:ngsi-ld:Building:randomUUID + + +*** Test Cases *** +053_04_01 Check that the numberOfHits is increased after using a context + [Documentation] Check that you can delete a hosted @context + [Tags] ctx-serve 5_13_5 + + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 1 + + Create Entity selecting @context ${entityfile} ${uri} + + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 2 + + +*** Keywords *** +Create Initial @context condition + ${response}= Add a new @context ${filename} + Check Response Status Code 201 ${response.status_code} + ${uri}= Fetch Id From Response Location Header ${response.headers} + Set Suite Variable ${uri} + +Delete Initial @context condition + Delete Entity by Id ${entity_context_id} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot index f711a001..7d73028a 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot @@ -2,8 +2,6 @@ Documentation Check that you can add a hosted @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot index 70a3f4c7..8375b8e8 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot @@ -2,7 +2,6 @@ Documentation Check that you receive a 400 Bad Request creating a @context if the content is incorrect Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete @context if it was created by error diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot index fe2b4de3..b4ddeaf3 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot @@ -2,8 +2,6 @@ Documentation Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot index c8211db3..0214d88f 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot @@ -2,10 +2,7 @@ Documentation Check that you can delete a previous created hosted @context without reload param Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial hosted @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot index 56929c59..1ff37031 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot @@ -2,10 +2,6 @@ Documentation Check that you get an error when trying to delete an unknown @context identifier Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections *** Variables *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot index 8bfa1091..c8d80d39 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot @@ -2,10 +2,7 @@ Documentation Check that you can delete a previous created cached @context without reload param Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial cached @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot index 722c966f..69e42c5e 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot @@ -2,10 +2,7 @@ Documentation Check that you get an error when try to delete a @context Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Library Collections Test Setup Create Initial @context Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot new file mode 100644 index 00000000..d13b1455 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot @@ -0,0 +1,62 @@ +*** Settings *** +Documentation Check that you get an error if we created an entity with a context (Cached context) and we try to delete it with reload=true + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/ContextServerUtils.resource +Library Collections +Library String +Variables ${EXECDIR}/resources/variables.py +Library HttpCtrl.Client +Library HttpCtrl.Server + +Test Setup Create Initial @context condition +Test Teardown Delete Initial @context condition + + +*** Variables *** +${filename}= @context-minimal-valid.json +${entityfile}= minimal-entity-using-@context.jsonld +${entity_context_id}= urn:ngsi-ld:Testing:randomUUID +${uri} /api/v1/context.jsonld + + +*** Test Cases *** +051_05_01 Deleta and Reload a Cached @context with no communication with the Context Server + [Documentation] Check that you get an error if we try to reload a cached context with no communicatino with the context server + [Tags] ctx-serve 5_13_5 + + ${response}= Delete a @context ${uri} true + + Check Response Status Code 503 ${response.status_code} + Check Response Reason set to ${response.reason} Service Unavailable + Check Response Body Containing ProblemDetails Element + ... ${response.json()} + ... ${ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE} + + +*** Keywords *** +Create Initial @context condition + Start @context Local Server + + ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + Set Global Variable ${uri} + + Create Entity selecting @context ${entityfile} ${uri} + + Log Waiting 3 seconds to continue... + Sleep 3s + + ${response}= Serve a @context ${uri} true + Check Response Status Code 200 ${response.status_code} + Check Context Response Kind ${response.json()} Cached + + Stop @context Local Server + +Delete Initial @context condition + Log Delete initial contidions + Delete Entity by Id ${entity_context_id} + Delete a @context ${uri} diff --git a/data/jsonldContext/minimal-entity-using-@context.jsonld b/data/jsonldContext/minimal-entity-using-@context.jsonld new file mode 100644 index 00000000..143e7e33 --- /dev/null +++ b/data/jsonldContext/minimal-entity-using-@context.jsonld @@ -0,0 +1,10 @@ +{ + "id": "urn:ngsi-ld:Testing:randomUUID", + "type": "Testing", + "A1": "value of A1", + "A2": "value of A2", + "A3": "value of A3", + "@context": [ + "ContextURI" + ] +} \ No newline at end of file diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index 86ae6461..d85c5543 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -146,6 +146,19 @@ Create Entity Output ${response} Create Entity RETURN ${response} +Create Entity selecting @context + [Arguments] ${filename} ${context} + ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} + ${entity}= Update Value To JSON ${entity_payload} $..@context ${context} + &{headers}= Create Dictionary Content-Type=application/ld+json + ${response}= POST + ... url=${url}/${ENTITIES_ENDPOINT_PATH} + ... json=${entity} + ... headers=${headers} + ... expected_status=any + Output ${response} Create Entity selecting @context + RETURN ${response} + Create Entity Selecting Content Type [Arguments] ${filename} ${entity_id} ${content_type} ${context}=${EMPTY} ${accept}=${EMPTY} ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/${filename} diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/JSON-LD@ContextServer.resource index 919cce5d..acf18ea3 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/JSON-LD@ContextServer.resource @@ -116,6 +116,23 @@ Check Context Response Body Containing Detailed Information # ... ${None} # ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format +Check Context Response Body Containing numberOfHits value + [Arguments] ${response_body} ${expected_number_of_hists} + + ${value}= Evaluate $response_body.get('numberOfHits') + + IF '${value}' != '' and '${value}' != 'None' + Log Expected number of hits: ${expected_number_of_hists} + Log Received number of hits: ${response_body['numberOfHits']} + + Should Be Equal As Numbers ${response_body['numberOfHits']} ${expected_number_of_hists} + END + +Check Context Response Kind + [Arguments] ${response_body} ${context_type} + + Should Be Equal ${response_body['kind']} ${context_type} + List @contexts [Arguments] ${details}=${EMPTY} ${kind}=${EMPTY} @@ -168,8 +185,6 @@ Check Context Response Body Containing a list of identifiers Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} ELSE FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} - # Log URI: ${uri_context} index: ${index} - # ${index}= Evaluate ${index} + 1 Should Be Equal ${response_body[${index}]} ${uri_context} END END diff --git a/resources/ContextServerUtils.resource b/resources/ContextServerUtils.resource new file mode 100644 index 00000000..86b421e8 --- /dev/null +++ b/resources/ContextServerUtils.resource @@ -0,0 +1,26 @@ +*** Settings *** +Documentation Create a mock server to response to the Context Broker with the corresponding @context + +Variables ${EXECDIR}/resources/variables.py +Library HttpCtrl.Server +Library OperatingSystem + + +*** Variables *** +${filename}= @context-minimal-valid.json + + +*** Keywords *** +Start @context Local Server + [Arguments] ${host}=${context_source_host} ${port}=${context_source_port} + + # Initialize HTTP Server + Start Server ${host} ${port} + + ${payload}= Get File ${EXECDIR}/data/jsonldContext/${filename} + + Set Stub Reply GET /api/v1/context.jsonld 200 ${payload} + +Stop @context Local Server + # Terminate HTTP Server + Stop Server -- GitLab From ef6dd4d11b7eaab1d605eade35aa40299cfa9105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 22 Feb 2024 21:50:44 +0100 Subject: [PATCH 11/25] Check the increase of numberOfHits with Cached @contexts --- .../Consumption/ServeContext/053_04.robot | 20 ++--- .../Consumption/ServeContext/053_05.robot | 76 +++++++++++++++++++ .../Consumption/ServeContext/053_06.robot | 69 +++++++++++++++++ .../ContextInformationProvision.resource | 7 +- 4 files changed, 161 insertions(+), 11 deletions(-) create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot create mode 100644 TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot index 6ee18f76..1736ab48 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you can get an increase numberOfHits after creation of a @context and using it +Documentation Check that you can get an increase numberOfHits after creation of a Hosted @context and using it Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -16,17 +16,10 @@ ${entity_context_id}= urn:ngsi-ld:Building:randomUUID *** Test Cases *** -053_04_01 Check that the numberOfHits is increased after using a context - [Documentation] Check that you can delete a hosted @context +053_04_01 Check that the numberOfHits is increased after using a Hosted context + [Documentation] Check that the numberOfHits is increased after using a Hosted context [Tags] ctx-serve 5_13_5 - ${response}= Serve a @context - ... contextId=${uri} - ... details=true - - Check Response Status Code 200 ${response.status_code} - Check Context Response Body Containing numberOfHits value ${response.json()} 1 - Create Entity selecting @context ${entityfile} ${uri} ${response}= Serve a @context @@ -44,6 +37,13 @@ Create Initial @context condition ${uri}= Fetch Id From Response Location Header ${response.headers} Set Suite Variable ${uri} + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 1 + Delete Initial @context condition Delete Entity by Id ${entity_context_id} Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot new file mode 100644 index 00000000..2f56182c --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot @@ -0,0 +1,76 @@ +*** Settings *** +Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/ContextServerUtils.resource +Library Collections +Library String +Variables ${EXECDIR}/resources/variables.py +Library HttpCtrl.Client +Library HttpCtrl.Server + +Test Setup Create Initial @context condition +Test Teardown Delete Initial @context condition + + +*** Variables *** +${filename}= @context-minimal-valid.json +${entityfile}= minimal-entity-using-@context.jsonld +${entity_context_id}= urn:ngsi-ld:Testing:randomUUID +${uri} /api/v1/context.jsonld +${reason_200}= OK + + +*** Test Cases *** +053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true + [Documentation] Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true + [Tags] ctx-serve 5_13_5 + + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response.json()} Cached + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response.json()} lastUsage + Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${response.json()} + + +*** Keywords *** +Create Initial @context condition + Start @context Local Server + + ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + Set Global Variable ${uri} + + Create Entity selecting @context ${entityfile} ${uri} + + Log Waiting 3 seconds to continue... + Sleep 3s + + ${response}= Serve a @context ${uri} true + Check Response Status Code 200 ${response.status_code} + Check Context Response Kind ${response.json()} Cached + + Stop @context Local Server + + ${response}= Delete a @context ${uri} true + Check Response Status Code 503 ${response.status_code} + +Delete Initial @context condition + Log Delete initial contidions + Delete Entity by Id ${entity_context_id} + Delete a @context ${uri} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot new file mode 100644 index 00000000..be00bd31 --- /dev/null +++ b/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot @@ -0,0 +1,69 @@ +*** Settings *** +Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true + +Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/ContextServerUtils.resource +Library Collections +Library String +Variables ${EXECDIR}/resources/variables.py +Library HttpCtrl.Client +Library HttpCtrl.Server + +Test Setup Create Initial @context condition +Test Teardown Delete Initial @context condition + + +*** Variables *** +${filename}= @context-minimal-valid.json +${entityfile}= minimal-entity-using-@context.jsonld +${uri} /api/v1/context.jsonld +${reason_200}= OK +${testing_id_prefix}= urn:ngsi-ld:Testing: + + +*** Test Cases *** +053_06_01 Check that the numberOfHits is increased after using a Cached context + [Documentation] Check that the numberOfHits is increased after using a Cached context + [Tags] ctx-serve 5_13_5 + + ${second_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} + Set Global Variable ${first_existing_entity_id} + + Create Entity selecting @context ${entityfile} ${uri} ${second_existing_entity_id} + + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 2 + + +*** Keywords *** +Create Initial @context condition + Start @context Local Server + + ${first_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} + Set Global Variable ${first_existing_entity_id} + + ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + Set Global Variable ${uri} + + Create Entity selecting @context ${entityfile} ${uri} ${first_existing_entity_id} + + ${response}= Serve a @context + ... contextId=${uri} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 1 + +Delete Initial @context condition + Log Delete initial contidions + Delete Entity by Id ${first_existing_entity_id} + Delete a @context ${uri} + Stop @context Local Server diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index d85c5543..8a32ca2e 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -147,9 +147,14 @@ Create Entity RETURN ${response} Create Entity selecting @context - [Arguments] ${filename} ${context} + [Arguments] ${filename} ${context} ${entity_id}=${EMPTY} ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} ${entity}= Update Value To JSON ${entity_payload} $..@context ${context} + + IF '${entity_id}'!='' + ${entity}= Update Value To JSON ${entity} $..id ${entity_id} + END + &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST ... url=${url}/${ENTITIES_ENDPOINT_PATH} -- GitLab From 9ebf67436b9a67ee4e9ae029a1401293382a1141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Mon, 26 Feb 2024 21:21:53 +0100 Subject: [PATCH 12/25] Adding documentation and check backward the documentation with the new processes --- .../jsonldContext_Consumption_Unit_Tests.xml | 18 ++ .../jsonldContext_Provision_Unit_Tests.xml | 18 ++ .../Entity/QueryEntities/019_01_01.robot | 6 +- .../AppendEntityAttributes/010_01.robot | 4 +- .../AppendEntityAttributes/010_04.robot | 21 +-- .../DeleteEntityAttribute/013_01.robot | 5 +- .../PartialAttributeUpdate/012_01.robot | 5 +- .../UpdateEntityAttributes/011_01.robot | 5 +- .../008_01.robot | 6 +- .../AddAttributes/014_01.robot | 6 +- .../DeleteAttribute/015_01.robot | 6 +- .../DeleteAttributeInstance/017_01.robot | 6 +- .../UpdateSubscription/029_06.robot | 5 +- .../039_01.robot | 4 +- .../Consumption/ListContexts/052_01.robot | 22 +-- .../Consumption/ListContexts/052_02.robot | 26 +-- .../Consumption/ListContexts/052_03.robot | 26 +-- .../Consumption/ListContexts/052_04.robot | 12 +- .../Consumption/ListContexts/052_05.robot | 16 +- .../Consumption/ServeContext/053_01.robot | 2 +- .../Consumption/ServeContext/053_02.robot | 2 +- .../Consumption/ServeContext/053_03.robot | 8 +- .../Consumption/ServeContext/053_04.robot | 2 +- .../Consumption/ServeContext/053_05.robot | 2 +- .../Consumption/ServeContext/053_06.robot | 2 +- .../Provision/AddContext/050_01.robot | 2 +- .../Provision/AddContext/050_02.robot | 2 +- .../Provision/AddContext/050_03.robot | 0 .../Provision/AddContext/050_04.robot | 2 +- .../Provision/DeleteContext/051_01.robot | 2 +- .../Provision/DeleteContext/051_02.robot | 2 +- .../Provision/DeleteContext/051_03.robot | 2 +- .../Provision/DeleteContext/051_04.robot | 12 +- .../Provision/DeleteContext/051_05.robot | 2 +- doc/analysis/checks.py | 161 +++++++++++++++++- doc/analysis/generaterobotdata.py | 5 + doc/analysis/initial_setup.py | 16 ++ doc/analysis/parserobotfile.py | 56 ++++-- doc/analysis/requests.py | 64 ++++++- .../Consumption/019_01_01.json | 2 +- .../Consumption/019_01_02.json | 2 +- .../Consumption/019_01_03.json | 2 +- .../Consumption/019_01_04.json | 2 +- .../Consumption/019_01_05.json | 2 +- .../Consumption/019_02_01.json | 2 +- .../Consumption/019_02_02.json | 2 +- .../Consumption/019_02_03.json | 2 +- .../Consumption/019_02_04.json | 2 +- .../Consumption/019_02_05.json | 2 +- .../Consumption/019_04.json | 2 +- .../Consumption/019_05.json | 2 +- .../ContextInformation/Provision/008_01.json | 2 +- .../ContextInformation/Provision/010_01.json | 4 +- .../ContextInformation/Provision/010_04.json | 4 +- .../ContextInformation/Provision/011_01.json | 6 +- .../ContextInformation/Provision/012_01.json | 4 +- .../ContextInformation/Provision/013_01.json | 6 +- .../ContextInformation/Provision/014_01.json | 2 +- .../ContextInformation/Provision/015_01.json | 6 +- .../ContextInformation/Provision/016_01.json | 2 +- .../ContextInformation/Provision/017_01.json | 2 +- .../Subscription/029_06.json | 2 +- .../RegistrationSubscription/038_01.json | 2 +- .../RegistrationSubscription/038_02.json | 2 +- .../RegistrationSubscription/039_01.json | 2 +- .../RegistrationSubscription/047_11.json | 4 +- .../RegistrationSubscription/047_16.json | 10 +- .../Consumption/052_01.json | 149 ++++++++++++++++ .../Consumption/052_02.json | 151 ++++++++++++++++ .../Consumption/052_03.json | 151 ++++++++++++++++ .../Consumption/052_04.json | 100 +++++++++++ .../Consumption/052_05.json | 87 ++++++++++ .../Consumption/053_01.json | 52 ++++++ .../Consumption/053_02.json | 36 ++++ .../Consumption/053_03.json | 71 ++++++++ .../Consumption/053_04.json | 35 ++++ .../Consumption/053_05.json | 35 ++++ .../Consumption/053_06.json | 35 ++++ .../Provision/050_01.json | 53 ++++++ .../Provision/050_02.json | 53 ++++++ .../Provision/050_03.json | 35 ++++ .../Provision/050_04.json | 34 ++++ .../Provision/051_01.json | 34 ++++ .../Provision/051_02.json | 32 ++++ .../Provision/051_03.json | 34 ++++ .../Provision/051_04.json | 103 +++++++++++ .../Provision/051_05.json | 35 ++++ doc/tests/test_jsonldContext_Consumption.py | 120 +++++++++++++ doc/tests/test_jsonldContext_Provision.py | 106 ++++++++++++ ...Server.resource => jsonldContext.resource} | 1 + 90 files changed, 2022 insertions(+), 167 deletions(-) create mode 100644 .idea/runConfigurations/jsonldContext_Consumption_Unit_Tests.xml create mode 100644 .idea/runConfigurations/jsonldContext_Provision_Unit_Tests.xml rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ListContexts/052_01.robot (82%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ListContexts/052_02.robot (83%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ListContexts/052_03.robot (87%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ListContexts/052_04.robot (85%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ListContexts/052_05.robot (90%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_01.robot (94%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_02.robot (96%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_03.robot (87%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_04.robot (95%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_05.robot (97%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Consumption/ServeContext/053_06.robot (97%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/AddContext/050_01.robot (95%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/AddContext/050_02.robot (95%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/AddContext/050_03.robot (100%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/AddContext/050_04.robot (94%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/DeleteContext/051_01.robot (92%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/DeleteContext/051_02.robot (91%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/DeleteContext/051_03.robot (94%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/DeleteContext/051_04.robot (84%) rename TP/NGSI-LD/{JSON-LD@contextServer => jsonldContext}/Provision/DeleteContext/051_05.robot (96%) create mode 100644 doc/files/JSON-LD@contextServer/Consumption/052_01.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/052_02.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/052_03.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/052_04.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/052_05.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_01.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_02.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_03.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_04.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_05.json create mode 100644 doc/files/JSON-LD@contextServer/Consumption/053_06.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/050_01.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/050_02.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/050_03.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/050_04.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/051_01.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/051_02.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/051_03.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/051_04.json create mode 100644 doc/files/JSON-LD@contextServer/Provision/051_05.json create mode 100644 doc/tests/test_jsonldContext_Consumption.py create mode 100644 doc/tests/test_jsonldContext_Provision.py rename resources/ApiUtils/{JSON-LD@ContextServer.resource => jsonldContext.resource} (99%) diff --git a/.idea/runConfigurations/jsonldContext_Consumption_Unit_Tests.xml b/.idea/runConfigurations/jsonldContext_Consumption_Unit_Tests.xml new file mode 100644 index 00000000..e4904242 --- /dev/null +++ b/.idea/runConfigurations/jsonldContext_Consumption_Unit_Tests.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/jsonldContext_Provision_Unit_Tests.xml b/.idea/runConfigurations/jsonldContext_Provision_Unit_Tests.xml new file mode 100644 index 00000000..febd49d5 --- /dev/null +++ b/.idea/runConfigurations/jsonldContext_Provision_Unit_Tests.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot index 20aaf6e6..61877562 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot @@ -49,9 +49,9 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building ... entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Entity Elements - ... ${expectation_filename} - ... ${entities_ids_to_be_compared} - ... ${response.json()} + ... expectation_filename=${expectation_filename} + ... entities_ids=${entities_ids_to_be_compared} + ... response_body=${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot index c4192926..961ad2e0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot @@ -35,7 +35,9 @@ Append Attributes Without Params ... id=${entity_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} + Check Updated Resource Set To + ... updated_resource=${entity_expectation_payload} + ... response_body=${response1.json()} Create Initial Entity ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot index 80ebd709..81329392 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot @@ -16,38 +16,35 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid-sample.jsonld -*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_RESPONSE_BODY EXPECTATION_FILENAME +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME 010_04_01 Append entity attributes and ignore existing multi-attribute instance - 204 vehicle-attribute-to-add-fragment.jsonld ${EMPTY} vehicle-speed-appended-expectation.jsonld + 204 vehicle-attribute-to-add-fragment.jsonld vehicle-speed-appended-expectation.jsonld 010_04_02 Append entity attributes with a new multi-attribute instance - 204 vehicle-speed-different-datasetid-fragment.jsonld ${EMPTY} vehicle-speed-different-datasetid-expectation.jsonld + 204 vehicle-speed-different-datasetid-fragment.jsonld vehicle-speed-different-datasetid-expectation.jsonld *** Keywords *** Append Attributes With Params [Documentation] Check that you can append entity attributes [Tags] ea-append 5_6_3 - [Arguments] ${status_code} ${fragment_filename} ${expectation_response_body} ${expectation_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} ${response}= Append Entity Attributes With Parameters ... ${entity_id} ... ${fragment_filename} ... ${CONTENT_TYPE_LD_JSON} ... noOverwrite Check Response Status Code ${status_code} ${response.status_code} - # ignore the reason for the not updated attribute as this detail is up to each context broker implementation - IF "${expectation_response_body}"!="${EMPTY}" - Check Response Body Content - ... expectation_filename=${expectation_response_body} - ... response_body=${response.json()} - ... additional_ignored_path=root\\['notUpdated'\\]\\[0\\]\\['reason'\\] - END + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} ${response1}= Retrieve Entity by Id ... id=${entity_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} ${ignored_attributes} + Check Updated Resource Set To + ... updated_resource=${entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} Create Initial Entity ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot index 65211d51..ee6c473e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot @@ -51,7 +51,10 @@ Delete Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${response2.json()} ${ignored_attributes} + Check Updated Resource Set To + ... updated_resource=${entity_expectation_payload} + ... response_body=${response2.json()} + ... ignored_keys=${ignored_attributes} Delete Initial Entities Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot index 5ac36e31..8f45de32 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot @@ -41,7 +41,10 @@ Update Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} ${ignored_attributes} + Check Updated Resource Set To + ... updated_resource=${entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} Initiate Test Case ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot index 8fbac357..02f52ce5 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot @@ -50,7 +50,10 @@ Update Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} ${ignored_attributes} + Check Updated Resource Set To + ... updated_resource=${entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} Delete Initial Entities Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot index ae5cf6be..ce010f33 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot @@ -41,9 +41,9 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context Check Updated Resource Set To - ... ${temporal_entity_expectation_payload} - ... ${response2.json()} - ... ${ignored_attributes} + ... updated_resource=${temporal_entity_expectation_payload} + ... response_body=${response2.json()} + ... ignored_keys=${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot index 1fdb1f2c..e4c99ed4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot @@ -41,9 +41,9 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context Check Updated Resource Set To - ... ${temporal_entity_expectation_payload} - ... ${response1.json()} - ... ${ignored_attributes} + ... updated_resource=${temporal_entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot index f854ab85..21369d45 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot @@ -49,9 +49,9 @@ Delete Attribute From A Temporal Entity ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context Check Updated Resource Set To - ... ${temporal_entity_expectation_payload} - ... ${response1.json()} - ... ${ignored_attributes} + ... updated_resource=${temporal_entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} Initialize Setup ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot index 072e7cb8..bd579a64 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -48,9 +48,9 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context Check Updated Resource Set To - ... ${temporal_entity_expectation_payload} - ... ${response1.json()} - ... ${ignored_attributes} + ... updated_resource=${temporal_entity_expectation_payload} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index 0ea7eef0..5a3834a2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -32,7 +32,10 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} ${ignored_attributes}= Create List ${status_regex_expr} - Check Updated Resource Set To ${subscription} ${response1.json()} ${ignored_attributes} + Check Updated Resource Set To + ... updated_resource=${subscription} + ... response_body=${response1.json()} + ... ignored_keys=${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot index 0cf7c44b..e28ea5a4 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot @@ -29,7 +29,9 @@ ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/s ... subscription_id=${subscription_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resource Set To ${subscription} ${response1.json()} + Check Updated Resource Set To + ... updated_resource=${subscription} + ... response_body=${response1.json()} *** Keywords *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot similarity index 82% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot index 66184afb..6f3cb641 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can list all the @context available in the broker with no previous add @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Test Template List @contexts with no previous created @context @@ -14,28 +14,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_01_01 List @contexts with neither details or kind and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ${EMPTY} 1 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Hosted 0 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Cached 1 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ImplicitlyCreated 0 052_01_05 List @contexts with details equal to false and no kind and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ${EMPTY} 1 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Hosted 0 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Cached 1 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ImplicitlyCreated 0 @@ -47,4 +47,6 @@ List @contexts with no previous created @context Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} - Check Context Response Body Containing a list of identifiers ${response.json()} ${count} + Check Context Response Body Containing a list of identifiers + ... response_body=${response.json()} + ... expected_length=${count} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot similarity index 83% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot index c764b19a..d55055d9 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can list all the @context available in the broker with one add @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context @@ -17,28 +17,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_02_01 List @contexts with neither details or kind and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ${EMPTY} 2 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Hosted 1 052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Cached 1 052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ImplicitlyCreated 0 052_02_05 List @contexts with details equal to false and no kind and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ${EMPTY} 2 052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Hosted 1 052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Cached 1 052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ImplicitlyCreated 0 @@ -60,10 +60,10 @@ List @contexts with one previous created @context Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Context Response Body Containing a list of identifiers - ... ${response.json()} - ... ${count} - ... ${uri_list} - ... ${kind} + ... response_body=${response.json()} + ... expected_length=${count} + ... list_contexts=${uri_list} + ... kind=${kind} Delete Initial @context Delete a @context ${uri_list[0]} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot similarity index 87% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot index d0b6a690..728899b3 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can list all the @context available in the broker with several add @contexts -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial set of @contexts @@ -19,28 +19,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_03_01 List @contexts with neither details or kind and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ${EMPTY} 4 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Hosted 3 052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} Cached 1 052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} ImplicitlyCreated 0 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ${EMPTY} 4 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Hosted 3 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false Cached 1 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 false ImplicitlyCreated 0 @@ -76,10 +76,10 @@ List @contexts with several previous created @context Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Context Response Body Containing a list of identifiers - ... ${response.json()} - ... ${count} - ... ${uri_list} - ... ${kind} + ... response_body=${response.json()} + ... expected_length=${count} + ... list_contexts=${uri_list} + ... kind=${kind} Delete Initial @contexts FOR ${uri} IN @{uri_list} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot similarity index 85% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot index 45478b76..b9d054ef 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you get an error when try to list @context with wrong details or kind -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Test Template List @contexts with no previous created @context @@ -14,19 +14,19 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_04_01 List @contexts with no details and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 ${EMPTY} other 052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 other ${EMPTY} 052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 other other 052_04_04 List @contexts with no details and kind equal to other and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 true other 052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 other Hosted diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot similarity index 90% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot index 77f58b01..6d9551d8 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can list all the @context available in the broker with several add @contexts with details equal to true -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial set of @contexts @@ -19,16 +19,16 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_05_01 List @contexts with details equal to false and no kind and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 true ${EMPTY} 4 052_05_02 List @contexts with details equal to false and kind equal to hosted and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 true Hosted 3 052_05_03 List @contexts with details equal to false and kind equal to cached abd with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 true Cached 1 052_05_04 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-serve 5_13_3 + [Tags] ctx-list 5_13_3 true ImplicitlyCreated 0 @@ -66,9 +66,9 @@ List @contexts with several previous created @context # We need to check the list of responses Check Context Response Body Containing a JSONObject with details of the @contexts - ... ${response.json()} - ... ${count} - ... ${uris} + ... response=${response.json()} + ... expected_length=${count} + ... list_contexts=${uris} Delete Initial @contexts FOR ${uri} IN @{uris} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot similarity index 94% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot index 3b7b1a70..9b0dac37 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can serve a previous created @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot similarity index 96% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot index 8884bdea..79e0ac14 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can serve a previous created @context with details equal to True -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot similarity index 87% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot index b7b06a1c..2d928980 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you get an error when try to serve a @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context @@ -18,13 +18,13 @@ ${reason_422}= Unprocessable Content *** Test Cases *** CONTEXTID DETAILS STATUSCODE REASON ERROR -052_04_01 Serve a @contexts with a wrong id and correct details +053_03_01 Serve a @contexts with a wrong id and correct details [Tags] ctx-serve 5_13_4 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -052_04_02 Serve a @contexts with a valid id and incorrect details +053_03_02 Serve a @contexts with a valid id and incorrect details [Tags] ctx-serve 5_13_4 ${uri} other 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} -052_04_03 Serve a @contexts with a wrong id and correct details +053_03_03 Serve a Cached @contexts with details set to false [Tags] ctx-serve 5_13_4 ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot similarity index 95% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index 1736ab48..41f2b7e1 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can get an increase numberOfHits after creation of a Hosted @context and using it -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/HttpUtils.resource diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot similarity index 97% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 2f56182c..64209140 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot similarity index 97% rename from TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot rename to TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index be00bd31..707755df 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot similarity index 95% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot rename to TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot index 7d73028a..f0984e64 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can add a hosted @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot similarity index 95% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot rename to TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot index 8375b8e8..1f20b383 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you receive a 400 Bad Request creating a @context if the content is incorrect -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete @context if it was created by error diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot similarity index 100% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot rename to TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot similarity index 94% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot rename to TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index b4ddeaf3..ca190b72 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot similarity index 92% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot rename to TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot index 0214d88f..b62fb9aa 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can delete a previous created hosted @context without reload param -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial hosted @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot similarity index 91% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot rename to TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot index 1ff37031..8d23700b 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you get an error when trying to delete an unknown @context identifier -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource *** Variables *** diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot similarity index 94% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot rename to TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index c8d80d39..9860f455 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you can delete a previous created cached @context without reload param -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial cached @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot similarity index 84% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot rename to TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot index 69e42c5e..8e1c9d2d 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you get an error when try to delete a @context -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context @@ -18,19 +18,19 @@ ${reason_422}= Unprocessable *** Test Cases *** CONTEXTID RELOAD STATUSCODE REASON ERROR -052_04_01 Delete a @contexts with a wrong id and reload equal to true +051_04_01 Delete a @contexts with a wrong id and reload equal to true [Tags] ctx-delete 5_13_5 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -052_04_02 Delete a @contexts with a wrong id and reload equal to false +051_04_02 Delete a @contexts with a wrong id and reload equal to false [Tags] ctx-delete 5_13_5 wrong_id_context false 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -052_04_03 Delete a @contexts with a wrong id and wrong reload value +051_04_03 Delete a @contexts with a wrong id and wrong reload value [Tags] ctx-delete 5_13_5 wrong_id_context ${EMPTY} 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -052_04_04 Delete a @contexts with a wrong id and wrong reload value +051_04_04 Delete a @contexts with a wrong id and wrong reload value [Tags] ctx-delete 5_13_5 wrong_id_context xxx 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -052_04_05 Delete a Hosted @contexts with a valid id and reload equal to true +051_04_05 Delete a Hosted @contexts with a valid id and reload equal to true [Tags] ctx-delete 5_13_5 ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} # TODO: reload=true and Implicitily created @context diff --git a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot similarity index 96% rename from TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot rename to TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index d13b1455..305cefd1 100644 --- a/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Check that you get an error if we created an entity with a context (Cached context) and we try to delete it with reload=true -Resource ${EXECDIR}/resources/ApiUtils/JSON-LD@ContextServer.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index f65242bf..1a430ac2 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -105,7 +105,25 @@ class Checks: 'Check Response Reason set to': Checks.check_response_reason_set_to, 'Check Response Does Not Contain Body': - Checks.check_response_does_not_contain_body + Checks.check_response_does_not_contain_body, + 'Check Context Response Body Containing a list of identifiers': + Checks.check_context_response_body_containing_a_list_of_identifiers, + 'Check Context Response Body Containing a JSONObject with details of the @contexts': + Checks.check_context_response_body_containing_a_jsonobject_with_details_of_the_contexts, + 'Check Dictionary Might Contain Additional Members': + Checks.check_dictionary_might_contain_additional_members, + 'Check Context Response Body Content': + Checks.check_context_response_body_content, + 'Check Context Response Body Containing Detailed Information': + Checks.check_context_response_body_containing_detailed_information, + 'Check Context Detailed Information Keys': + Checks.check_context_detailed_information_keys, + 'Check Context Response Body Containing numberOfHits value': + Checks.check_context_response_body_containing_numberofhits_value, + 'Check Response Kind set to': + Checks.check_response_kind_set_to, + 'Check Cached @Contexts': + Checks.check_cached_contexts } self.args = { @@ -131,7 +149,7 @@ class Checks: }, 'Check Updated Resource Set To': { 'params': ['updated_resource', 'response_body', 'ignored_keys'], - 'position': [0] + 'position': [] }, 'Check Response Body Containing ProblemDetails Element Containing Title Element': { 'params': ['response_body'], @@ -302,6 +320,41 @@ class Checks: 'Check Response Does Not Contain Body': { 'params': ['response'], 'position': [0] + }, + 'Check Context Response Body Containing a list of identifiers': { + 'params': ['response_body', 'expected_length', 'list_contexts', 'kind'], + 'position': [] + }, + 'Check Context Response Body Containing a JSONObject with details of the @contexts': { + 'params': ['response', 'expected_length', 'list_contexts'], + 'position': [0, 1, 2] + }, + 'Check Dictionary Might Contain Additional Members': { + 'params': ['dictionary', 'key'], + 'position': [0, 1] + }, + 'Check Context Response Body Content': { + 'params': ['expectation_filename', 'response_body'], + 'position': [0, 1] + }, + 'Check Context Response Body Containing Detailed Information': { + 'params': ['response_body', 'context_type'], + 'position': [0, 1] + }, + 'Check Context Detailed Information Keys': { + 'params': ['my_dict'], + 'position': [0] + }, + 'Check Context Response Body Containing numberOfHits value': { + 'params': ['response_body', 'expected_number_of_hists'], + 'position': [0, 1] + }, + 'Check Response Kind set to': { + 'params': ['response', 'kind'], + 'position': [0, 1] + }, + 'Check Cached @Contexts': { + 'params': ['context'] } } @@ -403,7 +456,32 @@ class Checks: if 'dictionary' in kwargs and 'key' in kwargs: return f"The dictionary `{kwargs['dictionary']}' should contain the key '{kwargs['key']}'" else: - raise Exception(f'ERROR, Expected dictionary and key parameters but received: {kwargs}') + raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") + + @staticmethod + def check_context_response_body_content(kwargs: list) -> str: + if 'expectation_filename' in kwargs and 'response_body' in kwargs: + return f"Check the Body of the response should contain the @context `{kwargs['expectation_filename']}'" + else: + raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") + + @staticmethod + def check_context_response_body_containing_detailed_information(kwargs: list) -> str: + if 'response_body' in kwargs and 'context_type' in kwargs: + return (f"Check the Body of the response should contain a @context " + f"with 'URL' key not Empty and 'string' type, " + f"with 'localId' key not Empty and 'string' type, " + f"with 'kind' key not Empty, 'string' type, and value set to '{kwargs['context_type']}', " + f"and 'timestamp and 'DateTime' format") + else: + raise Exception(f"ERROR, Expected 'response_body' and 'context_type' parameters but received: {kwargs}") + + @staticmethod + def check_dictionary_might_contain_additional_members(kwargs: list) -> str: + if 'dictionary' in kwargs and 'key' in kwargs: + return f"The dictionary `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" + else: + raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") @staticmethod def should_not_be_empty(kwargs: list) -> str: @@ -466,6 +544,58 @@ class Checks: return response + @staticmethod + def check_context_response_body_containing_a_list_of_identifiers(kwargs: list) -> str: + expected_parameters = ['response_body', 'expected_length', 'list_contexts', 'kind'] + + result = [x for x in kwargs if x not in expected_parameters] + response = "Check Context Response Body Containing a list of identifiers" + for key, value in kwargs.items(): + match key: + case 'response_body': + response = f"{response} and\n Query Parameter: {key} set to '{value}'" + case 'expected_length': + response = f"{response} and\n Query Parameter: {key} set to '{value}'" + case 'list_contexts': + response = f"{response} and\n Query Parameter: {key} set to '{value}'" + case 'kind': + response = f"{response} and\n Query Parameter: {key} set to '{value}'" + case 'checks': + pass + case _: + raise Exception(f"ERROR, unexpected attribute '{result}', the attributes expected are " + f"'{expected_parameters}', but received: {kwargs}") + + return response + + @staticmethod + def check_context_response_body_containing_a_jsonobject_with_details_of_the_contexts(kwargs: list) -> str: + if 'response' in kwargs and 'expected_length' in kwargs and 'list_contexts' in kwargs: + return (f"Response Body containing a Context element containing JSONObject with details of the contexts:\n" + f" * the expected length of contexts set to '{kwargs['expected_length']}'\n" + f" * the list of contexts URI set to '{kwargs['list_contexts']}'\n" + f" * response body to be checked set to '{kwargs['response']}'") + else: + raise Exception(f"ERROR, expected 'filename', 'temporal_entity_representation_id', and 'response_body' " + f"attributes, received: '{kwargs}'") + + @staticmethod + def check_context_detailed_information_keys(kwargs: list) -> str: + return (f"Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', " + f"'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'") + + @staticmethod + def check_context_response_body_containing_numberofhits_value(kwargs: list) -> str: + return f"Check that the numberOfHits in the response body is set to '{kwargs['expected_number_of_hists']}'" + + @staticmethod + def check_response_kind_set_to(kwargs: list) -> str: + return f"Check that the Kind of the @context is set to '{kwargs['kind']}'" + + @staticmethod + def check_cached_contexts(kwargs: list) -> str: + return f"Check that for each @context in the response body, they are of the type 'Cached'" + @staticmethod def check_response_body_containing_entity_element(kwargs: list) -> str: if 'filename' in kwargs and 'id' in kwargs and 'response' in kwargs: @@ -796,7 +926,30 @@ class Checks: @staticmethod def check_updated_resource_set_to(kwargs: list) -> str: - return "Updated Entity set to ${entity}" + # return "Updated Entity set to ${entity}" + expected_parameters = ['updated_resource', 'response_body', 'ignored_keys'] + + if 'ignored_keys' not in kwargs: + kwargs['ignored_keys'] = '${None}' + + result = [x for x in kwargs if x not in expected_parameters] + response = "Check Updated Entity" + for key, value in kwargs.items(): + match key: + case 'updated_resource': + response = f"{response} and\n Query Parameter: '{key}' set to '{value}'" + case 'response_body': + response = f"{response} and\n Query Parameter: '{key}' set to '{value}'" + case 'ignored_keys': + response = f"{response} and\n Query Parameter: '{key}' set to '{value}'" + # If an exact match is not confirmed, this last case will be used if provided + case 'checks': + pass + case _: + raise Exception(f"ERROR, unexpected attribute '{result}', the attributes expected are " + f"'{expected_parameters}', but received: {kwargs}") + + return response @staticmethod def check_updated_resources_set_to(kwargs: list) -> str: diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index ca6f418d..16f44d52 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -30,6 +30,11 @@ class GenerateRobotData: 'Consumption': 'Cons', 'Provision': 'Prov', 'ContextSource': 'CS', + 'JSON-LD@contextServer': 'CTX', + 'Cons/ListContexts': 'Cons', + 'Cons/ServeContext': 'Cons', + 'Prov/AddContext': 'Prov', + 'Prov/DeleteContext': 'Prov', 'Discovery/RetrieveAvailableAttributeInformation': 'DISC', 'Discovery/RetrieveAvailableEntityTypeInformation': 'DISC', 'Discovery/RetrieveAvailableEntityTypes': 'DISC', diff --git a/doc/analysis/initial_setup.py b/doc/analysis/initial_setup.py index a23d9077..a0b6c416 100644 --- a/doc/analysis/initial_setup.py +++ b/doc/analysis/initial_setup.py @@ -31,6 +31,8 @@ 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(), + 'Create Initial set of @contexts': InitialSetup.create_set_contexts(), + 'Create Initial @context': InitialSetup.create_context() } self.total_files = -1 @@ -177,6 +179,20 @@ class InitialSetup: }''' return data + @staticmethod + def create_set_contexts(): + data = '''with { + the SUT containing a set of three Hosted @contexts and the default Cached Core Context. + }''' + return data + + @staticmethod + def create_context(): + data = '''with { + the SUT containing a Hosted @context and the default Cached Core Context. + }''' + return data + def get_property_values(self, root_folder: str, property_name: str) -> [str, str]: robot_files_without_setup = list() robot_files_with_setup = list() diff --git a/doc/analysis/parserobotfile.py b/doc/analysis/parserobotfile.py index 2d9666b5..55ba5270 100644 --- a/doc/analysis/parserobotfile.py +++ b/doc/analysis/parserobotfile.py @@ -109,7 +109,7 @@ class ParseRobotFile: self.get_template_param_values(test_cases=string_test_cases) def get_template_content(self, string: str): - matches = re.findall(pattern=r'^(([a-zA-z0-9\-\/]+[ ]*)+)$', string=string, flags=re.MULTILINE) + matches = re.findall(pattern=r'^(([a-zA-z0-9\-\/@]+[ ]*)+)$', string=string, flags=re.MULTILINE) indexes = list() for match in matches: @@ -252,7 +252,8 @@ class ParseRobotFile: lines_starting_with_check = re.findall(r'^\s*Check.*', content, re.MULTILINE) if len(lines_starting_with_check) != 0: - # TODO: From the list of Checks, we need to discard all 'Check Response Status Code' except the last one. Should be resolve when clearly defined the Setup process of the Test Suite + # TODO: From the list of Checks, we need to discard all 'Check Response Status Code' except the last one. + # Should be resolve when clearly defined the Setup process of the Test Suite # check_string = 'Check Response Status Code' # lines_starting_with_check = [x.strip() for x in lines_starting_with_check] # new_list = [value for value in lines_starting_with_check if not value.startswith(check_string)] @@ -264,7 +265,11 @@ class ParseRobotFile: elif content.find('Wait for notification') != 0: # There is no Check, we need to check if there is a 'Wait for notification', # then we need to check the 'Should be Equal' sentences - pattern = r'(Wait for no notification)|(Wait for notification and validate it)|(Wait for notification)([ ]{4}(.*))?' + pattern = \ + (r'(Wait for no notification)|' + r'(Wait for notification and validate it)|' + r'(Wait for notification)([ ]{4}(.*))?') + param = re.findall(pattern=pattern, string=content, flags=re.MULTILINE) for i in range(0, len(param)): data = tuple(element for element in param[i] if element != '') @@ -317,7 +322,9 @@ class ParseRobotFile: def generate_then_content(self, content): # Need to check if it is a Notification data or a normal Response - aux = [x for x in content if x['checks'].find('Notification data') != -1 or x['checks'].find('After waiting') != -1 or x['checks'].find('Notification and validate') != -1] + aux = [x for x in content if x['checks'].find('Notification data') != -1 or + x['checks'].find('After waiting') != -1 or + x['checks'].find('Notification and validate') != -1] if len(aux) == 0: # The SUT sends a valid Response @@ -347,13 +354,15 @@ class ParseRobotFile: # exit(-1) # match = re.match(pattern=r"[\W\w]+'(\d+)'", string=content[0]) # try: - # checks = f"then {{\n the SUT will not send a CsourceNotification after {match.group(1)} seconds}}" + # checks = + # f"then {{\n the SUT will not send a CsourceNotification after {match.group(1)} seconds}}" # except Exception: # raise Exception(f"ERROR: unexpected timeout parameter: '{content[0]}'") # else: # print("Error, need to control the generation of then message") # exit(-1) - # checks = (f"then {{\n the client at '${{endpoint}}' receives a valid Notification, {content[0]}\n}}") + # checks = + # (f"then {{\n the client at '${{endpoint}}' receives a valid Notification, {content[0]}\n}}") else: raise Exception("ERROR, It is expected at least 1 Notification Check operation in the Test Case") @@ -384,8 +393,9 @@ class ParseRobotFile: position_params = checks.args[content[0]] if aux == 1: # We are in multiline classification of the Check, need to extract the parameter for the next lines - params, attributes = self.find_attributes_next_line(test_case=test_case, name=content[0], - position_params=position_params) + params, attributes = self.find_attributes_next_line(test_case=test_case, + name=content[0], + position_params=position_params) return content[0], params, attributes elif aux > 1: # We are in one line definition @@ -418,7 +428,15 @@ class ParseRobotFile: param_value = self.get_param_value_for_waiting(param_key=param_key, content=content) if param_value is not None: - result[param_key] = param_value + try: + # This is a parameter of the template, therefore we take the value of the param + result[param_key] = self.template_params_value[self.test_case_name][f'${{{param_value}}}'] + except KeyError: + # Check if it is a parameter of the Test Suite + try: + result[param_key] = self.variables[f'${{{param_value}}}'] + except KeyError: + result[param_key] = param_value return result @@ -437,7 +455,7 @@ class ParseRobotFile: pattern = f"\${{([\w\W]+)}}|([\w\W]+)" # elif length == 0 and len(content) > 1: - # # There is params but they are not written in the form key=value + # # There is params, but they are not written in the form key=value # found = content[1] # # pattern = f"\${{(\d+)}}" # pattern = f"\${{([\w\W]+)}}|([\w\W]+)" @@ -513,12 +531,18 @@ class ParseRobotFile: result = self.config_file.get_variable(aux) except KeyError: try: - aux = self.template_params_value[self.test_case_name] - result = aux[position] - - if result[:2] == "${": - result = self.get_param_value(result) + aux1 = self.template_params_value[self.test_case_name] + result = aux1[f'${{{aux}}}'] + + try: + if result[:2] == "${": + result = self.get_param_value(result) + except KeyError: + result = f'${{{aux}}}' except KeyError: - result = position + if '$' in position: + return position + else: + result = aux return result diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index 96f2933c..42c970be 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -244,6 +244,24 @@ class Requests: 'Setup Initial Subscriptions': { 'positions': [], 'params': [] + }, + 'List @contexts': { + 'positions': [0, 1], + 'params': ['details', 'kind'] + + }, + 'Serve a @context': { + 'positions': [0, 1], + 'params': ['contextId', 'details'] + + }, + 'Add a new @context': { + 'positions': [0], + 'params': ['filename'] + }, + 'Delete a @context': { + 'positions': [0], + 'params': ['uri'] } } @@ -361,7 +379,15 @@ class Requests: 'Query Temporal Representation Of Entities Via Post': Requests.query_temporal_representation_of_entities_via_post, 'Setup Initial Subscriptions': - Requests.setup_initial_subscriptions + Requests.setup_initial_subscriptions, + 'List @contexts': + Requests.list_contexts, + 'Serve a @context': + Requests.serve_a_context, + 'Add a new @context': + Requests.add_a_new_context, + 'Delete a @context': + Requests.delete_a_context } self.variables = variables @@ -597,6 +623,42 @@ class Requests: else: raise Exception(f"ERROR, expected filename attribute, but received {kwargs}") + @staticmethod + def list_contexts(kwargs) -> str: + expected_parameters = ['details', 'kind'] + + result = [x for x in kwargs if x not in expected_parameters] + response = "List @contexts:" + for key, value in kwargs.items(): + match key: + case 'details': + response = f"{response} and\n Query Parameter: details set to '{value}'" + case 'kind': + response = f"{response} and\n Query Parameter: kind set to '{value}'" + case _: + raise Exception(f"ERROR, unexpected attribute '{result}', the attributes expected are " + f"'{expected_parameters}', but received: {kwargs}") + + return response + + @staticmethod + def serve_a_context(kwargs) -> str: + if 'update_option' not in kwargs: + kwargs['details'] = '${EMPTY}' + + response = f"Serve a @context with contextID '{kwargs['contextId']}' and details '{kwargs['details']}'" + + return response + + @staticmethod + def add_a_new_context(kwargs) -> str: + return f"Add a new @context based on the payload defined in the file {kwargs['filename']}" + + @staticmethod + def delete_a_context(kwargs) -> str: + return f"Delete a @context whose 'URI' set to '{kwargs['uri']}'" + + @staticmethod def create_context_source_registration(kwargs) -> str: if 'context_source_registration_payload' in kwargs: result = (f"Create Context Source Registration Request with Content-Type set to 'application/ld+json' " diff --git a/doc/files/ContextInformation/Consumption/019_01_01.json b/doc/files/ContextInformation/Consumption/019_01_01.json index c018bd02..babb9622 100644 --- a/doc/files/ContextInformation/Consumption/019_01_01.json +++ b/doc/files/ContextInformation/Consumption/019_01_01.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-minimal-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_ids set to '${entities_ids_to_be_retrieved}' and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_01_02.json b/doc/files/ContextInformation/Consumption/019_01_02.json index 28789a55..84d3df47 100644 --- a/doc/files/ContextInformation/Consumption/019_01_02.json +++ b/doc/files/ContextInformation/Consumption/019_01_02.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response body containing a list containing entity elements with different types and\n Query Parameter: filename set to 'expectation_filename' and\n Query Parameter: entities_representation_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'True'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response body containing a list containing entity elements with different types and\n Query Parameter: filename set to 'two-types-vehicle-offstreetparking-expectation.jsonld' and\n Query Parameter: entities_representation_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'True'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: accept set to 'application/ld+json'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_01_03.json b/doc/files/ContextInformation/Consumption/019_01_03.json index 61a63179..7886f38c 100644 --- a/doc/files/ContextInformation/Consumption/019_01_03.json +++ b/doc/files/ContextInformation/Consumption/019_01_03.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-minimal-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_id_pattern set to 'urn:ngsi-ld:Building:.*' and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_01_04.json b/doc/files/ContextInformation/Consumption/019_01_04.json index 13c69b48..9ebde001 100644 --- a/doc/files/ContextInformation/Consumption/019_01_04.json +++ b/doc/files/ContextInformation/Consumption/019_01_04.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-attributes-query-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attributes_to_be_retrieved}'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_01_05.json b/doc/files/ContextInformation/Consumption/019_01_05.json index 8477e66b..b4b2fb7f 100644 --- a/doc/files/ContextInformation/Consumption/019_01_05.json +++ b/doc/files/ContextInformation/Consumption/019_01_05.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-geoproperty-query-expectation.jsonld' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: accept set to 'application/ld+json' and\n Query Parameter: georel set to 'equals' and\n Query Parameter: geometry set to 'Point' and\n Query Parameter: coordinates set to '[13.3986, 52.5547]'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_02_01.json b/doc/files/ContextInformation/Consumption/019_02_01.json index dc6b36fd..059bb6cf 100644 --- a/doc/files/ContextInformation/Consumption/019_02_01.json +++ b/doc/files/ContextInformation/Consumption/019_02_01.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-minimal-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/query'\n method set to 'POST'\n Get Entities Via POST Request: and\n Query Parameter: entity_ids set to '${first_entity_id}' and\n Query Parameter: entity_types set to 'https://ngsi-ld-test-suite/context#Building' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: accept set to 'application/json'\n}", "http_verb": "POST", "endpoint": "entityOperations/query" diff --git a/doc/files/ContextInformation/Consumption/019_02_02.json b/doc/files/ContextInformation/Consumption/019_02_02.json index 9f61b5b0..6914cb62 100644 --- a/doc/files/ContextInformation/Consumption/019_02_02.json +++ b/doc/files/ContextInformation/Consumption/019_02_02.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response body containing a list containing entity elements with different types and\n Query Parameter: filename set to 'expectation_filename' and\n Query Parameter: entities_representation_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'True'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response body containing a list containing entity elements with different types and\n Query Parameter: filename set to 'two-vehicles-expectation.jsonld' and\n Query Parameter: entities_representation_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: ignore_core_context_version set to 'True'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/query'\n method set to 'POST'\n Get Entities Via POST Request: and\n Query Parameter: entity_types set to 'https://ngsi-ld-test-suite/context#Vehicle' and\n Query Parameter: accept set to 'application/ld+json' and\n Query Parameter: content_type set to 'application/json'\n}", "http_verb": "POST", "endpoint": "entityOperations/query" diff --git a/doc/files/ContextInformation/Consumption/019_02_03.json b/doc/files/ContextInformation/Consumption/019_02_03.json index e87f26b0..7f5134f1 100644 --- a/doc/files/ContextInformation/Consumption/019_02_03.json +++ b/doc/files/ContextInformation/Consumption/019_02_03.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-minimal-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/query'\n method set to 'POST'\n Get Entities Via POST Request: and\n Query Parameter: entity_id_pattern set to 'urn:ngsi-ld:Building:.*' and\n Query Parameter: entity_types set to 'https://ngsi-ld-test-suite/context#Building' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: accept set to 'application/json'\n}", "http_verb": "POST", "endpoint": "entityOperations/query" diff --git a/doc/files/ContextInformation/Consumption/019_02_04.json b/doc/files/ContextInformation/Consumption/019_02_04.json index 12cfe6e8..17f4e0e2 100644 --- a/doc/files/ContextInformation/Consumption/019_02_04.json +++ b/doc/files/ContextInformation/Consumption/019_02_04.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_retrieved' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'vehicle-simple-attributes-core-context-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_retrieved' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/query'\n method set to 'POST'\n Get Entities Via POST Request: and\n Query Parameter: attrs set to '${attributes_to_be_retrieved}' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: accept set to 'application/json'\n}", "http_verb": "POST", "endpoint": "entityOperations/query" diff --git a/doc/files/ContextInformation/Consumption/019_02_05.json b/doc/files/ContextInformation/Consumption/019_02_05.json index 86ed5049..4bdbb31b 100644 --- a/doc/files/ContextInformation/Consumption/019_02_05.json +++ b/doc/files/ContextInformation/Consumption/019_02_05.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities Via POST with Response Status Code set to 200 and\n Query Entities Via POST with Check Response Body Content and\n Query Parameter: expectation_filename set to 'vehicle-parking-simple-expectation.geojson' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/query'\n method set to 'POST'\n Get Entities Via POST Request: and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: accept set to 'application/geo+json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: content_type set to 'application/json'\n}", "http_verb": "POST", "endpoint": "entityOperations/query" diff --git a/doc/files/ContextInformation/Consumption/019_04.json b/doc/files/ContextInformation/Consumption/019_04.json index b28b578f..b8a1e152 100644 --- a/doc/files/ContextInformation/Consumption/019_04.json +++ b/doc/files/ContextInformation/Consumption/019_04.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing a list containing Entity Elements and\n Query Parameter: expectation_filename set to 'building-simple-attributes-simplified-expectation.json' and\n Query Parameter: entities_ids set to 'entities_ids_to_be_compared' and\n Query Parameter: ignore_core_context_version set to 'False'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_ids set to '${entities_ids_to_be_retrieved}' and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'keyValues'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Consumption/019_05.json b/doc/files/ContextInformation/Consumption/019_05.json index 23e8aecd..ba1c3c13 100644 --- a/doc/files/ContextInformation/Consumption/019_05.json +++ b/doc/files/ContextInformation/Consumption/019_05.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Check Response Body Content and\n Query Parameter: expectation_filename set to 'two-buildings-location-attribute-normalized.geojson' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_ids set to '${entities_ids_to_be_retrieved}' and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: accept set to 'application/geo+json' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"'\n}", "http_verb": "GET", "endpoint": "entities/" diff --git a/doc/files/ContextInformation/Provision/008_01.json b/doc/files/ContextInformation/Provision/008_01.json index c60d5826..006ed4fd 100644 --- a/doc/files/ContextInformation/Provision/008_01.json +++ b/doc/files/ContextInformation/Provision/008_01.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response2.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'POST'\n Create or Update Temporal Representation of Entity Selecting Content Type: and\n Query Parameter: temporal_entity_representation_id set to '${temporal_entity_representation_id}' and\n Query Parameter: filename set to 'vehicle-create-temporal-representation-sample.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: accept set to '${EMPTY}'\n}", "http_verb": "POST", "endpoint": "temporal/entities" diff --git a/doc/files/ContextInformation/Provision/010_01.json b/doc/files/ContextInformation/Provision/010_01.json index 8b042187..4645ff99 100644 --- a/doc/files/ContextInformation/Provision/010_01.json +++ b/doc/files/ContextInformation/Provision/010_01.json @@ -24,7 +24,7 @@ "setup": "Create Initial Entity", "teardown": "Delete Initial Entity", "template": "Append Attributes Without Params", - "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}/attrs'\n method set to 'POST'\n Append Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-new-attribute-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "entities/{id}/attrs" @@ -40,7 +40,7 @@ "setup": "Create Initial Entity", "teardown": "Delete Initial Entity", "template": "Append Attributes Without Params", - "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}/attrs'\n method set to 'POST'\n Append Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-speed-different-datasetid-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "entities/{id}/attrs" diff --git a/doc/files/ContextInformation/Provision/010_04.json b/doc/files/ContextInformation/Provision/010_04.json index d586ccca..97361a7e 100644 --- a/doc/files/ContextInformation/Provision/010_04.json +++ b/doc/files/ContextInformation/Provision/010_04.json @@ -24,7 +24,7 @@ "setup": "Create Initial Entity", "teardown": "Delete Initial Entity", "template": "Append Attributes With Params", - "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes With Parameters with Response Status Code set to 204 and\n ${expectation_filename} with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_response_body' and\n Query Parameter: response_body set to '' and\n Query Parameter: additional_ignored_path set to 'root\\\\['notUpdated'\\\\]\\\\[0\\\\]\\\\['reason'\\\\]' and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes With Parameters with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}/attrs?options=${options}'\n method set to 'POST'\n Append entity attributes with parameters: and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-attribute-to-add-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: options set to 'noOverwrite'\n}", "http_verb": "POST", "endpoint": "entities/{id}/attrs?options=${options}" @@ -40,7 +40,7 @@ "setup": "Create Initial Entity", "teardown": "Delete Initial Entity", "template": "Append Attributes With Params", - "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes With Parameters with Response Status Code set to 204 and\n ${expectation_filename} with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_response_body' and\n Query Parameter: response_body set to '' and\n Query Parameter: additional_ignored_path set to 'root\\\\['notUpdated'\\\\]\\\\[0\\\\]\\\\['reason'\\\\]' and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes With Parameters with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}/attrs?options=${options}'\n method set to 'POST'\n Append entity attributes with parameters: and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-speed-different-datasetid-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: options set to 'noOverwrite'\n}", "http_verb": "POST", "endpoint": "entities/{id}/attrs?options=${options}" diff --git a/doc/files/ContextInformation/Provision/011_01.json b/doc/files/ContextInformation/Provision/011_01.json index 4d49483d..f67a1321 100644 --- a/doc/files/ContextInformation/Provision/011_01.json +++ b/doc/files/ContextInformation/Provision/011_01.json @@ -24,7 +24,7 @@ "setup": "Initialize Test", "teardown": "Delete Initial Entities", "template": "Update Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-speed-two-datasetid-01-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "PATCH", "endpoint": "entities/{entityId}/attrs/{attributeId}" @@ -40,7 +40,7 @@ "setup": "Initialize Test", "teardown": "Delete Initial Entities", "template": "Update Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-speed-two-datasetid-02-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "PATCH", "endpoint": "entities/{entityId}/attrs/{attributeId}" @@ -56,7 +56,7 @@ "setup": "Initialize Test", "teardown": "Delete Initial Entities", "template": "Update Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Response Body Content and\n Query Parameter: expectation_filename set to 'expectation_resp_filename' and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: additional_ignored_path set to '${EMPTY}' and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-speed-two-datasetid-03-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "PATCH", "endpoint": "entities/{entityId}/attrs/{attributeId}" diff --git a/doc/files/ContextInformation/Provision/012_01.json b/doc/files/ContextInformation/Provision/012_01.json index 0cef4a7e..772a3a94 100644 --- a/doc/files/ContextInformation/Provision/012_01.json +++ b/doc/files/ContextInformation/Provision/012_01.json @@ -24,7 +24,7 @@ "setup": "Initiate Test Case", "teardown": "Delete Initial Entities", "template": "Update Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'isParked' and\n Query Parameter: fragment_filename set to 'vehicle-isparked-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "PATCH", "endpoint": "entities/{entityId}/attrs/{attributeId}" @@ -40,7 +40,7 @@ "setup": "Initiate Test Case", "teardown": "Delete Initial Entities", "template": "Update Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'speed' and\n Query Parameter: fragment_filename set to 'vehicle-speed-equal-datasetid-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "PATCH", "endpoint": "entities/{entityId}/attrs/{attributeId}" diff --git a/doc/files/ContextInformation/Provision/013_01.json b/doc/files/ContextInformation/Provision/013_01.json index c6aed518..4d5a241a 100644 --- a/doc/files/ContextInformation/Provision/013_01.json +++ b/doc/files/ContextInformation/Provision/013_01.json @@ -23,7 +23,7 @@ "setup": null, "teardown": "Delete Initial Entities", "template": "Delete Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response2.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'speed' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: deleteAll set to '${deleteAll}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" @@ -39,7 +39,7 @@ "setup": null, "teardown": "Delete Initial Entities", "template": "Delete Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response2.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'speed' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: deleteAll set to '${deleteAll}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" @@ -55,7 +55,7 @@ "setup": null, "teardown": "Delete Initial Entities", "template": "Delete Attributes", - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response2.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'speed' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: deleteAll set to '${deleteAll}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" diff --git a/doc/files/ContextInformation/Provision/014_01.json b/doc/files/ContextInformation/Provision/014_01.json index 6b7b71b3..5b9fde59 100644 --- a/doc/files/ContextInformation/Provision/014_01.json +++ b/doc/files/ContextInformation/Provision/014_01.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Append Attribute To Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Append Attribute To Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_id}/attrs'\n method set to 'POST'\n Append Attribute to Temporal Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: fragment_filename set to 'vehicle-temporal-representation-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "temporal/entities/{temporal_entity_id}/attrs" diff --git a/doc/files/ContextInformation/Provision/015_01.json b/doc/files/ContextInformation/Provision/015_01.json index f22ca6fb..9bb8343e 100644 --- a/doc/files/ContextInformation/Provision/015_01.json +++ b/doc/files/ContextInformation/Provision/015_01.json @@ -24,7 +24,7 @@ "setup": "Initialize Setup", "teardown": "Delete Temporal Entity", "template": "Delete Attribute From A Temporal Entity", - "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Attribute From Temporal Entity: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'fuelLevel' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: datasetId set to '${datasetid}' and\n Query Parameter: deleteAll set to '${deleteall}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}" @@ -40,7 +40,7 @@ "setup": "Initialize Setup", "teardown": "Delete Temporal Entity", "template": "Delete Attribute From A Temporal Entity", - "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Attribute From Temporal Entity: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'fuelLevel' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: datasetId set to '${datasetid}' and\n Query Parameter: deleteAll set to '${deleteall}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}" @@ -56,7 +56,7 @@ "setup": "Initialize Setup", "teardown": "Delete Temporal Entity", "template": "Delete Attribute From A Temporal Entity", - "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Attribute From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Attribute From Temporal Entity: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'fuelLevel' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: datasetId set to '${datasetid}' and\n Query Parameter: deleteAll set to '${deleteall}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "temporal/entities/{entityId}/attrs/{attributeId}?${params_as_string}" diff --git a/doc/files/ContextInformation/Provision/016_01.json b/doc/files/ContextInformation/Provision/016_01.json index 153cf064..8c03b9b7 100644 --- a/doc/files/ContextInformation/Provision/016_01.json +++ b/doc/files/ContextInformation/Provision/016_01.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Modify Attribute Instance From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Modify Attribute Instance From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'POST'\n Create or Update Temporal Representation of Entity Selecting Content Type: and\n Query Parameter: temporal_entity_representation_id set to '${temporal_entity_representation_id}' and\n Query Parameter: filename set to 'vehicle-temporal-representation-sample.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: accept set to '${EMPTY}'\n}", "http_verb": "POST", "endpoint": "temporal/entities" diff --git a/doc/files/ContextInformation/Provision/017_01.json b/doc/files/ContextInformation/Provision/017_01.json index 2da4cc8a..d1cfbe0a 100644 --- a/doc/files/ContextInformation/Provision/017_01.json +++ b/doc/files/ContextInformation/Provision/017_01.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Attribute Instance From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Or Update Temporal Representation Of Entity Selecting Content Type with Response Status Code set to 201 and\n Delete Attribute Instance From Temporal Entity with Response Status Code set to 204 and\n Retrieve Temporal Representation Of Entity with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'temporal_entity_expectation_payload' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_id}/attrs/speed/{instanceId}'\n method set to 'DELETE'\n Delete Attribute Instance from Temporal Entity: and\n Query Parameter: temporal_entity_id set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'speed' and\n Query Parameter: instanceId set to '${instanceId}' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "DELETE", "endpoint": "temporal/entities/{temporal_entity_id}/attrs/speed/{instanceId}" diff --git a/doc/files/ContextInformation/Subscription/029_06.json b/doc/files/ContextInformation/Subscription/029_06.json index 8802e5b6..5ed177b2 100644 --- a/doc/files/ContextInformation/Subscription/029_06.json +++ b/doc/files/ContextInformation/Subscription/029_06.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Subscription with Response Status Code set to 204 and\n Retrieve Subscription with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Subscription with Response Status Code set to 204 and\n Retrieve Subscription with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'subscription' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{subscription_id}'\n method set to 'PATCH'\n Request Update Subscription and \nHeader['Link'] contain the context 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\nHeader['Content-Type'] set to 'application/json' and\nPayload defined in file 'subscriptions/fragments/subscription-update-sample.json'\n}", "http_verb": "PATCH", "endpoint": "subscriptions/{subscription_id}" diff --git a/doc/files/ContextSource/RegistrationSubscription/038_01.json b/doc/files/ContextSource/RegistrationSubscription/038_01.json index cfc50ee4..bdd28e67 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_01.json @@ -23,7 +23,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastNotification' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastFailure' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastSuccess' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'timesSent'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions'\n method set to 'POST'\n Create Context Source Registration Subscription with filename set to '${subscription_payload}', accept set to '${EMPTY}', and content-type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "csourceSubscriptions" diff --git a/doc/files/ContextSource/RegistrationSubscription/038_02.json b/doc/files/ContextSource/RegistrationSubscription/038_02.json index 81ecf1fe..1c2eb5f2 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_02.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_02.json @@ -22,7 +22,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions'\n method set to 'POST'\n Create Context Source Registration Subscription with filename set to '${subscription_payload}', accept set to '${EMPTY}', and content-type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "csourceSubscriptions" diff --git a/doc/files/ContextSource/RegistrationSubscription/039_01.json b/doc/files/ContextSource/RegistrationSubscription/039_01.json index dd2c24b2..9de656a0 100644 --- a/doc/files/ContextSource/RegistrationSubscription/039_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/039_01.json @@ -23,7 +23,7 @@ "setup": "Setup Initial Context Source Registration Subscriptions", "teardown": "Delete Initial Context Source Registration Subscriptions", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Context Source Registration Subscription with Response Status Code set to 204 and\n Retrieve Context Source Registration Subscription with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Context Source Registration Subscription with Response Status Code set to 204 and\n Retrieve Context Source Registration Subscription with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'subscription' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'PATCH'\n Update Context Source Registration Subscription with subscription id set to '${subscription_id}' and subscription update fragment set to '${subscription_update_fragment}'\n}", "http_verb": "PATCH", "endpoint": "csourceSubscriptions/{subscription_id}" diff --git a/doc/files/ContextSource/RegistrationSubscription/047_11.json b/doc/files/ContextSource/RegistrationSubscription/047_11.json index d0c847e6..e2ab66d3 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_11.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_11.json @@ -6,8 +6,8 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_11_7", "keywords": [ - "Start Local Server", - "Stop Local Server" + "Receive cSourceNotification For Matching Context Source Registrations On Management Interval", + "Delete Created Context Source Registrations" ], "teardown": "Stop Local Server", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/ContextSource/RegistrationSubscription/047_16.json b/doc/files/ContextSource/RegistrationSubscription/047_16.json index 763b945e..e16c0a69 100644 --- a/doc/files/ContextSource/RegistrationSubscription/047_16.json +++ b/doc/files/ContextSource/RegistrationSubscription/047_16.json @@ -24,7 +24,7 @@ "setup": "Create Initial Context Source Registrations And Context Source Registration Subscription", "teardown": "Delete Created Context Source Registrations And Context Source Registration Subscription", "template": "Receive cSourceNotification For Newly Matching Context Source Registrations", - "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to 'notification_csr_ids' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", + "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to '${first_context_source_registration_id}' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'PATCH'\n Update Context Source Registration Subscription with subscription id set to '${subscription_id}' and subscription update fragment set to '${subscription_update_fragment}'\n}", "http_verb": "PATCH", "endpoint": "csourceSubscriptions/{subscription_id}" @@ -40,7 +40,7 @@ "setup": "Create Initial Context Source Registrations And Context Source Registration Subscription", "teardown": "Delete Created Context Source Registrations And Context Source Registration Subscription", "template": "Receive cSourceNotification For Newly Matching Context Source Registrations", - "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to 'notification_csr_ids' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", + "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to '${second_context_source_registration_id}' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'PATCH'\n Update Context Source Registration Subscription with subscription id set to '${subscription_id}' and subscription update fragment set to '${subscription_update_fragment}'\n}", "http_verb": "PATCH", "endpoint": "csourceSubscriptions/{subscription_id}" @@ -56,13 +56,15 @@ "setup": "Create Initial Context Source Registrations And Context Source Registration Subscription", "teardown": "Delete Created Context Source Registrations And Context Source Registration Subscription", "template": "Receive cSourceNotification For Newly Matching Context Source Registrations", - "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to 'notification_csr_ids' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", + "then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for Notification and validate it and\n Query Parameter: expected_subscription_id set to 'subscription_id' and\n Query Parameter: expected_context_source_registration_ids set to '${first_context_source_registration_id}' and\n Query Parameter: expected_trigger_reason set to 'newlyMatching' and\n Query Parameter: expected_notification_data_entities set to '${EMPTY}' and\n Query Parameter: timeout set to '5'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'PATCH'\n Update Context Source Registration Subscription with subscription id set to '${subscription_id}' and subscription update fragment set to '${subscription_update_fragment}'\n}", "http_verb": "PATCH", "endpoint": "csourceSubscriptions/{subscription_id}" } ], - "permutations": [], + "permutations": [ + "then" + ], "robotpath": "ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour", "robotfile": "047_16" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_01.json b/doc/files/JSON-LD@contextServer/Consumption/052_01.json new file mode 100644 index 00000000..f9a494cf --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/052_01.json @@ -0,0 +1,149 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_01", + "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "List @contexts with no previous created @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "052_01_01 List @contexts with neither details or kind and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_03 List @contexts with no details and kind equal to cached and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_05 List @contexts with details equal to false and no kind and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_05", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_06", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_07", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_08", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotfile": "052_01" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_02.json b/doc/files/JSON-LD@contextServer/Consumption/052_02.json new file mode 100644 index 00000000..90b47ca4 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/052_02.json @@ -0,0 +1,151 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_02", + "test_objective": "Check that you can list all the @context available in the broker with one add @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "Create Initial @context", + "List @contexts with one previous created @context", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "052_02_01 List @contexts with neither details or kind and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '2' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_05 List @contexts with details equal to false and no kind and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_05", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '2' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_06", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_07", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_08", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "List @contexts with one previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotfile": "052_02" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_03.json b/doc/files/JSON-LD@contextServer/Consumption/052_03.json new file mode 100644 index 00000000..80ed4a7a --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/052_03.json @@ -0,0 +1,151 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_03", + "test_objective": "Check that you can list all the @context available in the broker with several add @contexts", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "Create Initial set of @contexts", + "List @contexts with several previous created @context", + "Delete Initial @contexts" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a set of three Hosted @contexts and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "052_03_01 List @contexts with neither details or kind and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_05 List @contexts with details equal to false and no kind and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_05", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_06", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_07", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_08", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotfile": "052_03" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_04.json b/doc/files/JSON-LD@contextServer/Consumption/052_04.json new file mode 100644 index 00000000..29bd2d7b --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/052_04.json @@ -0,0 +1,100 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_04", + "test_objective": "Check that you get an error when try to list @context with wrong details or kind", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "List @contexts with no previous created @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "052_04_01 List @contexts with no details and kind equal to other and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 400 and\n List @contexts with Response reason set to 'Bad Request' and\n List @contexts with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'other'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 400 and\n List @contexts with Response reason set to 'Bad Request' and\n List @contexts with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'other' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 400 and\n List @contexts with Response reason set to 'Bad Request' and\n List @contexts with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'other' and\n Query Parameter: kind set to 'other'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_04_04 List @contexts with no details and kind equal to other and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 400 and\n List @contexts with Response reason set to 'Bad Request' and\n List @contexts with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'other'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_05", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": null, + "teardown": null, + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 400 and\n List @contexts with Response reason set to 'Bad Request' and\n List @contexts with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'other' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotfile": "052_04" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_05.json b/doc/files/JSON-LD@contextServer/Consumption/052_05.json new file mode 100644 index 00000000..e06ef6d2 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/052_05.json @@ -0,0 +1,87 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_05", + "test_objective": "Check that you can list all the @context available in the broker with several add @contexts with details equal to true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "Create Initial set of @contexts", + "List @contexts with several previous created @context", + "Delete Initial @contexts" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a set of three Hosted @contexts and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "052_05_01 List @contexts with details equal to false and no kind and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '4'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_05_02 List @contexts with details equal to false and kind equal to hosted and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '3'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_05_03 List @contexts with details equal to false and kind equal to cached abd with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '1'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_05_04 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create Initial set of @contexts", + "teardown": "Delete Initial @contexts", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '0'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotfile": "052_05" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_01.json b/doc/files/JSON-LD@contextServer/Consumption/053_01.json new file mode 100644 index 00000000..45ce9e8a --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_01.json @@ -0,0 +1,52 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_01", + "test_objective": "Check that you can serve a previous created @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_4", + "keywords": [ + "Create Initial @context", + "Serve a @context with details", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "053_01_01 Serve a @context without details", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_01_01", + "doc": "Check that you can serve a @context with details equal to empty or false", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve a @context with details", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain the @context `@context-minimal-valid.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "053_01_02 Serve a @context with details equal to false", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_01_02", + "doc": "Check that you can serve a @context with details equal to empty or false", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve a @context with details", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain the @context `@context-minimal-valid.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_01" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_02.json b/doc/files/JSON-LD@contextServer/Consumption/053_02.json new file mode 100644 index 00000000..04bc251f --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_02.json @@ -0,0 +1,36 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_02", + "test_objective": "Check that you can serve a previous created @context with details equal to True", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_4", + "keywords": [ + "Create Initial @context", + "Serve a @context with details equal to true", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "053_02_01 Serve a @context with details equal to True", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_02_01", + "doc": "Check that you can serve a @context with details", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve a @context with details equal to true", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Hosted', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_02" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_03.json b/doc/files/JSON-LD@contextServer/Consumption/053_03.json new file mode 100644 index 00000000..6117c2ba --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_03.json @@ -0,0 +1,71 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_03", + "test_objective": "Check that you get an error when try to serve a @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_4", + "keywords": [ + "Serve @context with no previous created @context", + "Create Initial @context", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "053_03_01 Serve a @contexts with a wrong id and correct details", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_01", + "doc": "Check that an error is returned when we request for a @context that does not exist", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve @context with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 404 and\n Serve a @context with Response reason set to 'Not Found' and\n Serve a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'wrong_id_context' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "053_03_02 Serve a @contexts with a valid id and incorrect details", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_02", + "doc": "Check that an error is returned when we request for a @context that does not exist", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve @context with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 400 and\n Serve a @context with Response reason set to 'Bad Request' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "053_03_03 Serve a Cached @contexts with details set to false", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_03", + "doc": "Check that an error is returned when we request for a @context that does not exist", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Serve @context with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 422 and\n Serve a @context with Response reason set to 'Unprocessable Content' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_03" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_04.json b/doc/files/JSON-LD@contextServer/Consumption/053_04.json new file mode 100644 index 00000000..a0c4a12d --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_04.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_04", + "test_objective": "Check that you can get an increase numberOfHits after creation of a Hosted @context and using it", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial @context condition", + "Delete Initial @context condition" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "053_04_01 Check that the numberOfHits is increased after using a Hosted context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_04_01", + "doc": "Check that the numberOfHits is increased after using a Hosted context", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial @context condition", + "teardown": "Delete Initial @context condition", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_04" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_05.json b/doc/files/JSON-LD@contextServer/Consumption/053_05.json new file mode 100644 index 00000000..a369fb3b --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_05.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_05", + "test_objective": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial @context condition", + "Delete Initial @context condition" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_05_01", + "doc": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial @context condition", + "teardown": "Delete Initial @context condition", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_05" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_06.json b/doc/files/JSON-LD@contextServer/Consumption/053_06.json new file mode 100644 index 00000000..93f37134 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Consumption/053_06.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_06", + "test_objective": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial @context condition", + "Delete Initial @context condition" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "053_06_01 Check that the numberOfHits is increased after using a Cached context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_06_01", + "doc": "Check that the numberOfHits is increased after using a Cached context", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial @context condition", + "teardown": "Delete Initial @context condition", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotfile": "053_06" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_01.json b/doc/files/JSON-LD@contextServer/Provision/050_01.json new file mode 100644 index 00000000..652b0684 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/050_01.json @@ -0,0 +1,53 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/050_01", + "test_objective": "Check that you can add a hosted @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_2", + "keywords": [ + "Add a valid @context", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "050_01_01 Add a valid hosted @context from key=value", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_01_01", + "doc": "Check that you can add a @context", + "tags": [ + "5_13_2", + "ctx-add" + ], + "setup": null, + "teardown": "Delete Initial @context", + "template": "Add a valid @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Add a new @context with Response Status Code set to 201 and\n Add a new @context with Response does not contain a body and\n Add a new @context with Response reason set to 'Created' and\n Serve a @context with Check that the Kind of the @context is set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts'\n method set to 'POST'\n Add a new @context based on the payload defined in the file @context-minimal-valid.json\n}", + "http_verb": "POST", + "endpoint": "jsonldContexts" + }, + { + "name": "050_01_02 Add a valid cached @context from URI", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_01_02", + "doc": "Check that you can add a @context", + "tags": [ + "5_13_2", + "ctx-add" + ], + "setup": null, + "teardown": "Delete Initial @context", + "template": "Add a valid @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Add a new @context with Response Status Code set to 201 and\n Add a new @context with Response does not contain a body and\n Add a new @context with Response reason set to 'Created' and\n Serve a @context with Check that the Kind of the @context is set to 'Hosted'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts'\n method set to 'POST'\n Add a new @context based on the payload defined in the file @context-cached-valid.json\n}", + "http_verb": "POST", + "endpoint": "jsonldContexts" + } + ], + "permutations": [ + "when" + ], + "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotfile": "050_01" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_02.json b/doc/files/JSON-LD@contextServer/Provision/050_02.json new file mode 100644 index 00000000..3d5f81f8 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/050_02.json @@ -0,0 +1,53 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/050_02", + "test_objective": "Check that you receive a 400 Bad Request creating a @context if the content is incorrect", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_2", + "keywords": [ + "Add @context scenarios", + "Delete @context if it was created by error" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "050_02_01 Checking Incorrect Payload", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_02_01", + "doc": "Check that the payload include \"@context\"", + "tags": [ + "5_13_2", + "ctx-add" + ], + "setup": null, + "teardown": "Delete @context if it was created by error", + "template": "Add @context scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Add a new @context with Response Status Code set to 400 and\n Add a new @context with Response reason set to 'Bad Request' and\n Add a new @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/InvalidRequest' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts'\n method set to 'POST'\n Add a new @context based on the payload defined in the file @context-incorrect.json\n}", + "http_verb": "POST", + "endpoint": "jsonldContexts" + }, + { + "name": "050_02_02 Checking Wrong JSON", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_02_02", + "doc": "Check that the payload include \"@context\"", + "tags": [ + "5_13_2", + "ctx-add" + ], + "setup": null, + "teardown": "Delete @context if it was created by error", + "template": "Add @context scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Add a new @context with Response Status Code set to 400 and\n Add a new @context with Response reason set to 'Bad Request' and\n Add a new @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/InvalidRequest' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts'\n method set to 'POST'\n Add a new @context based on the payload defined in the file @context-wrong-json.json\n}", + "http_verb": "POST", + "endpoint": "jsonldContexts" + } + ], + "permutations": [ + "when" + ], + "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotfile": "050_02" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_03.json b/doc/files/JSON-LD@contextServer/Provision/050_03.json new file mode 100644 index 00000000..63c4393f --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/050_03.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/050_03", + "test_objective": "Check that you can create a implicitycreate @context through creating a subscription", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_2", + "keywords": [ + "Create Initial Subscription", + "Delete Initial Subscription" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id} \n}", + "test_cases": [ + { + "name": "050_03_01 Check the creation of ImplicitelyCreted @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_03_01", + "doc": "Check that you can create a subscription", + "tags": [ + "5_13_2", + "sub-create" + ], + "setup": "Create Initial Subscription", + "teardown": "Delete Initial Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscriptions/subscription-sample.jsonld'\n}", + "http_verb": "POST", + "endpoint": "subscriptions/" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotfile": "050_03" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_04.json b/doc/files/JSON-LD@contextServer/Provision/050_04.json new file mode 100644 index 00000000..718b25a6 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/050_04.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/050_04", + "test_objective": "Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_2", + "keywords": [ + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "050_04_01 Add a valid hosted @context with URIs and check that the URIs are Cached @contexts", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_04_01", + "doc": "Check that you can add a @context", + "tags": [ + "5_13_2", + "ctx-add" + ], + "setup": null, + "teardown": "Delete Initial @context", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Add a new @context with Response Status Code set to 201 and\n Add a new @context with Response does not contain a body and\n Add a new @context with Response reason set to 'Created' and\n Serve a @context with Check that the Kind of the @context is set to 'Hosted' and\n Notification with Check that for each @context in the response body, they are of the type 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts'\n method set to 'POST'\n Add a new @context based on the payload defined in the file @context-cached-valid.json\n}", + "http_verb": "POST", + "endpoint": "jsonldContexts" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotfile": "050_04" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_01.json b/doc/files/JSON-LD@contextServer/Provision/051_01.json new file mode 100644 index 00000000..c4748c9f --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/051_01.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_01", + "test_objective": "Check that you can delete a previous created hosted @context without reload param", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial hosted @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "051_01_01 Delete a @context whose kind is hosted without reload param", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_01_01", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial hosted @context", + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 204 and\n Delete a @context with Response reason set to 'No Content' and\n Delete a @context with Response does not contain a body\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${uri}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotfile": "051_01" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_02.json b/doc/files/JSON-LD@contextServer/Provision/051_02.json new file mode 100644 index 00000000..7bc96d22 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/051_02.json @@ -0,0 +1,32 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_02", + "test_objective": "Check that you get an error when trying to delete an unknown @context identifier", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "051_02_01 Delete a @context whose kind is hosted without reload param and unknown @context identifier", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_02_01", + "doc": "Check that an error message is obtained in the response when we try to delete a @context without unknonwn id", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${random_url}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotfile": "051_02" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_03.json b/doc/files/JSON-LD@contextServer/Provision/051_03.json new file mode 100644 index 00000000..fc216e76 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/051_03.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_03", + "test_objective": "Check that you can delete a previous created cached @context without reload param", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial cached @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "051_03_01 Delete a @context whose kind is hosted without reload param", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_03_01", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial cached @context", + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 204 and\n Delete a @context with Response reason set to 'No Content' and\n Delete a @context with Response does not contain a body\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${contextId}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotfile": "051_03" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_04.json b/doc/files/JSON-LD@contextServer/Provision/051_04.json new file mode 100644 index 00000000..76df602f --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/051_04.json @@ -0,0 +1,103 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_04", + "test_objective": "Check that you get an error when try to delete a @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Delete a @context with wrong data", + "Create Initial @context", + "Delete Initial @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", + "test_cases": [ + { + "name": "051_04_01 Delete a @contexts with a wrong id and reload equal to true", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_01", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Delete a @context with wrong data", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "051_04_02 Delete a @contexts with a wrong id and reload equal to false", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_02", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Delete a @context with wrong data", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "051_04_03 Delete a @contexts with a wrong id and wrong reload value", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_03", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Delete a @context with wrong data", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "051_04_04 Delete a @contexts with a wrong id and wrong reload value", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_04", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Delete a @context with wrong data", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "051_04_05 Delete a Hosted @contexts with a valid id and reload equal to true", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_05", + "doc": "Check that you can delete a hosted @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create Initial @context", + "teardown": "Delete Initial @context", + "template": "Delete a @context with wrong data", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${uri}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotfile": "051_04" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_05.json b/doc/files/JSON-LD@contextServer/Provision/051_05.json new file mode 100644 index 00000000..d39fb4f9 --- /dev/null +++ b/doc/files/JSON-LD@contextServer/Provision/051_05.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_05", + "test_objective": "Check that you get an error if we created an entity with a context (Cached context) and we try to delete it with reload=true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create Initial @context condition", + "Delete Initial @context condition" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "051_05_01 Deleta and Reload a Cached @context with no communication with the Context Server", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_05_01", + "doc": "Check that you get an error if we try to reload a cached context with no communicatino with the context server", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create Initial @context condition", + "teardown": "Delete Initial @context condition", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 503 and\n Delete a @context with Response reason set to 'Service Unavailable' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/LdContextNotAvailable' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${uri}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotfile": "051_05" +} \ No newline at end of file diff --git a/doc/tests/test_jsonldContext_Consumption.py b/doc/tests/test_jsonldContext_Consumption.py new file mode 100644 index 00000000..783e9b5c --- /dev/null +++ b/doc/tests/test_jsonldContext_Consumption.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python +from unittest import TestCase +from doc.analysis.generaterobotdata import GenerateRobotData +from json import load, dump +from deepdiff import DeepDiff +from os.path import dirname, exists +from os import listdir, remove, makedirs + + +class TestContextServerConsumption(TestCase): + # 14 failed, 26 passed + @classmethod + def setUpClass(cls): + TestContextServerConsumption.folder_test_suites = dirname(dirname(dirname(__file__))) + folder_results = f'{TestContextServerConsumption.folder_test_suites}/doc/results' + + # Check that the folder '/results' exists and if not, create it + if not exists(folder_results): + makedirs(folder_results) + else: + # Delete the /results folder + [remove(f'{folder_results}/{x}') for x in listdir(folder_results) if x.startswith('out')] + + def setUp(self) -> None: + self.folder_test_suites = dirname(dirname(dirname(__file__))) + + def common_function(self, robot_file, expected_value, difference_file): + data = GenerateRobotData(robot_file=robot_file, + execdir=self.folder_test_suites) + data.parse_robot() + obtained_response = data.get_info() + + with open(expected_value, 'r') as file: + expected_response = load(file) + + result = DeepDiff(t1=obtained_response, t2=expected_response, ignore_order=True) + + if len(result) != 0: + # There are some differences + with open(difference_file, 'w') as fp: + dump(obj=obtained_response, indent=2, fp=fp) + + assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' + + def test_052_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_052_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_052_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_052_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_052_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/doc/tests/test_jsonldContext_Provision.py b/doc/tests/test_jsonldContext_Provision.py new file mode 100644 index 00000000..7ea8bb33 --- /dev/null +++ b/doc/tests/test_jsonldContext_Provision.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python +from unittest import TestCase +from doc.analysis.generaterobotdata import GenerateRobotData +from json import load, dump +from deepdiff import DeepDiff +from os.path import dirname, exists +from os import listdir, remove, makedirs + + +class TestContextServerProvision(TestCase): + # 14 failed, 26 passed + @classmethod + def setUpClass(cls): + TestContextServerProvision.folder_test_suites = dirname(dirname(dirname(__file__))) + folder_results = f'{TestContextServerProvision.folder_test_suites}/doc/results' + + # Check that the folder '/results' exists and if not, create it + if not exists(folder_results): + makedirs(folder_results) + else: + # Delete the /results folder + [remove(f'{folder_results}/{x}') for x in listdir(folder_results) if x.startswith('out')] + + def setUp(self) -> None: + self.folder_test_suites = dirname(dirname(dirname(__file__))) + + def common_function(self, robot_file, expected_value, difference_file): + data = GenerateRobotData(robot_file=robot_file, + execdir=self.folder_test_suites) + data.parse_robot() + obtained_response = data.get_info() + + with open(expected_value, 'r') as file: + expected_response = load(file) + + result = DeepDiff(t1=obtained_response, t2=expected_response, ignore_order=True) + + if len(result) != 0: + # There are some differences + with open(difference_file, 'w') as fp: + dump(obj=obtained_response, indent=2, fp=fp) + + assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' + + def test_050_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_050_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_050_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_050_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_050_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_050_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_050_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_050_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/resources/ApiUtils/JSON-LD@ContextServer.resource b/resources/ApiUtils/jsonldContext.resource similarity index 99% rename from resources/ApiUtils/JSON-LD@ContextServer.resource rename to resources/ApiUtils/jsonldContext.resource index acf18ea3..b2740280 100644 --- a/resources/ApiUtils/JSON-LD@ContextServer.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -21,6 +21,7 @@ ${response} ${EMPTY} @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated ${ERROR_OPERATION_NOT_SUPPORTED} https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported +${ERROR_TYPE_BAD_REQUEST_DATA} https://uri.etsi.org/ngsi-ld/errors/BadRequestData *** Keywords *** -- GitLab From 1360efa55477a7ae96da6b4d15f0915352a29730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Mon, 26 Feb 2024 21:24:43 +0100 Subject: [PATCH 13/25] Update jsonldContext.resource --- resources/ApiUtils/jsonldContext.resource | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/ApiUtils/jsonldContext.resource b/resources/ApiUtils/jsonldContext.resource index b2740280..de7dcf93 100644 --- a/resources/ApiUtils/jsonldContext.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -16,7 +16,7 @@ ${CONTENT_TYPE_JSON} application/json ${CORE_@CONTEXT} https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld -${response} ${EMPTY} +${response} ${EMPTY}more @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated -- GitLab From 22b0c4d17e83c726f7c6f938f14781b092cac929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 27 Feb 2024 09:46:07 +0100 Subject: [PATCH 14/25] Synchronize with hardening/038s for script find_unused_test_data.py --- scripts/find_unused_test_data.py | 47 ++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/scripts/find_unused_test_data.py b/scripts/find_unused_test_data.py index 6a961e79..2e00342a 100644 --- a/scripts/find_unused_test_data.py +++ b/scripts/find_unused_test_data.py @@ -1,23 +1,42 @@ -import os +from os import listdir +from os.path import isfile, isdir, dirname, abspath, join +from colorama import Fore, Style -def list_files_in_dir(dirname): - for fname in os.listdir(dirname): - if os.path.isfile(dirname + "/" + fname): - print("Looking at test data file: ", fname) - find_test_data_in_tc("TP", fname) +def list_files_in_dir(test_suite_folder, data_folder): + for filename in listdir(data_folder): + aux = join(data_folder, filename) + if isfile(aux): + print(Style.RESET_ALL) + print("Looking at test data file: ", filename) + found = find_test_data_in_tc(dir_name=test_suite_folder, filename=filename) + if not found: + print(Fore.RED + " Usage not found") + else: - list_files_in_dir(dirname + "/" + fname) + list_files_in_dir(test_suite_folder=test_suite_folder, data_folder=aux) -def find_test_data_in_tc(dir, filename): - for file in os.listdir(dir): - path = dir + "/" + file - if os.path.isdir(path): - find_test_data_in_tc(path, filename) +def find_test_data_in_tc(dir_name, filename): + found = False + for file in listdir(dir_name): + path = join(dir_name, file) + if isdir(path): + aux = find_test_data_in_tc(path, filename) + found = aux or found else: if filename in open(path).read(): - print("Found usage of", filename, "in", path) + found = True + print(Fore.GREEN + " Found usage of", filename, "in", path) + + return found + + +if __name__ == '__main__': + # Get the folder of the tests + base_folder = dirname(dirname(abspath(__file__))) + test_suite_folder = join(base_folder, "TP") + data_folder = join(base_folder, 'data') -list_files_in_dir("data") + list_files_in_dir(test_suite_folder=test_suite_folder, data_folder=data_folder) -- GitLab From bd8da9c33f0ef302374f7ae9f543a85bc81d2e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 28 Feb 2024 22:49:13 +0100 Subject: [PATCH 15/25] Adding ImplicitlyCreated context and Core Context management with documentation --- README.md | 1 + .../Consumption/ListContexts/052_04.robot | 10 +- .../Consumption/ListContexts/052_05.robot | 8 +- .../Consumption/ListContexts/052_06.robot | 90 +++++++++++ .../Consumption/ServeContext/053_02.robot | 2 +- .../Consumption/ServeContext/053_04.robot | 10 +- .../Consumption/ServeContext/053_05.robot | 10 +- .../Consumption/ServeContext/053_06.robot | 12 +- .../Consumption/ServeContext/053_07.robot | 77 +++++++++ .../Consumption/ServeContext/053_08.robot | 73 +++++++++ .../Provision/AddContext/050_01.robot | 12 +- .../Provision/AddContext/050_02.robot | 1 - .../Provision/AddContext/050_03.robot | 69 ++++---- .../Provision/AddContext/050_04.robot | 11 +- .../Provision/DeleteContext/051_02.robot | 4 +- .../Provision/DeleteContext/051_03.robot | 18 ++- .../Provision/DeleteContext/051_04.robot | 10 +- .../Provision/DeleteContext/051_05.robot | 12 +- .../Provision/DeleteContext/051_06.robot | 62 +++++++ .../Provision/DeleteContext/051_07.robot | 59 +++++++ .../Provision/DeleteContext/051_08.robot | 33 ++++ .../Provision/DeleteContext/051_09.robot | 38 +++++ ...ion-with-implicitlycreated-contexts.jsonld | 18 +++ doc/analysis/generaterobotdata.py | 2 +- doc/analysis/initial_setup.py | 59 +++++-- doc/analysis/requests.py | 2 +- .../Provision/050_03.json | 35 ---- .../Consumption/052_01.json | 2 +- .../Consumption/052_02.json | 2 +- .../Consumption/052_03.json | 2 +- .../Consumption/052_04.json | 12 +- .../Consumption/052_05.json | 10 +- .../jsonldContext/Consumption/052_06.json | 151 ++++++++++++++++++ .../Consumption/053_01.json | 8 +- .../Consumption/053_02.json | 6 +- .../Consumption/053_03.json | 8 +- .../Consumption/053_04.json | 20 +-- .../Consumption/053_05.json | 20 +-- .../Consumption/053_06.json | 22 +-- .../jsonldContext/Consumption/053_07.json | 35 ++++ .../jsonldContext/Consumption/053_08.json | 35 ++++ .../Provision/050_01.json | 2 +- .../Provision/050_02.json | 2 +- doc/files/jsonldContext/Provision/050_03.json | 34 ++++ .../Provision/050_04.json | 2 +- .../Provision/051_01.json | 4 +- .../Provision/051_02.json | 6 +- .../Provision/051_03.json | 13 +- .../Provision/051_04.json | 10 +- .../Provision/051_05.json | 16 +- doc/files/jsonldContext/Provision/051_06.json | 35 ++++ doc/files/jsonldContext/Provision/051_07.json | 35 ++++ doc/files/jsonldContext/Provision/051_08.json | 50 ++++++ doc/files/jsonldContext/Provision/051_09.json | 34 ++++ doc/tests/test_CheckTests.py | 4 +- doc/tests/test_jsonldContext_Consumption.py | 65 +++++--- doc/tests/test_jsonldContext_Provision.py | 64 +++++--- resources/ApiUtils/jsonldContext.resource | 49 +++--- resources/variables.py | 1 + 59 files changed, 1220 insertions(+), 277 deletions(-) create mode 100644 TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot create mode 100644 TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot create mode 100644 TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot create mode 100644 TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot create mode 100644 TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot create mode 100644 TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot create mode 100644 TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot create mode 100644 data/jsonldContext/subscription-with-implicitlycreated-contexts.jsonld delete mode 100644 doc/files/JSON-LD@contextServer/Provision/050_03.json rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/052_01.json (99%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/052_02.json (99%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/052_03.json (99%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/052_04.json (91%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/052_05.json (90%) create mode 100644 doc/files/jsonldContext/Consumption/052_06.json rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_01.json (95%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_02.json (92%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_03.json (94%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_04.json (63%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_05.json (75%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Consumption/053_06.json (57%) create mode 100644 doc/files/jsonldContext/Consumption/053_07.json create mode 100644 doc/files/jsonldContext/Consumption/053_08.json rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/050_01.json (97%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/050_02.json (97%) create mode 100644 doc/files/jsonldContext/Provision/050_03.json rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/050_04.json (96%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/051_01.json (88%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/051_02.json (86%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/051_03.json (75%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/051_04.json (97%) rename doc/files/{JSON-LD@contextServer => jsonldContext}/Provision/051_05.json (71%) create mode 100644 doc/files/jsonldContext/Provision/051_06.json create mode 100644 doc/files/jsonldContext/Provision/051_07.json create mode 100644 doc/files/jsonldContext/Provision/051_08.json create mode 100644 doc/files/jsonldContext/Provision/051_09.json diff --git a/README.md b/README.md index 91331c39..10ff8587 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ server to listen to notifications (the address must be accessible by the context Default value: `0.0.0.0` and `8085`. - `context_source_host` and `context_source_port` : The address and port used for the context source. Default value: `0.0.0.0` and `8086`. +- `core_context`: The core context used by the Context Broker. When you execute locally the tests, you can leave the default values as they are. NGSI-LD Test Suite provides a mockup services to provide the notification functionality and therefore the notification_server_host can be diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot index b9d054ef..76d59296 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot @@ -13,19 +13,19 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND -052_04_01 List @contexts with no details and kind equal to other and not previously created @context +052_04_01 List @contexts with no details and kind set to other and not previously created @context [Tags] ctx-list 5_13_3 ${EMPTY} other -052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context +052_04_02 List @contexts with details set to other and no kind and not previously created @context [Tags] ctx-list 5_13_3 other ${EMPTY} -052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context +052_04_03 List @contexts with details set to other and kind set to other and not previously created @context [Tags] ctx-list 5_13_3 other other -052_04_04 List @contexts with no details and kind equal to other and not previously created @context +052_04_04 List @contexts with details set to true and kind set to other and not previously created @context [Tags] ctx-list 5_13_3 true other -052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context +052_04_05 List @contexts with details set to other and kind set to Hosted and not previously created @context [Tags] ctx-list 5_13_3 other Hosted diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot index 6d9551d8..2650e56f 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot @@ -18,16 +18,16 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT -052_05_01 List @contexts with details equal to false and no kind and with previously several add @context +052_05_01 List @contexts with details set to true and no kind and with previously several add @contexts [Tags] ctx-list 5_13_3 true ${EMPTY} 4 -052_05_02 List @contexts with details equal to false and kind equal to hosted and with previously several add @context +052_05_02 List @contexts with details set to true and kind set to hosted and with previously several add @contexts [Tags] ctx-list 5_13_3 true Hosted 3 -052_05_03 List @contexts with details equal to false and kind equal to cached abd with previously several add @context +052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts [Tags] ctx-list 5_13_3 true Cached 1 -052_05_04 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context +052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts [Tags] ctx-list 5_13_3 true ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot new file mode 100644 index 00000000..26a80cdb --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot @@ -0,0 +1,90 @@ +*** Settings *** +Documentation Check that you can list all the @context available in the broker with no previous add @context + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource + +Test Setup Create initial ImplicitlyCreated @context +Test Template List @contexts with no previous created @context +Test Teardown Delete Initial @context Data + +*** Variables *** +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld +${filename}= @context-minimal-valid.json +${reason_200}= OK +${reason_204}= No Content + + +*** Test Cases *** DETAILS KIND COUNT +052_06_01 List @contexts with neither details or kind and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + ${EMPTY} ${EMPTY} 4 +052_06_02 List @contexts with no details and kind set to hosted and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + ${EMPTY} Hosted 0 +052_06_03 List @contexts with no details and kind set to cached and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + ${EMPTY} Cached 3 +052_06_04 List @contexts with no details and kind set to implicitlycreated and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + ${EMPTY} ImplicitlyCreated 1 +052_06_05 List @contexts with details set to false and no kind and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + false ${EMPTY} 4 +052_06_06 List @contexts with details set to false and kind equal to hosted and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + false Hosted 0 +052_06_07 List @contexts with details set to false and kind equal to cached and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + false Cached 3 +052_06_08 List @contexts with details set to false and kind equal to implicitlycreated and a created ImplicitlyCreated @context + [Tags] ctx-list 5_13_3 + false ImplicitlyCreated 1 + +*** Keywords *** +List @contexts with no previous created @context + [Documentation] Check that you can list @contexts + [Arguments] ${details} ${kind} ${count} + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Context Response Body Containing a list of identifiers + ... response_body=${response.json()} + ... expected_length=${count} + ... list_contexts=${list_contexts} + +Create initial ImplicitlyCreated @context + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 + + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + Append To List ${list_contexts} ${implicit_id} + + Check Context Response Body Containing numberOfHits value ${data} 1 + + Set Global Variable ${implicit_id} + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + +Delete Initial @context Data + Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot index 79e0ac14..c5b05ca6 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot @@ -16,7 +16,7 @@ ${reason_204}= No Content *** Test Cases *** DETAILS CONTEXT_TYPE -053_02_01 Serve a @context with details equal to True +053_02_01 Serve a @context with details set to True [Tags] ctx-serve 5_13_4 true Hosted diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index 41f2b7e1..fa0d0311 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/HttpUtils.resource -Test Setup Create Initial @context condition -Test Teardown Delete Initial @context condition +Test Setup Create Initial @context condition from an external server +Test Teardown Delete Initial @context condition from an external server *** Variables *** @@ -18,7 +18,7 @@ ${entity_context_id}= urn:ngsi-ld:Building:randomUUID *** Test Cases *** 053_04_01 Check that the numberOfHits is increased after using a Hosted context [Documentation] Check that the numberOfHits is increased after using a Hosted context - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_4 Create Entity selecting @context ${entityfile} ${uri} @@ -31,7 +31,7 @@ ${entity_context_id}= urn:ngsi-ld:Building:randomUUID *** Keywords *** -Create Initial @context condition +Create Initial @context condition from an external server ${response}= Add a new @context ${filename} Check Response Status Code 201 ${response.status_code} ${uri}= Fetch Id From Response Location Header ${response.headers} @@ -44,6 +44,6 @@ Create Initial @context condition Check Response Status Code 200 ${response.status_code} Check Context Response Body Containing numberOfHits value ${response.json()} 1 -Delete Initial @context condition +Delete Initial @context condition from an external server Delete Entity by Id ${entity_context_id} Delete a @context ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 64209140..93ad384f 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -13,8 +13,8 @@ Variables ${EXECDIR}/resources/variables.py Library HttpCtrl.Client Library HttpCtrl.Server -Test Setup Create Initial @context condition -Test Teardown Delete Initial @context condition +Test Setup Create Initial @context condition from an external server +Test Teardown Delete Initial @context condition from an external server *** Variables *** @@ -28,7 +28,7 @@ ${reason_200}= OK *** Test Cases *** 053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true [Documentation] Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_4 ${response}= Serve a @context ... contextId=${uri} @@ -50,7 +50,7 @@ ${reason_200}= OK *** Keywords *** -Create Initial @context condition +Create Initial @context condition from an external server Start @context Local Server ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} @@ -70,7 +70,7 @@ Create Initial @context condition ${response}= Delete a @context ${uri} true Check Response Status Code 503 ${response.status_code} -Delete Initial @context condition +Delete Initial @context condition from an external server Log Delete initial contidions Delete Entity by Id ${entity_context_id} Delete a @context ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index 707755df..8ecbb868 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true +Documentation Check that the numberOfHits is increased after using a Cached context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -13,8 +13,8 @@ Variables ${EXECDIR}/resources/variables.py Library HttpCtrl.Client Library HttpCtrl.Server -Test Setup Create Initial @context condition -Test Teardown Delete Initial @context condition +Test Setup Create Initial @context condition from an external server +Test Teardown Delete Initial @context condition from an external server *** Variables *** @@ -28,7 +28,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: *** Test Cases *** 053_06_01 Check that the numberOfHits is increased after using a Cached context [Documentation] Check that the numberOfHits is increased after using a Cached context - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_4 ${second_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} @@ -44,7 +44,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: *** Keywords *** -Create Initial @context condition +Create Initial @context condition from an external server Start @context Local Server ${first_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} @@ -62,7 +62,7 @@ Create Initial @context condition Check Response Status Code 200 ${response.status_code} Check Context Response Body Containing numberOfHits value ${response.json()} 1 -Delete Initial @context condition +Delete Initial @context condition from an external server Log Delete initial contidions Delete Entity by Id ${first_existing_entity_id} Delete a @context ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot new file mode 100644 index 00000000..d7716705 --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot @@ -0,0 +1,77 @@ +*** Settings *** +Documentation Check that we can serve a ImplicitlyCreated @context with details set to true + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create initial ImplicitlyCreated @context +Test Teardown Delete Initial @context Data + + +*** Variables *** +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld +${reason_200}= OK + +*** Test Cases *** +053_07_01 Check that we can serve a ImplicitlyCreated @context with details set to true + [Documentation] Check that we can serve a ImplicitlyCreated @context with details set to true + [Tags] sub-create 5_13_4 + + ${response}= Serve a @context + ... contextId=${implicit_id} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + Check Response Headers Containing Content-Type set to ${CONTENT_TYPE_JSON} ${response.headers} + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response.json()} ImplicitlyCreated + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response.json()} lastUsage + Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${response.json()} + + # We need to check the list of responses + #Check Context Response Body Containing a JSONObject with details of a ImplicitlyCreated @contexts + #... response=${response.json()} + #... expected_length=1 + +*** Keywords *** +Create initial ImplicitlyCreated @context + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 + + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + + Set Global Variable ${implicit_id} + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + +Delete Initial @context Data + Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END + Delete a @context ${implicit_id} \ No newline at end of file diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot new file mode 100644 index 00000000..38b4b08a --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot @@ -0,0 +1,73 @@ +*** Settings *** +Documentation Check that the numberOfHits is increased after using a ImplicitlyCreated context + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create initial ImplicitlyCreated @context +Test Teardown Delete Initial @context Data + + +*** Variables *** +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld +${testing_id_prefix}= urn:ngsi-ld:Testing: +${entityfile}= minimal-entity-using-@context.jsonld + + +*** Test Cases *** +053_08_01 Check that the numberOfHits is increased after using a ImplicitlyCreated context + [Documentation] Check that the numberOfHits is increased after using a ImplicitlyCreated context + [Tags] ctx-serve 5_13_4 + + ${entity_id}= Generate Random Entity Id ${testing_id_prefix} + Set Global Variable ${entity_id} + + Create Entity selecting @context ${entityfile} ${implicit_id} ${entity_id} + + ${response}= Serve a @context + ... contextId=${implicit_id} + ... details=true + + Check Response Status Code 200 ${response.status_code} + Check Context Response Body Containing numberOfHits value ${response.json()} 2 + + +*** Keywords *** +Create initial ImplicitlyCreated @context + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 + + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + + Check Context Response Body Containing numberOfHits value ${data} 1 + + Set Global Variable ${implicit_id} + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + +Delete Initial @context Data + Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END + Delete a @context ${implicit_id} + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot index f0984e64..e285dfbd 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot @@ -3,6 +3,7 @@ Documentation Check that you can add a hosted @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource +Variables ${EXECDIR}/resources/variables.py Test Teardown Delete Initial @context Test Template Add a valid @context @@ -48,4 +49,13 @@ Add a valid @context Log URI: ${response_serve} Delete Initial @context - Delete a @context ${uri} + ${response}= List @contexts true ${EMPTY} + # We need to extract all the contexts except the core context and delete them + FOR ${item} IN @{response.json()} + ${uri}= Get From Dictionary ${item} URL + IF '${uri}'=='${core_context}' + Log WARNING, Trying to delete the Core Context + ELSE + Delete a @context ${uri} + END + END diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot index 1f20b383..2fbaa65f 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot @@ -11,7 +11,6 @@ Test Template Add @context scenarios *** Variables *** ${wrong_context_filename}= @context-incorrect.json ${wrong_json_filename}= @context-wrong-json.json -${wrong_duplicated_key}= @context-duplicated-key.json ${reason_400}= Bad Request ${problem_type}= https://uri.etsi.org/ngsi-ld/errors/InvalidRequest diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot index 94aa7476..029e7b4a 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot @@ -1,61 +1,52 @@ -*** Comments *** -# POST /subscription (Content-Type: application/ld+json) -# { -# "@context: { "a: "http://a,b,c/a" }, -# "id": ... -# } -# -# implicitycreate @context - - *** Settings *** -Documentation Check that you can create a implicitycreate @context through creating a subscription +Documentation Check that you can create a implicitlycreated @context through creating a subscription Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Test Setup Create Initial Subscription -Test Teardown Delete Initial Subscription +Test Teardown Delete Initial @context Data *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: -${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld - +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld *** Test Cases *** 050_03_01 Check the creation of ImplicitelyCreted @context [Documentation] Check that you can create a subscription [Tags] sub-create 5_13_2 - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Set Suite Variable ${subscription_id} - ${response}= Create Subscription - ... ${subscription_id} - ... ${subscription_payload_file_path} - ... ${CONTENT_TYPE_LD_JSON} - ${expected_subscription}= Load Test Sample ${subscription_expectation_file_path} ${subscription_id} - ${response1}= Retrieve Subscription - ... id=${subscription_id} - ... accept=${CONTENT_TYPE_LD_JSON} - ... context=${ngsild_test_suite_context} - Check Created Resource Set To ${expected_subscription} ${response1.json()} + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 -*** Keywords *** -Create Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 ${response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - ${expected_subscription}= Load Test Sample ${subscription_expectation_file_path} ${subscription_id} - ${response1}= Retrieve Subscription - ... id=${subscription_id} - ... accept=${CONTENT_TYPE_LD_JSON} - ... context=${ngsild_test_suite_context} - Check Created Resource Set To ${expected_subscription} ${response1.json()} - -Delete Initial Subscription + + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + Set Global Variable ${implicit_id} + + Check Response Kind set to ${data} ImplicitlyCreated + +*** Keywords *** +Delete Initial @context Data Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END + Delete a @context ${implicit_id} \ No newline at end of file diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index ca190b72..01c8f175 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -40,4 +40,13 @@ ${reason_204}= No Content *** Keywords *** Delete Initial @context - Delete a @context ${uri} + ${response}= List @contexts true ${EMPTY} + # We need to extract all the contexts except the core context and delete them + FOR ${item} IN @{response.json()} + ${uri}= Get From Dictionary ${item} URL + IF '${uri}'=='${core_context}' + Log WARNING, Trying to delete the Core Context + ELSE + Delete a @context ${uri} + END + END diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot index 8d23700b..6eb144b3 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot @@ -9,8 +9,8 @@ ${reason_404}= Not Found *** Test Cases *** -051_02_01 Delete a @context whose kind is hosted without reload param and unknown @context identifier - [Documentation] Check that an error message is obtained in the response when we try to delete a @context without unknonwn id +051_02_01 Delete a @context with unknown @context identifier + [Documentation] Check that an error message is obtained in the response when we try to delete a @context with unknonwn id [Tags] ctx-serve 5_13_5 ${random_url}= Generate Random String 16 [NUMBERS] diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index 9860f455..0a82a73a 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -5,7 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial cached @context - +Test Teardown Delete Initial @context *** Variables *** ${filename}= @context-cached-one-valid.json @@ -13,8 +13,8 @@ ${reason_204}= No Content *** Test Cases *** -051_03_01 Delete a @context whose kind is hosted without reload param - [Documentation] Check that you can delete a hosted @context +051_03_01 Delete a @context whose kind is cached without reload param + [Documentation] Check that you can delete a cached @context [Tags] ctx-serve 5_13_5 ${response}= Delete a @context ${contextId} @@ -38,3 +38,15 @@ Create Initial cached @context Check Response Kind set to ${response.json()} Cached Set Global Variable ${contextId} + +Delete Initial @context + ${response}= List @contexts true ${EMPTY} + # We need to extract all the contexts except the core context and delete them + FOR ${item} IN @{response.json()} + ${uri}= Get From Dictionary ${item} URL + IF '${uri}'=='${core_context}' + Log WARNING, Trying to delete the Core Context + ELSE + Delete a @context ${uri} + END + END diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot index 8e1c9d2d..02cf0915 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot @@ -18,23 +18,21 @@ ${reason_422}= Unprocessable *** Test Cases *** CONTEXTID RELOAD STATUSCODE REASON ERROR -051_04_01 Delete a @contexts with a wrong id and reload equal to true +051_04_01 Delete a @contexts with a wrong id and reload set to true [Tags] ctx-delete 5_13_5 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -051_04_02 Delete a @contexts with a wrong id and reload equal to false +051_04_02 Delete a @contexts with a wrong id and reload set to false [Tags] ctx-delete 5_13_5 wrong_id_context false 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -051_04_03 Delete a @contexts with a wrong id and wrong reload value +051_04_03 Delete a @contexts with a wrong id and no reload value [Tags] ctx-delete 5_13_5 wrong_id_context ${EMPTY} 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_04 Delete a @contexts with a wrong id and wrong reload value [Tags] ctx-delete 5_13_5 wrong_id_context xxx 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -051_04_05 Delete a Hosted @contexts with a valid id and reload equal to true +051_04_05 Delete a Hosted @contexts with a valid id and reload set to true [Tags] ctx-delete 5_13_5 ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} -# TODO: reload=true and Implicitily created @context -# TODO: Check the case of reload=true and Cached context -> error downloading the @context: LdContextNotAvailable *** Keywords *** diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index 305cefd1..81c55ebd 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -13,8 +13,8 @@ Variables ${EXECDIR}/resources/variables.py Library HttpCtrl.Client Library HttpCtrl.Server -Test Setup Create Initial @context condition -Test Teardown Delete Initial @context condition +Test Setup Create Initial @context condition from an external server +Test Teardown Delete Initial @context condition from an external server *** Variables *** @@ -25,8 +25,8 @@ ${uri} /api/v1/context.jsonld *** Test Cases *** -051_05_01 Deleta and Reload a Cached @context with no communication with the Context Server - [Documentation] Check that you get an error if we try to reload a cached context with no communicatino with the context server +051_05_01 Delete and Reload a Cached @context with no communication with the Context Server + [Documentation] Check that you get an error if we try to reload a cached context with no communication with the context server [Tags] ctx-serve 5_13_5 ${response}= Delete a @context ${uri} true @@ -39,7 +39,7 @@ ${uri} /api/v1/context.jsonld *** Keywords *** -Create Initial @context condition +Create Initial @context condition from an external server Start @context Local Server ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} @@ -56,7 +56,7 @@ Create Initial @context condition Stop @context Local Server -Delete Initial @context condition +Delete Initial @context condition from an external server Log Delete initial contidions Delete Entity by Id ${entity_context_id} Delete a @context ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot new file mode 100644 index 00000000..928968e3 --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot @@ -0,0 +1,62 @@ +*** Settings *** +Documentation Delete a @context whose kind is ImplicitlyCreated without reload param + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Setup Create initial ImplicitlyCreated @context +Test Teardown Delete Initial @context Data + + +*** Variables *** +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld +${reason_204}= No Content + + +*** Test Cases *** +051_06_01 Delete a @context whose kind is ImplicitlyCreated without reload param + [Documentation] Check that we can delete a ImplicitlyCreated @context + [Tags] ctx-serve 5_13_5 + + ${response}= Delete a @context ${implicit_id} + + Check Response Status Code 204 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_204} + Check Response Does Not Contain Body ${response} + + +*** Keywords *** +Create initial ImplicitlyCreated @context + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 + + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + + Check Context Response Body Containing numberOfHits value ${data} 1 + + Set Global Variable ${implicit_id} + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + +Delete Initial @context Data + Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot new file mode 100644 index 00000000..77862af6 --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot @@ -0,0 +1,59 @@ +*** Settings *** +Documentation Check that you cannot delete a ImplicitlyCreated @context with reload set to true + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource + +Test Setup Create initial ImplicitlyCreated @context +Test Teardown Delete Initial @context Data + + +*** Variables *** +${subscription_payload_file_path}= jsonldContext/subscription-with-implicitlycreated-contexts.jsonld +${reason_400}= Bad Request + + +*** Test Cases *** +051_07_01 Delete a ImplicitlyCreated @contexts with a valid id and reload set to true + [Documentation] Check that you cannot delete a ImplicitlyCreated @context with reload set to true + [Tags] ctx-delete 5_13_5 + + ${response}= Delete a @context ${implicit_id} true + + Check Response Status Code 400 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_400} + Check Response Body Containing ProblemDetails Element ${response.json()} ${ERROR_TYPE_BAD_REQUEST_DATA} + +*** Keywords *** +Create initial ImplicitlyCreated @context + ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} + + ${subscription_id}= Get Value From JSON ${subscription_payload} $..id + ${subscription_id}= Get From List ${subscription_id} 0 + + ${list_contexts}= Get Value From JSON ${subscription_payload} $..@context + ${list_contexts}= Get From List ${list_contexts} 0 + + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + + ${response}= List @contexts true ImplicitlyCreated + + Check Response Status Code 200 ${response.status_code} + + ${data}= Get From List ${response.json()} 0 + ${implicit_id}= Get From Dictionary ${data} URL + + Set Global Variable ${implicit_id} + Set Suite Variable ${subscription_id} + Set Suite Variable ${list_contexts} + +Delete Initial @context Data + Delete Subscription ${subscription_id} + FOR ${uri} IN @{list_contexts} + Log URI: ${uri} + Delete a @context ${uri} + END + Delete a @context ${implicit_id} \ No newline at end of file diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot new file mode 100644 index 00000000..29ba8a1c --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Check that you get an error when try to delete the core @context + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Template Delete a core @context + + +*** Variables *** +${reason_400}= Bad Request +${type}= https://uri.etsi.org/ngsi-ld/errors/BadRequestData + + +*** Test Cases *** RELOAD +051_08_01 Delete a core @contexts and return an error with no reload + [Tags] ctx-delete 5_13_5 + ${EMPTY} +051_08_02 Delete a core @contexts and return an error with reload set to false + [Tags] ctx-delete 5_13_5 + false + + +*** Keywords *** +Delete a core @context + [Documentation] Check that you get an error when try to delete the core @context + [Arguments] ${reload} + + ${response}= Delete a @context ${core_context} ${reload} + + Check Response Status Code 400 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_400} + Check Response Body Containing ProblemDetails Element ${response.json()} ${type} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot new file mode 100644 index 00000000..99e62939 --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot @@ -0,0 +1,38 @@ +*** Settings *** +Documentation Check that you get an error when try to delete the core @context + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Variables ${EXECDIR}/resources/variables.py + +Test Setup Delete core context and reload it + +*** Variables *** +${reason_400}= Bad Request +${reason_404}= Not Found +${reason_422}= Unprocessable +${type}= https://uri.etsi.org/ngsi-ld/errors/BadRequestData + + +*** Test Cases *** +051_09_01 Delete a core @contexts with reload set to true and check if the context has been download again by the broker + [Documentation] Delete a core @contexts with reload set to true and check downloaded core context + [Tags] ctx-delete 5_13_5 + # TODO: There is something to change in the spec to faciliate checking if the core context was really updated + + ${response}= Serve a @context + ... contextId=${core_context} + ... details=true + + Check Response Status Code 200 ${response.status_code} + +*** Keywords *** +Delete core context and reload it + ${response}= Serve a @context + ... contextId=${core_context} + ... details=true + Check Response Status Code 200 ${response.status_code} + + ${response}= Delete a @context ${core_context} true + Check Response Status Code 204 ${response.status_code} + diff --git a/data/jsonldContext/subscription-with-implicitlycreated-contexts.jsonld b/data/jsonldContext/subscription-with-implicitlycreated-contexts.jsonld new file mode 100644 index 00000000..6df8fa70 --- /dev/null +++ b/data/jsonldContext/subscription-with-implicitlycreated-contexts.jsonld @@ -0,0 +1,18 @@ +{ + "id": "urn:ngsi-ld:subscriptions:01", + "type": "Subscription", + "entities": [ + { + "type": "T1" + } + ], + "notification": { + "endpoint": { + "uri": "http://a.b.c/123" + } + }, + "@context": [ + "https://fiware.github.io/NGSI-LD_TestSuite/ldContext/testContext.jsonld", + "http://smartdatamodels.org/context.jsonld" + ] +} \ No newline at end of file diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 16f44d52..2e237eab 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -30,7 +30,7 @@ class GenerateRobotData: 'Consumption': 'Cons', 'Provision': 'Prov', 'ContextSource': 'CS', - 'JSON-LD@contextServer': 'CTX', + 'jsonldContext': 'CTX', 'Cons/ListContexts': 'Cons', 'Cons/ServeContext': 'Cons', 'Prov/AddContext': 'Prov', diff --git a/doc/analysis/initial_setup.py b/doc/analysis/initial_setup.py index a0b6c416..3dd79db0 100644 --- a/doc/analysis/initial_setup.py +++ b/doc/analysis/initial_setup.py @@ -32,7 +32,12 @@ class InitialSetup: 'Setup Initial Context Source Registration Subscriptions': InitialSetup.init_csr_subs(), 'Create Initial Context Source Registration and Mock Server': InitialSetup.init_csr_and_server(), 'Create Initial set of @contexts': InitialSetup.create_set_contexts(), - 'Create Initial @context': InitialSetup.create_context() + 'Create Initial @context': InitialSetup.create_context(), + 'Create Initial cached @context': InitialSetup.created_cached_context(), + 'Create initial ImplicitlyCreated @context': InitialSetup.create_implictlycreated_context(), + 'Create Initial hosted @context': InitialSetup.create_hosted_context(), + 'Create Initial @context condition from an external server': InitialSetup.create_from_external_server(), + 'Delete core context and reload it': InitialSetup.delete_core_context() } self.total_files = -1 @@ -193,6 +198,41 @@ class InitialSetup: }''' return data + @staticmethod + def created_cached_context(): + data = '''with { + the SUT containing a Cached @context added from a URL. + }''' + return data + + @staticmethod + def create_implictlycreated_context(): + data = '''with { + the SUT containing a ImplicitlyCreated @context created from a subscription query. + }''' + return data + + @staticmethod + def create_hosted_context(): + data = '''with { + the SUT containing a Hosted @context and the default Cached Core Context. + }''' + return data + + @staticmethod + def create_from_external_server(): + data = '''with { + the SUT containing a Cached @context created from a entity creation through downloading from external server. + }''' + return data + + @staticmethod + def delete_core_context(): + data = '''with { + the SUT containing a core context and it has been deleted with reload set to true. + }''' + return data + def get_property_values(self, root_folder: str, property_name: str) -> [str, str]: robot_files_without_setup = list() robot_files_with_setup = list() @@ -239,18 +279,15 @@ class InitialSetup: deleted_setup = [item for item in keys if item not in self.code] not_included_keys = [item for item in self.code if item not in keys] - print('Checking the Setup functions...') - if len(deleted_setup) != 0: - print(f" WARNING: Some of the Setup functions were deleted:\n{deleted_setup}") - else: - print(f" INFO: All current Setup functions are used in the Robot files") + if len(deleted_setup) != 0 or len(not_included_keys) != 0: + print('Checking the Setup functions...') + if len(deleted_setup) != 0: + print(f" WARNING: Some of the Setup functions were deleted or not implemented:\n{deleted_setup}") - if len(not_included_keys) != 0: - print(f" ERROR: Some Setup functions are not include in the Class:\n{not_included_keys}") - else: - print(f" INFO: All the current Setup functions used in Robot files are included in the Class") + if len(not_included_keys) != 0: + print(f" ERROR: Some Setup functions are not include in the Class:\n{not_included_keys}") - print() + print() def generate_dictionaries(self): folder = "/home/fla/Documents/workspace/bdd/ngsi-ld-test-suite/doc/files" diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index 42c970be..1d59c5fc 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -643,7 +643,7 @@ class Requests: @staticmethod def serve_a_context(kwargs) -> str: - if 'update_option' not in kwargs: + if 'details' not in kwargs: kwargs['details'] = '${EMPTY}' response = f"Serve a @context with contextID '{kwargs['contextId']}' and details '{kwargs['details']}'" diff --git a/doc/files/JSON-LD@contextServer/Provision/050_03.json b/doc/files/JSON-LD@contextServer/Provision/050_03.json deleted file mode 100644 index 63c4393f..00000000 --- a/doc/files/JSON-LD@contextServer/Provision/050_03.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "tp_id": "TP/NGSI-LD/CTX/Prov/050_03", - "test_objective": "Check that you can create a implicitycreate @context through creating a subscription", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", - "config_id": "", - "parent_release": "v1.3.1", - "pics_selection": "PICS_5_13_2", - "keywords": [ - "Create Initial Subscription", - "Delete Initial Subscription" - ], - "teardown": "None", - "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id} \n}", - "test_cases": [ - { - "name": "050_03_01 Check the creation of ImplicitelyCreted @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_03_01", - "doc": "Check that you can create a subscription", - "tags": [ - "5_13_2", - "sub-create" - ], - "setup": "Create Initial Subscription", - "teardown": "Delete Initial Subscription", - "template": null, - "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscriptions/subscription-sample.jsonld'\n}", - "http_verb": "POST", - "endpoint": "subscriptions/" - } - ], - "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/AddContext", - "robotfile": "050_03" -} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_01.json b/doc/files/jsonldContext/Consumption/052_01.json similarity index 99% rename from doc/files/JSON-LD@contextServer/Consumption/052_01.json rename to doc/files/jsonldContext/Consumption/052_01.json index f9a494cf..0aab383d 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/052_01.json +++ b/doc/files/jsonldContext/Consumption/052_01.json @@ -144,6 +144,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotpath": "jsonldContext/Consumption/ListContexts", "robotfile": "052_01" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_02.json b/doc/files/jsonldContext/Consumption/052_02.json similarity index 99% rename from doc/files/JSON-LD@contextServer/Consumption/052_02.json rename to doc/files/jsonldContext/Consumption/052_02.json index 90b47ca4..c280b3e7 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/052_02.json +++ b/doc/files/jsonldContext/Consumption/052_02.json @@ -146,6 +146,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotpath": "jsonldContext/Consumption/ListContexts", "robotfile": "052_02" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_03.json b/doc/files/jsonldContext/Consumption/052_03.json similarity index 99% rename from doc/files/JSON-LD@contextServer/Consumption/052_03.json rename to doc/files/jsonldContext/Consumption/052_03.json index 80ed4a7a..9afa1490 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/052_03.json +++ b/doc/files/jsonldContext/Consumption/052_03.json @@ -146,6 +146,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotpath": "jsonldContext/Consumption/ListContexts", "robotfile": "052_03" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_04.json b/doc/files/jsonldContext/Consumption/052_04.json similarity index 91% rename from doc/files/JSON-LD@contextServer/Consumption/052_04.json rename to doc/files/jsonldContext/Consumption/052_04.json index 29bd2d7b..cb26d080 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/052_04.json +++ b/doc/files/jsonldContext/Consumption/052_04.json @@ -12,7 +12,7 @@ "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ { - "name": "052_04_01 List @contexts with no details and kind equal to other and not previously created @context", + "name": "052_04_01 List @contexts with no details and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_01", "doc": "Check that you can list @contexts", "tags": [ @@ -28,7 +28,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_04_02 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", + "name": "052_04_02 List @contexts with details set to other and no kind and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_02", "doc": "Check that you can list @contexts", "tags": [ @@ -44,7 +44,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_04_03 List @contexts with details equal to false and kind equal to other and not previously created @context", + "name": "052_04_03 List @contexts with details set to other and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_03", "doc": "Check that you can list @contexts", "tags": [ @@ -60,7 +60,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_04_04 List @contexts with no details and kind equal to other and not previously created @context", + "name": "052_04_04 List @contexts with details set to true and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_04", "doc": "Check that you can list @contexts", "tags": [ @@ -76,7 +76,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_04_05 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", + "name": "052_04_05 List @contexts with details set to other and kind set to Hosted and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_05", "doc": "Check that you can list @contexts", "tags": [ @@ -95,6 +95,6 @@ "permutations": [ "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotpath": "jsonldContext/Consumption/ListContexts", "robotfile": "052_04" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/052_05.json b/doc/files/jsonldContext/Consumption/052_05.json similarity index 90% rename from doc/files/JSON-LD@contextServer/Consumption/052_05.json rename to doc/files/jsonldContext/Consumption/052_05.json index e06ef6d2..d24be4ac 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/052_05.json +++ b/doc/files/jsonldContext/Consumption/052_05.json @@ -14,7 +14,7 @@ "initial_condition": "with {\n the SUT containing a set of three Hosted @contexts and the default Cached Core Context.\n }", "test_cases": [ { - "name": "052_05_01 List @contexts with details equal to false and no kind and with previously several add @context", + "name": "052_05_01 List @contexts with details set to true and no kind and with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_01", "doc": "Check that you can list @contexts", "tags": [ @@ -30,7 +30,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_05_02 List @contexts with details equal to false and kind equal to hosted and with previously several add @context", + "name": "052_05_02 List @contexts with details set to true and kind set to hosted and with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_02", "doc": "Check that you can list @contexts", "tags": [ @@ -46,7 +46,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_05_03 List @contexts with details equal to false and kind equal to cached abd with previously several add @context", + "name": "052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_03", "doc": "Check that you can list @contexts", "tags": [ @@ -62,7 +62,7 @@ "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_05_04 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context", + "name": "052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_04", "doc": "Check that you can list @contexts", "tags": [ @@ -82,6 +82,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ListContexts", + "robotpath": "jsonldContext/Consumption/ListContexts", "robotfile": "052_05" } \ No newline at end of file diff --git a/doc/files/jsonldContext/Consumption/052_06.json b/doc/files/jsonldContext/Consumption/052_06.json new file mode 100644 index 00000000..1f003660 --- /dev/null +++ b/doc/files/jsonldContext/Consumption/052_06.json @@ -0,0 +1,151 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_06", + "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_3", + "keywords": [ + "List @contexts with no previous created @context", + "Create initial ImplicitlyCreated @context", + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", + "test_cases": [ + { + "name": "052_06_01 List @contexts with neither details or kind and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_01", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_02 List @contexts with no details and kind set to hosted and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_02", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_03 List @contexts with no details and kind set to cached and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_03", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_04 List @contexts with no details and kind set to implicitlycreated and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_04", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_05 List @contexts with details set to false and no kind and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_05", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_06 List @contexts with details set to false and kind equal to hosted and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_06", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_07 List @contexts with details set to false and kind equal to cached and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_07", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + }, + { + "name": "052_06_08 List @contexts with details set to false and kind equal to implicitlycreated and a created ImplicitlyCreated @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_08", + "doc": "Check that you can list @contexts", + "tags": [ + "5_13_3", + "ctx-list" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": "List @contexts with no previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "jsonldContext/Consumption/ListContexts", + "robotfile": "052_06" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_01.json b/doc/files/jsonldContext/Consumption/053_01.json similarity index 95% rename from doc/files/JSON-LD@contextServer/Consumption/053_01.json rename to doc/files/jsonldContext/Consumption/053_01.json index 45ce9e8a..bc34220a 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_01.json +++ b/doc/files/jsonldContext/Consumption/053_01.json @@ -41,12 +41,14 @@ "teardown": "Delete Initial @context", "template": "Serve a @context with details", "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain the @context `@context-minimal-valid.json'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'false'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } ], - "permutations": [], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "permutations": [ + "when" + ], + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_01" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_02.json b/doc/files/jsonldContext/Consumption/053_02.json similarity index 92% rename from doc/files/JSON-LD@contextServer/Consumption/053_02.json rename to doc/files/jsonldContext/Consumption/053_02.json index 04bc251f..0fddc86f 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_02.json +++ b/doc/files/jsonldContext/Consumption/053_02.json @@ -14,7 +14,7 @@ "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", "test_cases": [ { - "name": "053_02_01 Serve a @context with details equal to True", + "name": "053_02_01 Serve a @context with details set to True", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_02_01", "doc": "Check that you can serve a @context with details", "tags": [ @@ -25,12 +25,12 @@ "teardown": "Delete Initial @context", "template": "Serve a @context with details equal to true", "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Hosted', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_02" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_03.json b/doc/files/jsonldContext/Consumption/053_03.json similarity index 94% rename from doc/files/JSON-LD@contextServer/Consumption/053_03.json rename to doc/files/jsonldContext/Consumption/053_03.json index 6117c2ba..044ebdd8 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_03.json +++ b/doc/files/jsonldContext/Consumption/053_03.json @@ -25,7 +25,7 @@ "teardown": "Delete Initial @context", "template": "Serve @context with no previous created @context", "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 404 and\n Serve a @context with Response reason set to 'Not Found' and\n Serve a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'wrong_id_context' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'wrong_id_context' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" }, @@ -41,7 +41,7 @@ "teardown": "Delete Initial @context", "template": "Serve @context with no previous created @context", "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 400 and\n Serve a @context with Response reason set to 'Bad Request' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'other'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" }, @@ -57,7 +57,7 @@ "teardown": "Delete Initial @context", "template": "Serve @context with no previous created @context", "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 422 and\n Serve a @context with Response reason set to 'Unprocessable Content' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' and details 'false'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } @@ -66,6 +66,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_03" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_04.json b/doc/files/jsonldContext/Consumption/053_04.json similarity index 63% rename from doc/files/JSON-LD@contextServer/Consumption/053_04.json rename to doc/files/jsonldContext/Consumption/053_04.json index a0c4a12d..58e418a0 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_04.json +++ b/doc/files/jsonldContext/Consumption/053_04.json @@ -1,35 +1,35 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_04", "test_objective": "Check that you can get an increase numberOfHits after creation of a Hosted @context and using it", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.3.1", - "pics_selection": "PICS_5_13_5", + "pics_selection": "PICS_5_13_4", "keywords": [ - "Create Initial @context condition", - "Delete Initial @context condition" + "Create Initial @context condition from an external server", + "Delete Initial @context condition from an external server" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Cached @context created from a entity creation through downloading from external server.\n }", "test_cases": [ { "name": "053_04_01 Check that the numberOfHits is increased after using a Hosted context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_04_01", "doc": "Check that the numberOfHits is increased after using a Hosted context", "tags": [ - "5_13_5", + "5_13_4", "ctx-serve" ], - "setup": "Create Initial @context condition", - "teardown": "Delete Initial @context condition", + "setup": "Create Initial @context condition from an external server", + "teardown": "Delete Initial @context condition from an external server", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_04" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_05.json b/doc/files/jsonldContext/Consumption/053_05.json similarity index 75% rename from doc/files/JSON-LD@contextServer/Consumption/053_05.json rename to doc/files/jsonldContext/Consumption/053_05.json index a369fb3b..72476bbc 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_05.json +++ b/doc/files/jsonldContext/Consumption/053_05.json @@ -1,35 +1,35 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_05", "test_objective": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.3.1", - "pics_selection": "PICS_5_13_5", + "pics_selection": "PICS_5_13_4", "keywords": [ - "Create Initial @context condition", - "Delete Initial @context condition" + "Create Initial @context condition from an external server", + "Delete Initial @context condition from an external server" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Cached @context created from a entity creation through downloading from external server.\n }", "test_cases": [ { "name": "053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_05_01", "doc": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", "tags": [ - "5_13_5", + "5_13_4", "ctx-serve" ], - "setup": "Create Initial @context condition", - "teardown": "Delete Initial @context condition", + "setup": "Create Initial @context condition from an external server", + "teardown": "Delete Initial @context condition from an external server", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_05" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Consumption/053_06.json b/doc/files/jsonldContext/Consumption/053_06.json similarity index 57% rename from doc/files/JSON-LD@contextServer/Consumption/053_06.json rename to doc/files/jsonldContext/Consumption/053_06.json index 93f37134..53ba175f 100644 --- a/doc/files/JSON-LD@contextServer/Consumption/053_06.json +++ b/doc/files/jsonldContext/Consumption/053_06.json @@ -1,35 +1,35 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_06", - "test_objective": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "test_objective": "Check that the numberOfHits is increased after using a Cached context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.3.1", - "pics_selection": "PICS_5_13_5", + "pics_selection": "PICS_5_13_4", "keywords": [ - "Create Initial @context condition", - "Delete Initial @context condition" + "Create Initial @context condition from an external server", + "Delete Initial @context condition from an external server" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Cached @context created from a entity creation through downloading from external server.\n }", "test_cases": [ { "name": "053_06_01 Check that the numberOfHits is increased after using a Cached context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_06_01", "doc": "Check that the numberOfHits is increased after using a Cached context", "tags": [ - "5_13_5", + "5_13_4", "ctx-serve" ], - "setup": "Create Initial @context condition", - "teardown": "Delete Initial @context condition", + "setup": "Create Initial @context condition from an external server", + "teardown": "Delete Initial @context condition from an external server", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details '${EMPTY}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Consumption/ServeContext", + "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_06" } \ No newline at end of file diff --git a/doc/files/jsonldContext/Consumption/053_07.json b/doc/files/jsonldContext/Consumption/053_07.json new file mode 100644 index 00000000..e6146684 --- /dev/null +++ b/doc/files/jsonldContext/Consumption/053_07.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_07", + "test_objective": "Check that we can serve a ImplicitlyCreated @context with details set to true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_4", + "keywords": [ + "Create initial ImplicitlyCreated @context", + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", + "test_cases": [ + { + "name": "053_07_01 Check that we can serve a ImplicitlyCreated @context with details set to true", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_07_01", + "doc": "Check that we can serve a ImplicitlyCreated @context with details set to true", + "tags": [ + "5_13_4", + "sub-create" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'ImplicitlyCreated', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${implicit_id}' and details 'true'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Consumption/ServeContext", + "robotfile": "053_07" +} \ No newline at end of file diff --git a/doc/files/jsonldContext/Consumption/053_08.json b/doc/files/jsonldContext/Consumption/053_08.json new file mode 100644 index 00000000..e7f4ab39 --- /dev/null +++ b/doc/files/jsonldContext/Consumption/053_08.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/053_08", + "test_objective": "Check that the numberOfHits is increased after using a ImplicitlyCreated context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_4", + "keywords": [ + "Create initial ImplicitlyCreated @context", + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", + "test_cases": [ + { + "name": "053_08_01 Check that the numberOfHits is increased after using a ImplicitlyCreated context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_08_01", + "doc": "Check that the numberOfHits is increased after using a ImplicitlyCreated context", + "tags": [ + "5_13_4", + "ctx-serve" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${implicit_id}' and details 'true'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Consumption/ServeContext", + "robotfile": "053_08" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_01.json b/doc/files/jsonldContext/Provision/050_01.json similarity index 97% rename from doc/files/JSON-LD@contextServer/Provision/050_01.json rename to doc/files/jsonldContext/Provision/050_01.json index 652b0684..57437599 100644 --- a/doc/files/JSON-LD@contextServer/Provision/050_01.json +++ b/doc/files/jsonldContext/Provision/050_01.json @@ -48,6 +48,6 @@ "permutations": [ "when" ], - "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotpath": "jsonldContext/Provision/AddContext", "robotfile": "050_01" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_02.json b/doc/files/jsonldContext/Provision/050_02.json similarity index 97% rename from doc/files/JSON-LD@contextServer/Provision/050_02.json rename to doc/files/jsonldContext/Provision/050_02.json index 3d5f81f8..26869ef8 100644 --- a/doc/files/JSON-LD@contextServer/Provision/050_02.json +++ b/doc/files/jsonldContext/Provision/050_02.json @@ -48,6 +48,6 @@ "permutations": [ "when" ], - "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotpath": "jsonldContext/Provision/AddContext", "robotfile": "050_02" } \ No newline at end of file diff --git a/doc/files/jsonldContext/Provision/050_03.json b/doc/files/jsonldContext/Provision/050_03.json new file mode 100644 index 00000000..b914e842 --- /dev/null +++ b/doc/files/jsonldContext/Provision/050_03.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/050_03", + "test_objective": "Check that you can create a implicitlycreated @context through creating a subscription", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_2", + "keywords": [ + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "050_03_01 Check the creation of ImplicitelyCreted @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_03_01", + "doc": "Check that you can create a subscription", + "tags": [ + "5_13_2", + "sub-create" + ], + "setup": null, + "teardown": "Delete Initial @context Data", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Subscription with Response Status Code set to 200 and\n Notification with Check that the Kind of the @context is set to 'ImplicitlyCreated'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Provision/AddContext", + "robotfile": "050_03" +} \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/050_04.json b/doc/files/jsonldContext/Provision/050_04.json similarity index 96% rename from doc/files/JSON-LD@contextServer/Provision/050_04.json rename to doc/files/jsonldContext/Provision/050_04.json index 718b25a6..2bd94b0b 100644 --- a/doc/files/JSON-LD@contextServer/Provision/050_04.json +++ b/doc/files/jsonldContext/Provision/050_04.json @@ -29,6 +29,6 @@ } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/AddContext", + "robotpath": "jsonldContext/Provision/AddContext", "robotfile": "050_04" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_01.json b/doc/files/jsonldContext/Provision/051_01.json similarity index 88% rename from doc/files/JSON-LD@contextServer/Provision/051_01.json rename to doc/files/jsonldContext/Provision/051_01.json index c4748c9f..4ad9208f 100644 --- a/doc/files/JSON-LD@contextServer/Provision/051_01.json +++ b/doc/files/jsonldContext/Provision/051_01.json @@ -9,7 +9,7 @@ "Create Initial hosted @context" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", "test_cases": [ { "name": "051_01_01 Delete a @context whose kind is hosted without reload param", @@ -29,6 +29,6 @@ } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotpath": "jsonldContext/Provision/DeleteContext", "robotfile": "051_01" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_02.json b/doc/files/jsonldContext/Provision/051_02.json similarity index 86% rename from doc/files/JSON-LD@contextServer/Provision/051_02.json rename to doc/files/jsonldContext/Provision/051_02.json index 7bc96d22..793c031c 100644 --- a/doc/files/JSON-LD@contextServer/Provision/051_02.json +++ b/doc/files/jsonldContext/Provision/051_02.json @@ -10,9 +10,9 @@ "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ { - "name": "051_02_01 Delete a @context whose kind is hosted without reload param and unknown @context identifier", + "name": "051_02_01 Delete a @context with unknown @context identifier", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_02_01", - "doc": "Check that an error message is obtained in the response when we try to delete a @context without unknonwn id", + "doc": "Check that an error message is obtained in the response when we try to delete a @context with unknonwn id", "tags": [ "5_13_5", "ctx-serve" @@ -27,6 +27,6 @@ } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotpath": "jsonldContext/Provision/DeleteContext", "robotfile": "051_02" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_03.json b/doc/files/jsonldContext/Provision/051_03.json similarity index 75% rename from doc/files/JSON-LD@contextServer/Provision/051_03.json rename to doc/files/jsonldContext/Provision/051_03.json index fc216e76..d607c0ea 100644 --- a/doc/files/JSON-LD@contextServer/Provision/051_03.json +++ b/doc/files/jsonldContext/Provision/051_03.json @@ -6,21 +6,22 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_13_5", "keywords": [ - "Create Initial cached @context" + "Create Initial cached @context", + "Delete Initial @context" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Cached @context added from a URL.\n }", "test_cases": [ { - "name": "051_03_01 Delete a @context whose kind is hosted without reload param", + "name": "051_03_01 Delete a @context whose kind is cached without reload param", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_03_01", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that you can delete a cached @context", "tags": [ "5_13_5", "ctx-serve" ], "setup": "Create Initial cached @context", - "teardown": null, + "teardown": "Delete Initial @context", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 204 and\n Delete a @context with Response reason set to 'No Content' and\n Delete a @context with Response does not contain a body\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${contextId}'\n}", @@ -29,6 +30,6 @@ } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotpath": "jsonldContext/Provision/DeleteContext", "robotfile": "051_03" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_04.json b/doc/files/jsonldContext/Provision/051_04.json similarity index 97% rename from doc/files/JSON-LD@contextServer/Provision/051_04.json rename to doc/files/jsonldContext/Provision/051_04.json index 76df602f..749ab3c1 100644 --- a/doc/files/JSON-LD@contextServer/Provision/051_04.json +++ b/doc/files/jsonldContext/Provision/051_04.json @@ -14,7 +14,7 @@ "initial_condition": "with {\n the SUT containing a Hosted @context and the default Cached Core Context.\n }", "test_cases": [ { - "name": "051_04_01 Delete a @contexts with a wrong id and reload equal to true", + "name": "051_04_01 Delete a @contexts with a wrong id and reload set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_01", "doc": "Check that you can delete a hosted @context", "tags": [ @@ -30,7 +30,7 @@ "endpoint": "jsonldContexts/{contextId}" }, { - "name": "051_04_02 Delete a @contexts with a wrong id and reload equal to false", + "name": "051_04_02 Delete a @contexts with a wrong id and reload set to false", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_02", "doc": "Check that you can delete a hosted @context", "tags": [ @@ -46,7 +46,7 @@ "endpoint": "jsonldContexts/{contextId}" }, { - "name": "051_04_03 Delete a @contexts with a wrong id and wrong reload value", + "name": "051_04_03 Delete a @contexts with a wrong id and no reload value", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_03", "doc": "Check that you can delete a hosted @context", "tags": [ @@ -78,7 +78,7 @@ "endpoint": "jsonldContexts/{contextId}" }, { - "name": "051_04_05 Delete a Hosted @contexts with a valid id and reload equal to true", + "name": "051_04_05 Delete a Hosted @contexts with a valid id and reload set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_05", "doc": "Check that you can delete a hosted @context", "tags": [ @@ -98,6 +98,6 @@ "then", "when" ], - "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotpath": "jsonldContext/Provision/DeleteContext", "robotfile": "051_04" } \ No newline at end of file diff --git a/doc/files/JSON-LD@contextServer/Provision/051_05.json b/doc/files/jsonldContext/Provision/051_05.json similarity index 71% rename from doc/files/JSON-LD@contextServer/Provision/051_05.json rename to doc/files/jsonldContext/Provision/051_05.json index d39fb4f9..2e413fab 100644 --- a/doc/files/JSON-LD@contextServer/Provision/051_05.json +++ b/doc/files/jsonldContext/Provision/051_05.json @@ -6,22 +6,22 @@ "parent_release": "v1.3.1", "pics_selection": "PICS_5_13_5", "keywords": [ - "Create Initial @context condition", - "Delete Initial @context condition" + "Create Initial @context condition from an external server", + "Delete Initial @context condition from an external server" ], "teardown": "None", - "initial_condition": "with {\n the SUT containing an initial state\n}", + "initial_condition": "with {\n the SUT containing a Cached @context created from a entity creation through downloading from external server.\n }", "test_cases": [ { - "name": "051_05_01 Deleta and Reload a Cached @context with no communication with the Context Server", + "name": "051_05_01 Delete and Reload a Cached @context with no communication with the Context Server", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_05_01", - "doc": "Check that you get an error if we try to reload a cached context with no communicatino with the context server", + "doc": "Check that you get an error if we try to reload a cached context with no communication with the context server", "tags": [ "5_13_5", "ctx-serve" ], - "setup": "Create Initial @context condition", - "teardown": "Delete Initial @context condition", + "setup": "Create Initial @context condition from an external server", + "teardown": "Delete Initial @context condition from an external server", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 503 and\n Delete a @context with Response reason set to 'Service Unavailable' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/LdContextNotAvailable' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${uri}'\n}", @@ -30,6 +30,6 @@ } ], "permutations": [], - "robotpath": "JSON-LD@contextServer/Provision/DeleteContext", + "robotpath": "jsonldContext/Provision/DeleteContext", "robotfile": "051_05" } \ No newline at end of file diff --git a/doc/files/jsonldContext/Provision/051_06.json b/doc/files/jsonldContext/Provision/051_06.json new file mode 100644 index 00000000..15290a2d --- /dev/null +++ b/doc/files/jsonldContext/Provision/051_06.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_06", + "test_objective": "Delete a @context whose kind is ImplicitlyCreated without reload param", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create initial ImplicitlyCreated @context", + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", + "test_cases": [ + { + "name": "051_06_01 Delete a @context whose kind is ImplicitlyCreated without reload param", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_06_01", + "doc": "Check that we can delete a ImplicitlyCreated @context", + "tags": [ + "5_13_5", + "ctx-serve" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 204 and\n Delete a @context with Response reason set to 'No Content' and\n Delete a @context with Response does not contain a body\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${implicit_id}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Provision/DeleteContext", + "robotfile": "051_06" +} \ No newline at end of file diff --git a/doc/files/jsonldContext/Provision/051_07.json b/doc/files/jsonldContext/Provision/051_07.json new file mode 100644 index 00000000..22ba8b49 --- /dev/null +++ b/doc/files/jsonldContext/Provision/051_07.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_07", + "test_objective": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Create initial ImplicitlyCreated @context", + "Delete Initial @context Data" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", + "test_cases": [ + { + "name": "051_07_01 Delete a ImplicitlyCreated @contexts with a valid id and reload set to true", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_07_01", + "doc": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Create initial ImplicitlyCreated @context", + "teardown": "Delete Initial @context Data", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to '${implicit_id}'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Provision/DeleteContext", + "robotfile": "051_07" +} \ No newline at end of file diff --git a/doc/files/jsonldContext/Provision/051_08.json b/doc/files/jsonldContext/Provision/051_08.json new file mode 100644 index 00000000..82790061 --- /dev/null +++ b/doc/files/jsonldContext/Provision/051_08.json @@ -0,0 +1,50 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_08", + "test_objective": "Check that you get an error when try to delete the core @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Delete a core @context" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "051_08_01 Delete a core @contexts and return an error with no reload", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_08_01", + "doc": "Check that you get an error when try to delete the core @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": null, + "teardown": null, + "template": "Delete a core @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + }, + { + "name": "051_08_02 Delete a core @contexts and return an error with reload set to false", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_08_02", + "doc": "Check that you get an error when try to delete the core @context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": null, + "teardown": null, + "template": "Delete a core @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Provision/DeleteContext", + "robotfile": "051_08" +} \ No newline at end of file diff --git a/doc/files/jsonldContext/Provision/051_09.json b/doc/files/jsonldContext/Provision/051_09.json new file mode 100644 index 00000000..b5b2c9b4 --- /dev/null +++ b/doc/files/jsonldContext/Provision/051_09.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Prov/051_09", + "test_objective": "Check that you get an error when try to delete the core @context", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_13_5", + "keywords": [ + "Delete core context and reload it" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a core context and it has been deleted with reload set to true.\n }", + "test_cases": [ + { + "name": "051_09_01 Delete a core @contexts with reload set to true and check if the context has been download again by the broker", + "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_09_01", + "doc": "Delete a core @contexts with reload set to true and check downloaded core context", + "tags": [ + "5_13_5", + "ctx-delete" + ], + "setup": "Delete core context and reload it", + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Serve a @context with Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' and details 'true'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts/{contextId}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Provision/DeleteContext", + "robotfile": "051_09" +} \ No newline at end of file diff --git a/doc/tests/test_CheckTests.py b/doc/tests/test_CheckTests.py index e151767e..0845934a 100644 --- a/doc/tests/test_CheckTests.py +++ b/doc/tests/test_CheckTests.py @@ -3,6 +3,7 @@ from re import findall from unittest import TestCase from os.path import dirname, join, basename, splitext from os import walk +from json import dumps class TestCheckTests(TestCase): @@ -60,8 +61,9 @@ class TestCheckTests(TestCase): def test_specific_robot_file_has_a_test(self): check = [item for item in self.robots if item not in self.tests] check = [item for item in self.robot_files if any(string in item for string in check)] + check = dumps(check, indent=4) - assert len(check) == 0, f"The following robot files are missing from unittest:\n '{check}'" + assert check == '[]', f"The following robot files are missing from unittest:\n '{check}'" def test_that_all_tests_have_the_corresponding_robot_files(self): check = [item for item in self.tests if item not in self.robots] diff --git a/doc/tests/test_jsonldContext_Consumption.py b/doc/tests/test_jsonldContext_Consumption.py index 783e9b5c..e308f3c4 100644 --- a/doc/tests/test_jsonldContext_Consumption.py +++ b/doc/tests/test_jsonldContext_Consumption.py @@ -43,78 +43,99 @@ class TestContextServerConsumption(TestCase): assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' def test_052_01(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_01.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_01.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_052_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_052_02(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_02.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_02.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_02.json' difference_file = f'{self.folder_test_suites}/doc/results/out_052_02.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_052_03(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_03.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_03.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_03.json' difference_file = f'{self.folder_test_suites}/doc/results/out_052_03.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_052_04(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_04.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_04.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_04.json' difference_file = f'{self.folder_test_suites}/doc/results/out_052_04.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_052_05(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ListContexts/052_05.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/052_05.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_05.json' difference_file = f'{self.folder_test_suites}/doc/results/out_052_05.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_052_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_053_01(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_01.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_01.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_053_02(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_02.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_02.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_02.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_02.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_053_03(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_03.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_03.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_03.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_03.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_053_04(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_04.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_04.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_04.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_04.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_053_05(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_05.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_05.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_05.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_05.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_053_06(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Consumption/ServeContext/053_06.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Consumption/053_06.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_06.json' difference_file = f'{self.folder_test_suites}/doc/results/out_053_06.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_053_08(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_08.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_053_08.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/doc/tests/test_jsonldContext_Provision.py b/doc/tests/test_jsonldContext_Provision.py index 7ea8bb33..01270c61 100644 --- a/doc/tests/test_jsonldContext_Provision.py +++ b/doc/tests/test_jsonldContext_Provision.py @@ -43,64 +43,92 @@ class TestContextServerProvision(TestCase): assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' def test_050_01(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_01.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_01.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/050_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_050_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_050_02(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_02.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_02.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/050_02.json' difference_file = f'{self.folder_test_suites}/doc/results/out_050_02.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_050_03(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_03.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_03.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/050_03.json' difference_file = f'{self.folder_test_suites}/doc/results/out_050_03.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_050_04(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/AddContext/050_04.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/050_04.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/050_04.json' difference_file = f'{self.folder_test_suites}/doc/results/out_050_04.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_051_01(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_01.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_01.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_051_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_051_02(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_02.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_02.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_02.json' difference_file = f'{self.folder_test_suites}/doc/results/out_051_02.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_051_03(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_03.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_03.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_03.json' difference_file = f'{self.folder_test_suites}/doc/results/out_051_03.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_051_04(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_04.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_04.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_04.json' difference_file = f'{self.folder_test_suites}/doc/results/out_051_04.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_051_05(self): - robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/JSON-LD@contextServer/Provision/DeleteContext/051_05.robot' - expected_value = f'{self.folder_test_suites}/doc/files/JSON-LD@contextServer/Provision/051_05.json' + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_05.json' difference_file = f'{self.folder_test_suites}/doc/results/out_051_05.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_08(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_08.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_08.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_051_09(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Provision/051_09.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_051_09.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/resources/ApiUtils/jsonldContext.resource b/resources/ApiUtils/jsonldContext.resource index de7dcf93..b1fae74f 100644 --- a/resources/ApiUtils/jsonldContext.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -14,8 +14,6 @@ ${JSONLDCONTEXTS_ENDPOINT_PATH} jsonldContexts ${CONTENT_TYPE_JSON} application/json -${CORE_@CONTEXT} https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld - ${response} ${EMPTY}more @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated @@ -110,12 +108,6 @@ Check Context Response Body Containing Detailed Information ... ${date} ... ${None} ... The createdAt key contains a value (${response_body['timestamp']}) that it is not in DateTime format -# Should Not Be Empty ${response_body['createdAt']} -# ${date}= Parse Ngsild Date ${response_body['createdAt']} -# Should Not Be Equal -# ... ${date} -# ... ${None} -# ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format Check Context Response Body Containing numberOfHits value [Arguments] ${response_body} ${expected_number_of_hists} @@ -164,7 +156,6 @@ List @contexts Check Context Response Body Containing a list of identifiers [Arguments] ${response_body} ${expected_length} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} - # TODO: ${CORE_@CONTEXT} should come from configuration Length Should Be ... ${response_body} ... ${expected_length} @@ -176,14 +167,17 @@ Check Context Response Body Containing a list of identifiers IF ${expected_length}==1 ${length_list_contexts}= Get Length ${list_contexts} IF '${kind}' == 'Cached' or ${length_list_contexts} == 0 - Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + Should Be Equal ${response_body[0]} ${core_context} ELSE - Should Be Equal ${response_body[0]} ${list_contexts[0]} + List Should Contain Value + ... ${list_contexts} + ... ${response_body[0]} + ... msg=The received @context ${response_body[0]} is not included in the list of expected @contexts: ${list_contexts} END ELSE IF ${expected_length}>1 IF '${kind}' == '' - Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + Should Be Equal ${response_body[0]} ${core_context} ELSE FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} Should Be Equal ${response_body[${index}]} ${uri_context} @@ -201,10 +195,10 @@ Check Context Response Body Containing a list with several URLs ... ${expected_length} ... msg=The length of the strings array of @contexts is not ${expected_length} - Should Be Equal ${response_body[0]} ${CORE_@CONTEXT} + Should Be Equal ${response_body[0]} ${core_context} FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} - # Log URI: ${uri_context} index: ${index} + Log URI: ${uri_context} index: ${index} ${index}= Evaluate ${index} + 1 Should Be Equal ${response_body[${index}]} ${uri_context} @@ -224,13 +218,11 @@ Check Cached @Contexts Check Response Kind set to ${response.json()} Cached END - Output ${response} List @contexts - Check Context Detailed Information Keys [Arguments] ${my_dict} # TODO: spec v1.8.1 timestamp -> createdAt - ${expected_keys}= Create List URL localId kind timestamp lastUsage numberOfHits extraInfo + ${expected_keys}= Create List URL localId kind createdAt lastUsage numberOfHits extraInfo ${actual_keys}= Get Dictionary Keys ${my_dict} FOR ${key} IN @{expected_keys} @@ -251,10 +243,8 @@ Check Context Response Body Containing a JSONObject with details of the @context ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} FOR ${index} ${item} IN ENUMERATE @{response} - # Log ${index} ${item} - ${URL}= Get From Dictionary ${item} URL - IF '${URL}'=='https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' + IF '${URL}'=='${core_context}' ${context_kind}= Set Variable Cached ELSE ${context_kind}= Set Variable Hosted @@ -271,4 +261,21 @@ Check Context Response Body Containing a JSONObject with details of the @context Check Context Detailed Information Keys ${item} END - Log Por aquir +Check Context Response Body Containing a JSONObject with details of a ImplicitlyCreated @contexts + [Arguments] ${response} ${expected_length} + + ${obtained_length}= Get Length ${response} + Length Should Be + ... ${response} + ... ${expected_length} + ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response}[0] ImplicitlyCreated + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response}[0] lastUsage + Check Dictionary Might Contain Additional Members ${response}[0] numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${response}[0] diff --git a/resources/variables.py b/resources/variables.py index 7b310bc5..df01c29a 100644 --- a/resources/variables.py +++ b/resources/variables.py @@ -5,3 +5,4 @@ notification_server_host = '0.0.0.0' notification_server_port = 8085 context_source_host = '0.0.0.0' context_source_port = 8086 +core_context = 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' \ No newline at end of file -- GitLab From b282ec23be5dc0c598bc2c484eec701da8b5ad34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 29 Feb 2024 14:36:35 +0100 Subject: [PATCH 16/25] Resolve the Tag problem to identify x_x_x or x_x numbers in the spec --- doc/analysis/generaterobotdata.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 2e237eab..2993a9cb 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -554,18 +554,7 @@ class GenerateRobotData: return result def generate_reference_testcases(self, tags: list, version: str): - # check_tags = all(item == tags[0] for item in tags) - # - # if check_tags is False or len(tags) == 0: - # raise Exception(f'ERROR: the Test Suite {{self.suite.name}} has different clauses or no clauses (Tags): ' - # f'{tags}\nUnable to select the corresponding Reference of this Test Suite') - # else: - # # All the clauses are the same, so we select the first one - # reference = f'{{self.references[version]}}{tags[0].replace("_", ".")}' - # pics = f'PICS_{tags[0]}' - # - # return reference, pics - aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)', string=x)] + aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)|^(\d+_\d+)', string=x)] if len(aux) == 0: raise Exception( -- GitLab From 7bf4d1ae4fe0ca813f71cf6d77e07e988bba66b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 14 Mar 2024 19:27:37 +0100 Subject: [PATCH 17/25] Update @atContext TS to incorporate the since_v1.5.1 and correct the generation of the documentation to manage the case of version --- .../046_01.robot | 2 +- .../046_02.robot | 2 +- .../046_03.robot | 2 +- .../046_04.robot | 2 +- .../046_05.robot | 2 +- .../046_06.robot | 2 +- .../046_07.robot | 2 +- .../046_08.robot | 2 +- .../046_09.robot | 2 +- .../046_10.robot | 2 +- .../046_11.robot | 2 +- .../046_12.robot | 2 +- .../046_13.robot | 2 +- .../046_14.robot | 2 +- .../Consumption/ListContexts/052_01.robot | 16 +++++------ .../Consumption/ListContexts/052_02.robot | 16 +++++------ .../Consumption/ListContexts/052_03.robot | 16 +++++------ .../Consumption/ListContexts/052_04.robot | 10 +++---- .../Consumption/ListContexts/052_05.robot | 8 +++--- .../Consumption/ListContexts/052_06.robot | 16 +++++------ .../Consumption/ServeContext/053_01.robot | 4 +-- .../Consumption/ServeContext/053_02.robot | 2 +- .../Consumption/ServeContext/053_03.robot | 6 ++-- .../Consumption/ServeContext/053_04.robot | 2 +- .../Consumption/ServeContext/053_05.robot | 2 +- .../Consumption/ServeContext/053_06.robot | 2 +- .../Consumption/ServeContext/053_07.robot | 2 +- .../Consumption/ServeContext/053_08.robot | 2 +- .../Provision/AddContext/050_01.robot | 4 +-- .../Provision/AddContext/050_02.robot | 4 +-- .../Provision/AddContext/050_03.robot | 2 +- .../Provision/AddContext/050_04.robot | 2 +- .../Provision/DeleteContext/051_01.robot | 2 +- .../Provision/DeleteContext/051_02.robot | 2 +- .../Provision/DeleteContext/051_03.robot | 2 +- .../Provision/DeleteContext/051_04.robot | 10 +++---- .../Provision/DeleteContext/051_05.robot | 2 +- .../Provision/DeleteContext/051_06.robot | 2 +- .../Provision/DeleteContext/051_07.robot | 2 +- .../Provision/DeleteContext/051_08.robot | 4 +-- .../Provision/DeleteContext/051_09.robot | 2 +- doc/analysis/generaterobotdata.py | 28 +++++++++++++++++++ .../Subscription/046_01.json | 1 - .../Subscription/046_02.json | 1 - .../Subscription/046_03.json | 1 - .../Subscription/046_04.json | 1 - .../Subscription/046_05.json | 1 - .../Subscription/046_06.json | 1 - .../Subscription/046_07.json | 1 - .../Subscription/046_08.json | 1 - .../Subscription/046_09.json | 1 - .../Subscription/046_10.json | 1 - .../Subscription/046_11.json | 1 - .../Subscription/046_12.json | 1 - .../Subscription/046_13.json | 1 - .../Subscription/046_14.json | 1 - .../jsonldContext/Consumption/052_01.json | 28 ++++++++++++------- .../jsonldContext/Consumption/052_02.json | 28 ++++++++++++------- .../jsonldContext/Consumption/052_03.json | 28 ++++++++++++------- .../jsonldContext/Consumption/052_04.json | 19 ++++++++----- .../jsonldContext/Consumption/052_05.json | 16 +++++++---- .../jsonldContext/Consumption/052_06.json | 28 ++++++++++++------- .../jsonldContext/Consumption/053_01.json | 10 ++++--- .../jsonldContext/Consumption/053_02.json | 7 +++-- .../jsonldContext/Consumption/053_03.json | 13 +++++---- .../jsonldContext/Consumption/053_04.json | 7 +++-- .../jsonldContext/Consumption/053_05.json | 7 +++-- .../jsonldContext/Consumption/053_06.json | 7 +++-- .../jsonldContext/Consumption/053_07.json | 5 ++-- .../jsonldContext/Consumption/053_08.json | 7 +++-- doc/files/jsonldContext/Provision/050_01.json | 10 ++++--- doc/files/jsonldContext/Provision/050_02.json | 10 ++++--- doc/files/jsonldContext/Provision/050_03.json | 5 ++-- doc/files/jsonldContext/Provision/050_04.json | 7 +++-- doc/files/jsonldContext/Provision/051_01.json | 7 +++-- doc/files/jsonldContext/Provision/051_02.json | 7 +++-- doc/files/jsonldContext/Provision/051_03.json | 7 +++-- doc/files/jsonldContext/Provision/051_04.json | 19 ++++++++----- doc/files/jsonldContext/Provision/051_05.json | 7 +++-- doc/files/jsonldContext/Provision/051_06.json | 7 +++-- doc/files/jsonldContext/Provision/051_07.json | 7 +++-- doc/files/jsonldContext/Provision/051_08.json | 10 ++++--- doc/files/jsonldContext/Provision/051_09.json | 7 +++-- 83 files changed, 310 insertions(+), 224 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot index ac00e333..aebf2830 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot @@ -23,7 +23,7 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Test Cases *** 046_01_01 Check that a notification is only sent if status is active [Documentation] Check that a notification is only sent if and only if the status is active - [Tags] sub-notification 5_8_6 046_01 + [Tags] sub-notification 5_8_6 Add Initial Entity Sleep 1s diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot index f9905f72..9fb9e494 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot @@ -22,7 +22,7 @@ ${entity_building_filepath}= building-simple-attributes-sample.jsonld *** Test Cases *** 046_02_01 Check that a notification is sent on the timeInterval [Documentation] If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes. - [Tags] sub-notification 5_8_6 046_02 + [Tags] sub-notification 5_8_6 ${response}= Setup Initial Subscriptions ${notification} ${headers}= Wait for notification timeout=${15} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot index 2be76dd9..b8cb874b 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot @@ -23,7 +23,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Test Cases *** 046_03_01 Check that a notification is sent with all entities [Documentation] A notification with all subscribed Entities will be included if query or geoquery are not defined. - [Tags] sub-notification 5_8_6 046_03 + [Tags] sub-notification 5_8_6 ${response}= Setup Initial Subscriptions Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot index 912158c4..3e487caf 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot @@ -23,7 +23,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Test Cases *** 046_04_01 Check that a notification is sent with all entities [Documentation] The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions - [Tags] sub-notification 5_8_6 046_04 + [Tags] sub-notification 5_8_6 ${response}= Setup Initial Subscriptions ${response1}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot index 4eb6bc5f..b698a8c2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot @@ -23,7 +23,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Test Cases *** 046_05_01 Check that a notification is sent with all entities [Documentation] The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions - [Tags] sub-notification 5_8_6 046_05 + [Tags] sub-notification 5_8_6 Setup Initial Subscriptions ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot index 6c190eb5..021d8432 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot @@ -22,7 +22,7 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Test Cases *** 046_06_01 Check that a notification is sent with all matching entities [Documentation] only the subscribed Entities matching the query and watched attributes shall be included. - [Tags] sub-notification 5_8_6 046_06 + [Tags] sub-notification 5_8_6 ${entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot index c20751d2..c8afb1e8 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot @@ -28,7 +28,7 @@ ${date_format_with_millis} %Y-%m-%dT%H:%M:%S.%f *** Test Cases *** 046_07_01 Check notification structure [Documentation] The structure of the notification message shall be as mandated by clause 5.3. Valid notification with attributes as stated above - [Tags] sub-notification 5_8_6 046_07 + [Tags] sub-notification 5_8_6 [Setup] Setup Initial Subscriptions ${subscription_payload_file_path} ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot index 7dbc0f0a..a0c18b16 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot @@ -25,7 +25,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Test Cases *** 046_08_01 Check that a notification is sent with all attributes [Documentation] The structure of the notification message shall be as mandated by clause 5.3.1. The absence of the notification.attributes member of a Subscription means that all Entity Attributes shall be included. All attributes are included - [Tags] sub-notification 5_8_6 046_08 + [Tags] sub-notification 5_8_6 [Setup] Setup Initial Subscriptions ${False} ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot index 0e8ddedd..359b126c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot @@ -23,7 +23,7 @@ ${notification_server_send_url} http://${notification_server_host}:${not *** Test Cases *** 046_09_01 Check that a notification is sent to the endpoint [Documentation] A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1 - [Tags] sub-notification 5_8_6 046_09 + [Tags] sub-notification 5_8_6 Setup Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot index fbda28c0..31866d31 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot @@ -24,7 +24,7 @@ ${expected_header_links} <${ngsild_test_suite_context}>; rel="htt *** Test Cases *** 046_10_01 Check that the notification is sent as JSON [Documentation] The Notification shall be sent as JSON - [Tags] sub-notification 5_8_6 046_10 + [Tags] sub-notification 5_8_6 Setup Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot index 75392451..f8b2d391 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot @@ -25,7 +25,7 @@ ${date_format_with_millis}= %Y-%m-%dT%H:%M:%S.%fZ *** Test Cases *** 046_11_01 Check that timesSent is increased by one [Documentation] The notification.timesSent member shall be incremented by one. - [Tags] sub-notification 5_8_6 046_11 + [Tags] sub-notification 5_8_6 Add Initial Entity Sleep 1s diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot index 6f811777..bacdb570 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot @@ -23,7 +23,7 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Test Cases *** 046_12_01 Check that lastNotification is updated [Documentation] The status, lastNotification and lastSuccess members shall be updated with expected value and dates. This test will check these formats. - [Tags] sub-notification 5_8_6 046_12 + [Tags] sub-notification 5_8_6 Add Initial Entity Sleep 1s diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot index 7f79fd41..ccc6ef86 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot @@ -23,7 +23,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Test Cases *** 046_13_01 Check that lastFailure and status are updated if a notification could not be sent [Documentation] If the response to the notification request is different than 200 OK then implementations shall: Update notification.lastFailure with a timestamp representing the current date and time, update notification.status to "failed" - [Tags] sub-notification 5_8_6 046_13 + [Tags] sub-notification 5_8_6 @{expected_notification_data_entities}= Create List Building Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot index ecf8a912..b5258eb6 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot @@ -23,7 +23,7 @@ ${notification_server_send_url} http://${notification_server_host}:${not *** Test Cases *** 046_14_01 Check that a notification is sent as JSON-LD [Documentation] The Notification content shall be JSON-LD when endpoint.accept is set to 'application/ld+json' - [Tags] sub-notification 5_8_6 046_14 + [Tags] sub-notification 5_8_6 Add Initial Entity Sleep 1s diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot index 6f3cb641..0ee9e1c8 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot @@ -14,28 +14,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_01_01 List @contexts with neither details or kind and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ${EMPTY} 1 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Hosted 0 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Cached 1 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ImplicitlyCreated 0 052_01_05 List @contexts with details equal to false and no kind and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ${EMPTY} 1 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Hosted 0 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Cached 1 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot index d55055d9..d0804498 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot @@ -17,28 +17,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_02_01 List @contexts with neither details or kind and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ${EMPTY} 2 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Hosted 1 052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Cached 1 052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ImplicitlyCreated 0 052_02_05 List @contexts with details equal to false and no kind and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ${EMPTY} 2 052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Hosted 1 052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Cached 1 052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot index 728899b3..08ed6e4d 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot @@ -19,28 +19,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_03_01 List @contexts with neither details or kind and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ${EMPTY} 4 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Hosted 3 052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Cached 1 052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ImplicitlyCreated 0 052_03_05 List @contexts with details equal to false and no kind and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ${EMPTY} 4 052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Hosted 3 052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Cached 1 052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot index 76d59296..468fcec2 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot @@ -14,19 +14,19 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND 052_04_01 List @contexts with no details and kind set to other and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} other 052_04_02 List @contexts with details set to other and no kind and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 other ${EMPTY} 052_04_03 List @contexts with details set to other and kind set to other and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 other other 052_04_04 List @contexts with details set to true and kind set to other and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 true other 052_04_05 List @contexts with details set to other and kind set to Hosted and not previously created @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 other Hosted diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot index 2650e56f..9431befb 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot @@ -19,16 +19,16 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_05_01 List @contexts with details set to true and no kind and with previously several add @contexts - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 true ${EMPTY} 4 052_05_02 List @contexts with details set to true and kind set to hosted and with previously several add @contexts - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 true Hosted 3 052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 true Cached 1 052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 true ImplicitlyCreated 0 diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot index 26a80cdb..009f1680 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot @@ -17,28 +17,28 @@ ${reason_204}= No Content *** Test Cases *** DETAILS KIND COUNT 052_06_01 List @contexts with neither details or kind and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ${EMPTY} 4 052_06_02 List @contexts with no details and kind set to hosted and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Hosted 0 052_06_03 List @contexts with no details and kind set to cached and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} Cached 3 052_06_04 List @contexts with no details and kind set to implicitlycreated and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 ${EMPTY} ImplicitlyCreated 1 052_06_05 List @contexts with details set to false and no kind and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ${EMPTY} 4 052_06_06 List @contexts with details set to false and kind equal to hosted and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Hosted 0 052_06_07 List @contexts with details set to false and kind equal to cached and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false Cached 3 052_06_08 List @contexts with details set to false and kind equal to implicitlycreated and a created ImplicitlyCreated @context - [Tags] ctx-list 5_13_3 + [Tags] ctx-list 5_13_3 since_v1.5.1 false ImplicitlyCreated 1 *** Keywords *** diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot index 9b0dac37..6c210bb3 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot @@ -17,10 +17,10 @@ ${reason_204}= No Content *** Test Cases *** DETAILS 053_01_01 Serve a @context without details - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${EMPTY} 053_01_02 Serve a @context with details equal to false - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 false diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot index c5b05ca6..3e9c1e6d 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot @@ -17,7 +17,7 @@ ${reason_204}= No Content *** Test Cases *** DETAILS CONTEXT_TYPE 053_02_01 Serve a @context with details set to True - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 true Hosted diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot index 2d928980..d728bd10 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot @@ -19,13 +19,13 @@ ${reason_422}= Unprocessable Content *** Test Cases *** CONTEXTID DETAILS STATUSCODE REASON ERROR 053_03_01 Serve a @contexts with a wrong id and correct details - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 053_03_02 Serve a @contexts with a valid id and incorrect details - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${uri} other 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} 053_03_03 Serve a Cached @contexts with details set to false - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index fa0d0311..6b6d7027 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -18,7 +18,7 @@ ${entity_context_id}= urn:ngsi-ld:Building:randomUUID *** Test Cases *** 053_04_01 Check that the numberOfHits is increased after using a Hosted context [Documentation] Check that the numberOfHits is increased after using a Hosted context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 Create Entity selecting @context ${entityfile} ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 93ad384f..394576e6 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -28,7 +28,7 @@ ${reason_200}= OK *** Test Cases *** 053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true [Documentation] Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${response}= Serve a @context ... contextId=${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index 8ecbb868..184fbf4b 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -28,7 +28,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: *** Test Cases *** 053_06_01 Check that the numberOfHits is increased after using a Cached context [Documentation] Check that the numberOfHits is increased after using a Cached context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${second_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot index d7716705..4736f59e 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot @@ -17,7 +17,7 @@ ${reason_200}= OK *** Test Cases *** 053_07_01 Check that we can serve a ImplicitlyCreated @context with details set to true [Documentation] Check that we can serve a ImplicitlyCreated @context with details set to true - [Tags] sub-create 5_13_4 + [Tags] sub-create 5_13_4 since_v1.5.1 ${response}= Serve a @context ... contextId=${implicit_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot index 38b4b08a..74a9534a 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot @@ -20,7 +20,7 @@ ${entityfile}= minimal-entity-using-@context.jsonld *** Test Cases *** 053_08_01 Check that the numberOfHits is increased after using a ImplicitlyCreated context [Documentation] Check that the numberOfHits is increased after using a ImplicitlyCreated context - [Tags] ctx-serve 5_13_4 + [Tags] ctx-serve 5_13_4 since_v1.5.1 ${entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot index e285dfbd..d74151e0 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot @@ -18,10 +18,10 @@ ${reason_204}= No Content *** Test Cases *** FILENAME CONTEXT_TYPE 050_01_01 Add a valid hosted @context from key=value - [Tags] ctx-add 5_13_2 + [Tags] ctx-add 5_13_2 since_v1.5.1 ${filename_dictionary} Hosted 050_01_02 Add a valid cached @context from URI - [Tags] ctx-add 5_13_2 + [Tags] ctx-add 5_13_2 since_v1.5.1 ${filename_list} Hosted diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot index 2fbaa65f..630feb37 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot @@ -17,10 +17,10 @@ ${problem_type}= https://uri.etsi.org/ngsi-ld/errors/InvalidReque *** Test Cases *** FILENAME REASON 050_02_01 Checking Incorrect Payload - [Tags] ctx-add 5_13_2 + [Tags] ctx-add 5_13_2 since_v1.5.1 ${wrong_context_filename} ${reason_400} 050_02_02 Checking Wrong JSON - [Tags] ctx-add 5_13_2 + [Tags] ctx-add 5_13_2 since_v1.5.1 ${wrong_json_filename} ${reason_400} diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot index 029e7b4a..fcd0a39f 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_03.robot @@ -15,7 +15,7 @@ ${subscription_payload_file_path}= jsonldContext/subscription-with-implicit *** Test Cases *** 050_03_01 Check the creation of ImplicitelyCreted @context [Documentation] Check that you can create a subscription - [Tags] sub-create 5_13_2 + [Tags] sub-create 5_13_2 since_v1.5.1 ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} ${subscription_id}= Get Value From JSON ${subscription_payload} $..id diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index 01c8f175..513b1218 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -16,7 +16,7 @@ ${reason_204}= No Content *** Test Cases *** 050_04_01 Add a valid hosted @context with URIs and check that the URIs are Cached @contexts [Documentation] Check that you can add a @context - [Tags] ctx-add 5_13_2 + [Tags] ctx-add 5_13_2 since_v1.5.1 ${response}= Add a new @context ${filename_list} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot index b62fb9aa..dbfab5fc 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot @@ -15,7 +15,7 @@ ${reason_204}= No Content *** Test Cases *** 051_01_01 Delete a @context whose kind is hosted without reload param [Documentation] Check that you can delete a hosted @context - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_5 since_v1.5.1 ${response}= Delete a @context ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot index 6eb144b3..630f13c3 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot @@ -11,7 +11,7 @@ ${reason_404}= Not Found *** Test Cases *** 051_02_01 Delete a @context with unknown @context identifier [Documentation] Check that an error message is obtained in the response when we try to delete a @context with unknonwn id - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_5 since_v1.5.1 ${random_url}= Generate Random String 16 [NUMBERS] ${response}= Delete a @context ${random_url} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index 0a82a73a..40a5649a 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -15,7 +15,7 @@ ${reason_204}= No Content *** Test Cases *** 051_03_01 Delete a @context whose kind is cached without reload param [Documentation] Check that you can delete a cached @context - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_5 since_v1.5.1 ${response}= Delete a @context ${contextId} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot index 02cf0915..a40ecb77 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot @@ -19,19 +19,19 @@ ${reason_422}= Unprocessable *** Test Cases *** CONTEXTID RELOAD STATUSCODE REASON ERROR 051_04_01 Delete a @contexts with a wrong id and reload set to true - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_02 Delete a @contexts with a wrong id and reload set to false - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 wrong_id_context false 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_03 Delete a @contexts with a wrong id and no reload value - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 wrong_id_context ${EMPTY} 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_04 Delete a @contexts with a wrong id and wrong reload value - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 wrong_id_context xxx 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_05 Delete a Hosted @contexts with a valid id and reload set to true - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index 81c55ebd..74ebfb29 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -27,7 +27,7 @@ ${uri} /api/v1/context.jsonld *** Test Cases *** 051_05_01 Delete and Reload a Cached @context with no communication with the Context Server [Documentation] Check that you get an error if we try to reload a cached context with no communication with the context server - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_5 since_v1.5.1 ${response}= Delete a @context ${uri} true diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot index 928968e3..deca9199 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot @@ -17,7 +17,7 @@ ${reason_204}= No Content *** Test Cases *** 051_06_01 Delete a @context whose kind is ImplicitlyCreated without reload param [Documentation] Check that we can delete a ImplicitlyCreated @context - [Tags] ctx-serve 5_13_5 + [Tags] ctx-serve 5_13_5 since_v1.5.1 ${response}= Delete a @context ${implicit_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot index 77862af6..a75973fe 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot @@ -16,7 +16,7 @@ ${reason_400}= Bad Request *** Test Cases *** 051_07_01 Delete a ImplicitlyCreated @contexts with a valid id and reload set to true [Documentation] Check that you cannot delete a ImplicitlyCreated @context with reload set to true - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 ${response}= Delete a @context ${implicit_id} true diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot index 29ba8a1c..a490796d 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot @@ -14,10 +14,10 @@ ${type}= https://uri.etsi.org/ngsi-ld/errors/BadRequestData *** Test Cases *** RELOAD 051_08_01 Delete a core @contexts and return an error with no reload - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 ${EMPTY} 051_08_02 Delete a core @contexts and return an error with reload set to false - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 false diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot index 99e62939..85bf04b7 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot @@ -17,7 +17,7 @@ ${type}= https://uri.etsi.org/ngsi-ld/errors/BadRequestData *** Test Cases *** 051_09_01 Delete a core @contexts with reload set to true and check if the context has been download again by the broker [Documentation] Delete a core @contexts with reload set to true and check downloaded core context - [Tags] ctx-delete 5_13_5 + [Tags] ctx-delete 5_13_5 since_v1.5.1 # TODO: There is something to change in the spec to faciliate checking if the core context was really updated ${response}= Serve a @context diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 2993a9cb..0b54bce8 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -126,6 +126,34 @@ class GenerateRobotData: # Generate the initial_condition of the test suite self.test_suite['initial_condition'] = self.generate_initial_condition() + # Generate the parent release and correct the reference in case that the tags include information since_v1.x.y + self.get_version() + + def get_version(self): + data = [x['tags'] for x in self.test_suite['test_cases']] + aux = [item for sublist in data for item in sublist if item.startswith('since')] + + if len(aux) == 0: + has_since = False + else: + has_since = True + + are_all_same = all(item == aux[0] for item in aux) + + if are_all_same and has_since: + aux = aux[0] + aux = aux.split('since_')[1] + else: + if has_since: + print('Error not all the tags have the same version. Select default v1.3.1') + + aux = 'v1.3.1' + + self.test_suite['reference'] = \ + f"ETSI GS CIM 009 V{aux.split('v')[1]} [], clause {self.test_suite['reference'].split('clause ')[1]}" + + self.test_suite['parent_release'] = aux + def generate_initial_condition(self) -> str: aux = [x['setup'] for x in self.test_cases] if all(element == aux[0] for element in aux[1:]): diff --git a/doc/files/ContextInformation/Subscription/046_01.json b/doc/files/ContextInformation/Subscription/046_01.json index 63c2a98c..9885b485 100644 --- a/doc/files/ContextInformation/Subscription/046_01.json +++ b/doc/files/ContextInformation/Subscription/046_01.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_01_01", "doc": "Check that a notification is only sent if and only if the status is active", "tags": [ - "046_01", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_02.json b/doc/files/ContextInformation/Subscription/046_02.json index 4d38100b..4e373041 100644 --- a/doc/files/ContextInformation/Subscription/046_02.json +++ b/doc/files/ContextInformation/Subscription/046_02.json @@ -20,7 +20,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_02_01", "doc": "If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes.", "tags": [ - "046_02", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_03.json b/doc/files/ContextInformation/Subscription/046_03.json index af2e1cec..25870109 100644 --- a/doc/files/ContextInformation/Subscription/046_03.json +++ b/doc/files/ContextInformation/Subscription/046_03.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_03_01", "doc": "A notification with all subscribed Entities will be included if query or geoquery are not defined.", "tags": [ - "046_03", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_04.json b/doc/files/ContextInformation/Subscription/046_04.json index f51309a4..bd6f1779 100644 --- a/doc/files/ContextInformation/Subscription/046_04.json +++ b/doc/files/ContextInformation/Subscription/046_04.json @@ -20,7 +20,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_04_01", "doc": "The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions", "tags": [ - "046_04", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_05.json b/doc/files/ContextInformation/Subscription/046_05.json index 0b1a30fa..ea344cac 100644 --- a/doc/files/ContextInformation/Subscription/046_05.json +++ b/doc/files/ContextInformation/Subscription/046_05.json @@ -20,7 +20,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_05_01", "doc": "The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions", "tags": [ - "046_05", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_06.json b/doc/files/ContextInformation/Subscription/046_06.json index 7515099f..d6656b11 100644 --- a/doc/files/ContextInformation/Subscription/046_06.json +++ b/doc/files/ContextInformation/Subscription/046_06.json @@ -17,7 +17,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_06_01", "doc": "only the subscribed Entities matching the query and watched attributes shall be included.", "tags": [ - "046_06", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_07.json b/doc/files/ContextInformation/Subscription/046_07.json index ef588be6..c23d42ee 100644 --- a/doc/files/ContextInformation/Subscription/046_07.json +++ b/doc/files/ContextInformation/Subscription/046_07.json @@ -19,7 +19,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_07_01", "doc": "The structure of the notification message shall be as mandated by clause 5.3. Valid notification with attributes as stated above", "tags": [ - "046_07", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_08.json b/doc/files/ContextInformation/Subscription/046_08.json index 71e9f8d4..c7cfd763 100644 --- a/doc/files/ContextInformation/Subscription/046_08.json +++ b/doc/files/ContextInformation/Subscription/046_08.json @@ -19,7 +19,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_08_01", "doc": "The structure of the notification message shall be as mandated by clause 5.3.1. The absence of the notification.attributes member of a Subscription means that all Entity Attributes shall be included. All attributes are included", "tags": [ - "046_08", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_09.json b/doc/files/ContextInformation/Subscription/046_09.json index dda1bb2d..81b306d9 100644 --- a/doc/files/ContextInformation/Subscription/046_09.json +++ b/doc/files/ContextInformation/Subscription/046_09.json @@ -20,7 +20,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_09_01", "doc": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1", "tags": [ - "046_09", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_10.json b/doc/files/ContextInformation/Subscription/046_10.json index 7f94d577..89b25aaf 100644 --- a/doc/files/ContextInformation/Subscription/046_10.json +++ b/doc/files/ContextInformation/Subscription/046_10.json @@ -20,7 +20,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_10_01", "doc": "The Notification shall be sent as JSON", "tags": [ - "046_10", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_11.json b/doc/files/ContextInformation/Subscription/046_11.json index 5cf674a1..ed362a5c 100644 --- a/doc/files/ContextInformation/Subscription/046_11.json +++ b/doc/files/ContextInformation/Subscription/046_11.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_11_01", "doc": "The notification.timesSent member shall be incremented by one.", "tags": [ - "046_11", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_12.json b/doc/files/ContextInformation/Subscription/046_12.json index 324c7945..4f479bcd 100644 --- a/doc/files/ContextInformation/Subscription/046_12.json +++ b/doc/files/ContextInformation/Subscription/046_12.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_12_01", "doc": "The status, lastNotification and lastSuccess members shall be updated with expected value and dates. This test will check these formats.", "tags": [ - "046_12", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_13.json b/doc/files/ContextInformation/Subscription/046_13.json index 785d6b2b..c2b5af74 100644 --- a/doc/files/ContextInformation/Subscription/046_13.json +++ b/doc/files/ContextInformation/Subscription/046_13.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_13_01", "doc": "If the response to the notification request is different than 200 OK then implementations shall: Update notification.lastFailure with a timestamp representing the current date and time, update notification.status to \"failed\"", "tags": [ - "046_13", "5_8_6", "sub-notification" ], diff --git a/doc/files/ContextInformation/Subscription/046_14.json b/doc/files/ContextInformation/Subscription/046_14.json index fd449970..44345e3f 100644 --- a/doc/files/ContextInformation/Subscription/046_14.json +++ b/doc/files/ContextInformation/Subscription/046_14.json @@ -21,7 +21,6 @@ "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_14_01", "doc": "The Notification content shall be JSON-LD when endpoint.accept is set to 'application/ld+json'", "tags": [ - "046_14", "5_8_6", "sub-notification" ], diff --git a/doc/files/jsonldContext/Consumption/052_01.json b/doc/files/jsonldContext/Consumption/052_01.json index 0aab383d..e5c67fdb 100644 --- a/doc/files/jsonldContext/Consumption/052_01.json +++ b/doc/files/jsonldContext/Consumption/052_01.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_01", "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "List @contexts with no previous created @context" @@ -17,7 +17,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -33,7 +34,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -49,7 +51,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -65,7 +68,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -81,7 +85,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -97,7 +102,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -113,7 +119,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -129,7 +136,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, diff --git a/doc/files/jsonldContext/Consumption/052_02.json b/doc/files/jsonldContext/Consumption/052_02.json index c280b3e7..7f883a0a 100644 --- a/doc/files/jsonldContext/Consumption/052_02.json +++ b/doc/files/jsonldContext/Consumption/052_02.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_02", "test_objective": "Check that you can list all the @context available in the broker with one add @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "Create Initial @context", @@ -19,7 +19,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -35,7 +36,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -51,7 +53,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -67,7 +70,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -83,7 +87,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -99,7 +104,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -115,7 +121,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -131,7 +138,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Consumption/052_03.json b/doc/files/jsonldContext/Consumption/052_03.json index 9afa1490..b0985b6b 100644 --- a/doc/files/jsonldContext/Consumption/052_03.json +++ b/doc/files/jsonldContext/Consumption/052_03.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_03", "test_objective": "Check that you can list all the @context available in the broker with several add @contexts", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "Create Initial set of @contexts", @@ -19,7 +19,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -35,7 +36,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -51,7 +53,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -67,7 +70,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -83,7 +87,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -99,7 +104,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -115,7 +121,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -131,7 +138,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", diff --git a/doc/files/jsonldContext/Consumption/052_04.json b/doc/files/jsonldContext/Consumption/052_04.json index cb26d080..462ae632 100644 --- a/doc/files/jsonldContext/Consumption/052_04.json +++ b/doc/files/jsonldContext/Consumption/052_04.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_04", "test_objective": "Check that you get an error when try to list @context with wrong details or kind", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "List @contexts with no previous created @context" @@ -17,7 +17,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -33,7 +34,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -49,7 +51,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -65,7 +68,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -81,7 +85,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": null, "teardown": null, diff --git a/doc/files/jsonldContext/Consumption/052_05.json b/doc/files/jsonldContext/Consumption/052_05.json index d24be4ac..ebf680f3 100644 --- a/doc/files/jsonldContext/Consumption/052_05.json +++ b/doc/files/jsonldContext/Consumption/052_05.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_05", "test_objective": "Check that you can list all the @context available in the broker with several add @contexts with details equal to true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "Create Initial set of @contexts", @@ -19,7 +19,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -35,7 +36,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -51,7 +53,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", @@ -67,7 +70,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", diff --git a/doc/files/jsonldContext/Consumption/052_06.json b/doc/files/jsonldContext/Consumption/052_06.json index 1f003660..d439f8b7 100644 --- a/doc/files/jsonldContext/Consumption/052_06.json +++ b/doc/files/jsonldContext/Consumption/052_06.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_06", "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.3", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_3", "keywords": [ "List @contexts with no previous created @context", @@ -19,7 +19,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -35,7 +36,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -51,7 +53,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -67,7 +70,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -83,7 +87,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -99,7 +104,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -115,7 +121,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", @@ -131,7 +138,8 @@ "doc": "Check that you can list @contexts", "tags": [ "5_13_3", - "ctx-list" + "ctx-list", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", diff --git a/doc/files/jsonldContext/Consumption/053_01.json b/doc/files/jsonldContext/Consumption/053_01.json index bc34220a..484b4de5 100644 --- a/doc/files/jsonldContext/Consumption/053_01.json +++ b/doc/files/jsonldContext/Consumption/053_01.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_01", "test_objective": "Check that you can serve a previous created @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create Initial @context", @@ -19,7 +19,8 @@ "doc": "Check that you can serve a @context with details equal to empty or false", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -35,7 +36,8 @@ "doc": "Check that you can serve a @context with details equal to empty or false", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Consumption/053_02.json b/doc/files/jsonldContext/Consumption/053_02.json index 0fddc86f..a77ddc49 100644 --- a/doc/files/jsonldContext/Consumption/053_02.json +++ b/doc/files/jsonldContext/Consumption/053_02.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_02", "test_objective": "Check that you can serve a previous created @context with details equal to True", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create Initial @context", @@ -19,7 +19,8 @@ "doc": "Check that you can serve a @context with details", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Consumption/053_03.json b/doc/files/jsonldContext/Consumption/053_03.json index 044ebdd8..a8634268 100644 --- a/doc/files/jsonldContext/Consumption/053_03.json +++ b/doc/files/jsonldContext/Consumption/053_03.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_03", "test_objective": "Check that you get an error when try to serve a @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Serve @context with no previous created @context", @@ -19,7 +19,8 @@ "doc": "Check that an error is returned when we request for a @context that does not exist", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -35,7 +36,8 @@ "doc": "Check that an error is returned when we request for a @context that does not exist", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -51,7 +53,8 @@ "doc": "Check that an error is returned when we request for a @context that does not exist", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Consumption/053_04.json b/doc/files/jsonldContext/Consumption/053_04.json index 58e418a0..8cf11768 100644 --- a/doc/files/jsonldContext/Consumption/053_04.json +++ b/doc/files/jsonldContext/Consumption/053_04.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_04", "test_objective": "Check that you can get an increase numberOfHits after creation of a Hosted @context and using it", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create Initial @context condition from an external server", @@ -18,7 +18,8 @@ "doc": "Check that the numberOfHits is increased after using a Hosted context", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", diff --git a/doc/files/jsonldContext/Consumption/053_05.json b/doc/files/jsonldContext/Consumption/053_05.json index 72476bbc..336db538 100644 --- a/doc/files/jsonldContext/Consumption/053_05.json +++ b/doc/files/jsonldContext/Consumption/053_05.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_05", "test_objective": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create Initial @context condition from an external server", @@ -18,7 +18,8 @@ "doc": "Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", diff --git a/doc/files/jsonldContext/Consumption/053_06.json b/doc/files/jsonldContext/Consumption/053_06.json index 53ba175f..03663e01 100644 --- a/doc/files/jsonldContext/Consumption/053_06.json +++ b/doc/files/jsonldContext/Consumption/053_06.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_06", "test_objective": "Check that the numberOfHits is increased after using a Cached context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create Initial @context condition from an external server", @@ -18,7 +18,8 @@ "doc": "Check that the numberOfHits is increased after using a Cached context", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", diff --git a/doc/files/jsonldContext/Consumption/053_07.json b/doc/files/jsonldContext/Consumption/053_07.json index e6146684..f1cc9e38 100644 --- a/doc/files/jsonldContext/Consumption/053_07.json +++ b/doc/files/jsonldContext/Consumption/053_07.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_07", "test_objective": "Check that we can serve a ImplicitlyCreated @context with details set to true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create initial ImplicitlyCreated @context", @@ -18,6 +18,7 @@ "doc": "Check that we can serve a ImplicitlyCreated @context with details set to true", "tags": [ "5_13_4", + "since_v1.5.1", "sub-create" ], "setup": "Create initial ImplicitlyCreated @context", diff --git a/doc/files/jsonldContext/Consumption/053_08.json b/doc/files/jsonldContext/Consumption/053_08.json index e7f4ab39..3ac013e5 100644 --- a/doc/files/jsonldContext/Consumption/053_08.json +++ b/doc/files/jsonldContext/Consumption/053_08.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_08", "test_objective": "Check that the numberOfHits is increased after using a ImplicitlyCreated context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.4", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_4", "keywords": [ "Create initial ImplicitlyCreated @context", @@ -18,7 +18,8 @@ "doc": "Check that the numberOfHits is increased after using a ImplicitlyCreated context", "tags": [ "5_13_4", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", diff --git a/doc/files/jsonldContext/Provision/050_01.json b/doc/files/jsonldContext/Provision/050_01.json index 57437599..351033fb 100644 --- a/doc/files/jsonldContext/Provision/050_01.json +++ b/doc/files/jsonldContext/Provision/050_01.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_01", "test_objective": "Check that you can add a hosted @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_2", "keywords": [ "Add a valid @context", @@ -18,7 +18,8 @@ "doc": "Check that you can add a @context", "tags": [ "5_13_2", - "ctx-add" + "ctx-add", + "since_v1.5.1" ], "setup": null, "teardown": "Delete Initial @context", @@ -34,7 +35,8 @@ "doc": "Check that you can add a @context", "tags": [ "5_13_2", - "ctx-add" + "ctx-add", + "since_v1.5.1" ], "setup": null, "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Provision/050_02.json b/doc/files/jsonldContext/Provision/050_02.json index 26869ef8..7481c727 100644 --- a/doc/files/jsonldContext/Provision/050_02.json +++ b/doc/files/jsonldContext/Provision/050_02.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_02", "test_objective": "Check that you receive a 400 Bad Request creating a @context if the content is incorrect", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_2", "keywords": [ "Add @context scenarios", @@ -18,7 +18,8 @@ "doc": "Check that the payload include \"@context\"", "tags": [ "5_13_2", - "ctx-add" + "ctx-add", + "since_v1.5.1" ], "setup": null, "teardown": "Delete @context if it was created by error", @@ -34,7 +35,8 @@ "doc": "Check that the payload include \"@context\"", "tags": [ "5_13_2", - "ctx-add" + "ctx-add", + "since_v1.5.1" ], "setup": null, "teardown": "Delete @context if it was created by error", diff --git a/doc/files/jsonldContext/Provision/050_03.json b/doc/files/jsonldContext/Provision/050_03.json index b914e842..fd6cb2e7 100644 --- a/doc/files/jsonldContext/Provision/050_03.json +++ b/doc/files/jsonldContext/Provision/050_03.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_03", "test_objective": "Check that you can create a implicitlycreated @context through creating a subscription", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_2", "keywords": [ "Delete Initial @context Data" @@ -17,6 +17,7 @@ "doc": "Check that you can create a subscription", "tags": [ "5_13_2", + "since_v1.5.1", "sub-create" ], "setup": null, diff --git a/doc/files/jsonldContext/Provision/050_04.json b/doc/files/jsonldContext/Provision/050_04.json index 2bd94b0b..bd5c638d 100644 --- a/doc/files/jsonldContext/Provision/050_04.json +++ b/doc/files/jsonldContext/Provision/050_04.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_04", "test_objective": "Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.2", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_2", "keywords": [ "Delete Initial @context" @@ -17,7 +17,8 @@ "doc": "Check that you can add a @context", "tags": [ "5_13_2", - "ctx-add" + "ctx-add", + "since_v1.5.1" ], "setup": null, "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Provision/051_01.json b/doc/files/jsonldContext/Provision/051_01.json index 4ad9208f..b9722680 100644 --- a/doc/files/jsonldContext/Provision/051_01.json +++ b/doc/files/jsonldContext/Provision/051_01.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_01", "test_objective": "Check that you can delete a previous created hosted @context without reload param", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Create Initial hosted @context" @@ -17,7 +17,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial hosted @context", "teardown": null, diff --git a/doc/files/jsonldContext/Provision/051_02.json b/doc/files/jsonldContext/Provision/051_02.json index 793c031c..76e49549 100644 --- a/doc/files/jsonldContext/Provision/051_02.json +++ b/doc/files/jsonldContext/Provision/051_02.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_02", "test_objective": "Check that you get an error when trying to delete an unknown @context identifier", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [], "teardown": "None", @@ -15,7 +15,8 @@ "doc": "Check that an error message is obtained in the response when we try to delete a @context with unknonwn id", "tags": [ "5_13_5", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": null, "teardown": null, diff --git a/doc/files/jsonldContext/Provision/051_03.json b/doc/files/jsonldContext/Provision/051_03.json index d607c0ea..b9793a12 100644 --- a/doc/files/jsonldContext/Provision/051_03.json +++ b/doc/files/jsonldContext/Provision/051_03.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_03", "test_objective": "Check that you can delete a previous created cached @context without reload param", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Create Initial cached @context", @@ -18,7 +18,8 @@ "doc": "Check that you can delete a cached @context", "tags": [ "5_13_5", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial cached @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Provision/051_04.json b/doc/files/jsonldContext/Provision/051_04.json index 749ab3c1..f0716515 100644 --- a/doc/files/jsonldContext/Provision/051_04.json +++ b/doc/files/jsonldContext/Provision/051_04.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_04", "test_objective": "Check that you get an error when try to delete a @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Delete a @context with wrong data", @@ -19,7 +19,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -35,7 +36,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -51,7 +53,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -67,7 +70,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", @@ -83,7 +87,8 @@ "doc": "Check that you can delete a hosted @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create Initial @context", "teardown": "Delete Initial @context", diff --git a/doc/files/jsonldContext/Provision/051_05.json b/doc/files/jsonldContext/Provision/051_05.json index 2e413fab..808be2fa 100644 --- a/doc/files/jsonldContext/Provision/051_05.json +++ b/doc/files/jsonldContext/Provision/051_05.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_05", "test_objective": "Check that you get an error if we created an entity with a context (Cached context) and we try to delete it with reload=true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Create Initial @context condition from an external server", @@ -18,7 +18,8 @@ "doc": "Check that you get an error if we try to reload a cached context with no communication with the context server", "tags": [ "5_13_5", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", diff --git a/doc/files/jsonldContext/Provision/051_06.json b/doc/files/jsonldContext/Provision/051_06.json index 15290a2d..0088362e 100644 --- a/doc/files/jsonldContext/Provision/051_06.json +++ b/doc/files/jsonldContext/Provision/051_06.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_06", "test_objective": "Delete a @context whose kind is ImplicitlyCreated without reload param", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Create initial ImplicitlyCreated @context", @@ -18,7 +18,8 @@ "doc": "Check that we can delete a ImplicitlyCreated @context", "tags": [ "5_13_5", - "ctx-serve" + "ctx-serve", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", diff --git a/doc/files/jsonldContext/Provision/051_07.json b/doc/files/jsonldContext/Provision/051_07.json index 22ba8b49..3d022432 100644 --- a/doc/files/jsonldContext/Provision/051_07.json +++ b/doc/files/jsonldContext/Provision/051_07.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_07", "test_objective": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Create initial ImplicitlyCreated @context", @@ -18,7 +18,8 @@ "doc": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", diff --git a/doc/files/jsonldContext/Provision/051_08.json b/doc/files/jsonldContext/Provision/051_08.json index 82790061..34cfd487 100644 --- a/doc/files/jsonldContext/Provision/051_08.json +++ b/doc/files/jsonldContext/Provision/051_08.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_08", "test_objective": "Check that you get an error when try to delete the core @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Delete a core @context" @@ -17,7 +17,8 @@ "doc": "Check that you get an error when try to delete the core @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": null, "teardown": null, @@ -33,7 +34,8 @@ "doc": "Check that you get an error when try to delete the core @context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": null, "teardown": null, diff --git a/doc/files/jsonldContext/Provision/051_09.json b/doc/files/jsonldContext/Provision/051_09.json index b5b2c9b4..cf49bb0f 100644 --- a/doc/files/jsonldContext/Provision/051_09.json +++ b/doc/files/jsonldContext/Provision/051_09.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_09", "test_objective": "Check that you get an error when try to delete the core @context", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.13.5", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.5.1", "pics_selection": "PICS_5_13_5", "keywords": [ "Delete core context and reload it" @@ -17,7 +17,8 @@ "doc": "Delete a core @contexts with reload set to true and check downloaded core context", "tags": [ "5_13_5", - "ctx-delete" + "ctx-delete", + "since_v1.5.1" ], "setup": "Delete core context and reload it", "teardown": null, -- GitLab From e2b659ae65b768b81b522abb78bb3b7b1d82eeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 14 Mar 2024 20:30:06 +0100 Subject: [PATCH 18/25] Update READMEs content --- README.md | 2 +- doc/README.md | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 10ff8587..7326606a 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ server to listen to notifications (the address must be accessible by the context Default value: `0.0.0.0` and `8085`. - `context_source_host` and `context_source_port` : The address and port used for the context source. Default value: `0.0.0.0` and `8086`. -- `core_context`: The core context used by the Context Broker. +- `core_context`: The default cached core context used by the Brokers. When you execute locally the tests, you can leave the default values as they are. NGSI-LD Test Suite provides a mockup services to provide the notification functionality and therefore the notification_server_host can be diff --git a/doc/README.md b/doc/README.md index aee525a5..a4d2d1a1 100644 --- a/doc/README.md +++ b/doc/README.md @@ -19,14 +19,24 @@ requirements and python virtual environment already defined in [README.md](../RE The unit tests where divided into several groups following the NGSI-LD Test Suite Structure (ETSI RGS CIM 012) divided in test groups and subgroups: -- Group 1: Context Information (CI), Provision (PROV), defined in the [test_ContextInformation_Provision.py](./tests/test_ContextInformation_Provision.py) file. -- Group 2: Context Information (CI), Consumption (CONS), defined in the [test_ContextInformation_Consumption.py](./tests/test_ContextInformation_Consumption.py) file. -- Group 3: Context Information (CI), Subscription (SUB), defined in the [test_ContextInformation_Subscription.py](./tests/test_ContextInformation_Subscription.py) file. -- Group 4: Context Source (CS), Registration (REG), defined in the [test_ContextSource_Registration.py](./tests/test_ContextSource_Registration.py) file. -- Group 5: Context Source (CS), Discovery (DISC), defined in the [test_ContextSource_Discovery.py](./tests/test_ContextSource_Discovery.py) file. +- Group 1: Context Information (CI), Provision (PROV), defined in the +[test_ContextInformation_Provision.py](./tests/test_ContextInformation_Provision.py) file. +- Group 2: Context Information (CI), Consumption (CONS), defined in the +[test_ContextInformation_Consumption.py](./tests/test_ContextInformation_Consumption.py) file. +- Group 3: Context Information (CI), Subscription (SUB), defined in the +[test_ContextInformation_Subscription.py](./tests/test_ContextInformation_Subscription.py) file. +- Group 4: Context Source (CS), Registration (REG), defined in the +[test_ContextSource_Registration.py](./tests/test_ContextSource_Registration.py) file. +- Group 5: Context Source (CS), Discovery (DISC), defined in the +[test_ContextSource_Discovery.py](./tests/test_ContextSource_Discovery.py) file. - Group 6: Context Source (CS), Registration Subscription (REGSUB), defined in the [test_ContextSource_RegistrationSubscription.py](./tests/test_ContextSource_RegistrationSubscription.py) file. -- Group 7: Common Behaviours (CB), defined in the [test_CommonBehaviours.py]() file. +- Group 7: Common Behaviours (CB), defined in the +[test_CommonBehaviours.py](./tests/test_CommonBehaviours.py) file. +- Group 8: Storing, Managing and Serving @contexts (CTX), Consumption (CONS), defined in the +[test_jsonldContext_Consumption.py](./tests/test_jsonldContext_Consumption.py) file. +- Group 9: Storing, Managing and Serving @contexts (CTX), Provision (PROV), defined in the +[test_jsonldContext_Provision.py](./tests/test_jsonldContext_Provision.py) file. Additionally, a specific unit test called [test_CheckTests.py](./tests/test_CheckTests.py) was created to check that all robot files have the corresponding unit tests. @@ -37,6 +47,8 @@ divided into the NGSI-LD Test Suite Structure groups: - [CommonBehaviours](./files/CommonBehaviours) contains the expected results of the Common Behaviours robot files. - [ContextInformation](./files/ContextInformation) contains the expected results of the Context Information files. - [ContextSource](./files/ContextSource) contains the expected results of the Context Source files. +- [jsonldContext](./files/jsonldContext) contains the expected results of the Storing, Managing and Serving @contexts +files. ## Execution @@ -59,6 +71,10 @@ files. robot files. - [ContextSource RegistrationSubscription Unit Tests](../.idea/runConfigurations/ContextSource_RegistrationSubscription_Unit_Tests.xml) executes Context Source - Registration Subscription unit tests associated to the robot files. +- [jsonldContext Consumption Unit Tests](../.idea/runConfigurations/jsonldContext_Consumption_Unit_Tests.xml) executes Storing, Managing and Serving @contexts - Consumption unit tests +associated to the robot files. +- [jsonldContext Provision Unit Tests](../.idea/runConfigurations/jsonldContext_Provision_Unit_Tests.xml) executes Storing, Managing and Serving @contexts - Provision unit tests +associated to the robot files. - [Generate Documentation Data](../.idea/runConfigurations/Generate_Documentation_Data.xml) executes Generate Document Data unit tests associated to the unit test execution of a specific robot file (e.g. 047_01). The generated files are located in the [results](./results) folder. -- GitLab From f6dd0a02362697c5f800a6159d7b9046c423c3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 20 Mar 2024 19:44:29 +0100 Subject: [PATCH 19/25] Delete some extra strings introduced by mistake --- resources/ApiUtils/jsonldContext.resource | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/ApiUtils/jsonldContext.resource b/resources/ApiUtils/jsonldContext.resource index b1fae74f..bb220874 100644 --- a/resources/ApiUtils/jsonldContext.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -14,7 +14,7 @@ ${JSONLDCONTEXTS_ENDPOINT_PATH} jsonldContexts ${CONTENT_TYPE_JSON} application/json -${response} ${EMPTY}more +${response} ${EMPTY} @{ALLOWED_CONTEXT} Cached Hosted ImplicitlyCreated UserCreated -- GitLab From 30118f6420b007cabb4899b5f18258ac2fc03295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 20 Mar 2024 20:29:46 +0100 Subject: [PATCH 20/25] Resolution some problems with merge operations --- .../Consumption/Entity/QueryEntities/019_07.robot | 3 ++- doc/analysis/checks.py | 12 ++++-------- doc/analysis/generaterobotdata.py | 8 ++++++-- doc/files/ContextInformation/Consumption/019_07.json | 8 ++++---- .../RegistrationSubscription/039_01.json | 2 +- doc/files/jsonldContext/Consumption/052_01.json | 5 ++++- doc/files/jsonldContext/Consumption/052_02.json | 5 ++++- doc/files/jsonldContext/Consumption/052_03.json | 5 ++++- doc/files/jsonldContext/Consumption/052_04.json | 5 ++++- doc/files/jsonldContext/Consumption/052_05.json | 5 ++++- doc/files/jsonldContext/Consumption/052_06.json | 5 ++++- doc/files/jsonldContext/Consumption/053_01.json | 5 ++++- doc/files/jsonldContext/Consumption/053_02.json | 5 ++++- doc/files/jsonldContext/Consumption/053_03.json | 5 ++++- doc/files/jsonldContext/Consumption/053_04.json | 5 ++++- doc/files/jsonldContext/Consumption/053_05.json | 5 ++++- doc/files/jsonldContext/Consumption/053_06.json | 5 ++++- doc/files/jsonldContext/Consumption/053_07.json | 5 ++++- doc/files/jsonldContext/Consumption/053_08.json | 5 ++++- doc/files/jsonldContext/Provision/050_01.json | 5 ++++- doc/files/jsonldContext/Provision/050_02.json | 5 ++++- doc/files/jsonldContext/Provision/050_03.json | 5 ++++- doc/files/jsonldContext/Provision/050_04.json | 5 ++++- doc/files/jsonldContext/Provision/051_01.json | 5 ++++- doc/files/jsonldContext/Provision/051_02.json | 5 ++++- doc/files/jsonldContext/Provision/051_03.json | 5 ++++- doc/files/jsonldContext/Provision/051_04.json | 5 ++++- doc/files/jsonldContext/Provision/051_05.json | 5 ++++- doc/files/jsonldContext/Provision/051_06.json | 5 ++++- doc/files/jsonldContext/Provision/051_07.json | 5 ++++- doc/files/jsonldContext/Provision/051_08.json | 5 ++++- doc/files/jsonldContext/Provision/051_09.json | 5 ++++- 32 files changed, 125 insertions(+), 43 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot index 73484e24..91261d2c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot @@ -21,15 +21,16 @@ ${airQualityLevel}= airQualityLevel==6 *** Test Cases *** Q_PARAMETER EXPECTED_STATUS EXPECTED_COUNT 019_07_01 Check that the total number of matching results is returned if the count parameter is set to true and only the entity type is provided + [Tags] e-query 5_7_2 6_3_13 ${EMPTY} 200 2 019_07_02 Check that the total number of matching results is returned if the count parameter is set to true and a q parameter is provided + [Tags] e-query 5_7_2 6_3_13 ${airQualityLevel} 200 1 *** Keywords *** Query Entities With Count [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 5_7_2 6_3_13 [Arguments] ${q} ${expected_status_code} ${expected_count} ${response}= Query Entities ... entity_types=${entity_type} diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index 328dd9a2..0e96683b 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -116,8 +116,6 @@ class Checks: Checks.check_context_response_body_containing_a_list_of_identifiers, 'Check Context Response Body Containing a JSONObject with details of the @contexts': Checks.check_context_response_body_containing_a_jsonobject_with_details_of_the_contexts, - 'Check Dictionary Might Contain Additional Members': - Checks.check_dictionary_might_contain_additional_members, 'Check Context Response Body Content': Checks.check_context_response_body_content, 'Check Context Response Body Containing Detailed Information': @@ -129,7 +127,7 @@ class Checks: 'Check Response Kind set to': Checks.check_response_kind_set_to, 'Check Cached @Contexts': - Checks.check_cached_contexts + Checks.check_cached_contexts, 'Check Response Header is Empty': Checks.check_response_header_is_empty, 'Check Response Headers Link set to': @@ -353,10 +351,6 @@ class Checks: 'params': ['response', 'expected_length', 'list_contexts'], 'position': [0, 1, 2] }, - 'Check Dictionary Might Contain Additional Members': { - 'params': ['dictionary', 'key'], - 'position': [0, 1] - }, 'Check Context Response Body Content': { 'params': ['expectation_filename', 'response_body'], 'position': [0, 1] @@ -378,7 +372,9 @@ class Checks: 'position': [0, 1] }, 'Check Cached @Contexts': { - 'params': ['context'] + 'params': ['context'], + 'position': [0] + }, 'Check Response Header is Empty': { 'params': ['response_headers'], 'position': [0] diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 387b286d..f6b38f5e 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -149,8 +149,12 @@ class GenerateRobotData: aux = 'v1.3.1' - self.test_suite['reference'] = \ - f"ETSI GS CIM 009 V{aux.split('v')[1]} [], clause {self.test_suite['reference'].split('clause ')[1]}" + if 'clauses' in self.test_suite['reference']: + self.test_suite['reference'] = \ + f"ETSI GS CIM 009 V{aux.split('v')[1]} [], clauses {self.test_suite['reference'].split('clauses ')[1]}" + else: + self.test_suite['reference'] = \ + f"ETSI GS CIM 009 V{aux.split('v')[1]} [], clause {self.test_suite['reference'].split('clause ')[1]}" self.test_suite['parent_release'] = aux diff --git a/doc/files/ContextInformation/Consumption/019_07.json b/doc/files/ContextInformation/Consumption/019_07.json index 8b688e49..78c77725 100644 --- a/doc/files/ContextInformation/Consumption/019_07.json +++ b/doc/files/ContextInformation/Consumption/019_07.json @@ -22,9 +22,9 @@ "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_07_01", "doc": "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", "5_7_2", - "6_3_13" + "6_3_13", + "e-query" ], "setup": null, "teardown": null, @@ -39,9 +39,9 @@ "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_07_02", "doc": "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", "5_7_2", - "6_3_13" + "6_3_13", + "e-query" ], "setup": null, "teardown": null, diff --git a/doc/files/ContextSource/RegistrationSubscription/039_01.json b/doc/files/ContextSource/RegistrationSubscription/039_01.json index c6a334e7..dd62ff2c 100644 --- a/doc/files/ContextSource/RegistrationSubscription/039_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/039_01.json @@ -26,7 +26,7 @@ "setup": "Setup Initial Context Source Registration Subscriptions", "teardown": "Delete Initial Context Source Registration Subscriptions", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Update Context Source Registration Subscription with Response Status Code set to 204 and\n Update Context Source Registration Subscription with Response does not contain a body and\n Update Context Source Registration Subscription with Response reason set to 'No Content' and\n Retrieve Context Source Registration Subscription with Updated Entity set to ${entity}\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Context Source Registration Subscription with Response Status Code set to 204 and\n Update Context Source Registration Subscription with Response does not contain a body and\n Update Context Source Registration Subscription with Response reason set to 'No Content' and\n Retrieve Context Source Registration Subscription with Check Updated Entity and\n Query Parameter: 'updated_resource' set to 'subscription' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'PATCH'\n Update Context Source Registration Subscription with subscription id set to '${subscription_id}' and subscription update fragment set to '${subscription_update_fragment}'\n}", "http_verb": "PATCH", "endpoint": "csourceSubscriptions/{subscription_id}" diff --git a/doc/files/jsonldContext/Consumption/052_01.json b/doc/files/jsonldContext/Consumption/052_01.json index e5c67fdb..96b10fb0 100644 --- a/doc/files/jsonldContext/Consumption/052_01.json +++ b/doc/files/jsonldContext/Consumption/052_01.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "List @contexts with no previous created @context" ], diff --git a/doc/files/jsonldContext/Consumption/052_02.json b/doc/files/jsonldContext/Consumption/052_02.json index 7f883a0a..98834377 100644 --- a/doc/files/jsonldContext/Consumption/052_02.json +++ b/doc/files/jsonldContext/Consumption/052_02.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "Create Initial @context", "List @contexts with one previous created @context", diff --git a/doc/files/jsonldContext/Consumption/052_03.json b/doc/files/jsonldContext/Consumption/052_03.json index b0985b6b..f0b728af 100644 --- a/doc/files/jsonldContext/Consumption/052_03.json +++ b/doc/files/jsonldContext/Consumption/052_03.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "Create Initial set of @contexts", "List @contexts with several previous created @context", diff --git a/doc/files/jsonldContext/Consumption/052_04.json b/doc/files/jsonldContext/Consumption/052_04.json index 462ae632..140080c3 100644 --- a/doc/files/jsonldContext/Consumption/052_04.json +++ b/doc/files/jsonldContext/Consumption/052_04.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "List @contexts with no previous created @context" ], diff --git a/doc/files/jsonldContext/Consumption/052_05.json b/doc/files/jsonldContext/Consumption/052_05.json index ebf680f3..e07d23dd 100644 --- a/doc/files/jsonldContext/Consumption/052_05.json +++ b/doc/files/jsonldContext/Consumption/052_05.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "Create Initial set of @contexts", "List @contexts with several previous created @context", diff --git a/doc/files/jsonldContext/Consumption/052_06.json b/doc/files/jsonldContext/Consumption/052_06.json index d439f8b7..504354d5 100644 --- a/doc/files/jsonldContext/Consumption/052_06.json +++ b/doc/files/jsonldContext/Consumption/052_06.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_3", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", "keywords": [ "List @contexts with no previous created @context", "Create initial ImplicitlyCreated @context", diff --git a/doc/files/jsonldContext/Consumption/053_01.json b/doc/files/jsonldContext/Consumption/053_01.json index 484b4de5..570ce3e5 100644 --- a/doc/files/jsonldContext/Consumption/053_01.json +++ b/doc/files/jsonldContext/Consumption/053_01.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create Initial @context", "Serve a @context with details", diff --git a/doc/files/jsonldContext/Consumption/053_02.json b/doc/files/jsonldContext/Consumption/053_02.json index a77ddc49..406ebd8a 100644 --- a/doc/files/jsonldContext/Consumption/053_02.json +++ b/doc/files/jsonldContext/Consumption/053_02.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create Initial @context", "Serve a @context with details equal to true", diff --git a/doc/files/jsonldContext/Consumption/053_03.json b/doc/files/jsonldContext/Consumption/053_03.json index a8634268..f5627e04 100644 --- a/doc/files/jsonldContext/Consumption/053_03.json +++ b/doc/files/jsonldContext/Consumption/053_03.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Serve @context with no previous created @context", "Create Initial @context", diff --git a/doc/files/jsonldContext/Consumption/053_04.json b/doc/files/jsonldContext/Consumption/053_04.json index 8cf11768..97da09b1 100644 --- a/doc/files/jsonldContext/Consumption/053_04.json +++ b/doc/files/jsonldContext/Consumption/053_04.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create Initial @context condition from an external server", "Delete Initial @context condition from an external server" diff --git a/doc/files/jsonldContext/Consumption/053_05.json b/doc/files/jsonldContext/Consumption/053_05.json index 336db538..b57eab17 100644 --- a/doc/files/jsonldContext/Consumption/053_05.json +++ b/doc/files/jsonldContext/Consumption/053_05.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create Initial @context condition from an external server", "Delete Initial @context condition from an external server" diff --git a/doc/files/jsonldContext/Consumption/053_06.json b/doc/files/jsonldContext/Consumption/053_06.json index 03663e01..637c033e 100644 --- a/doc/files/jsonldContext/Consumption/053_06.json +++ b/doc/files/jsonldContext/Consumption/053_06.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create Initial @context condition from an external server", "Delete Initial @context condition from an external server" diff --git a/doc/files/jsonldContext/Consumption/053_07.json b/doc/files/jsonldContext/Consumption/053_07.json index f1cc9e38..4dcdf17c 100644 --- a/doc/files/jsonldContext/Consumption/053_07.json +++ b/doc/files/jsonldContext/Consumption/053_07.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create initial ImplicitlyCreated @context", "Delete Initial @context Data" diff --git a/doc/files/jsonldContext/Consumption/053_08.json b/doc/files/jsonldContext/Consumption/053_08.json index 3ac013e5..1b9fa6de 100644 --- a/doc/files/jsonldContext/Consumption/053_08.json +++ b/doc/files/jsonldContext/Consumption/053_08.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_4", + "clauses": [ + "5.13.4" + ], + "pics_selection": "", "keywords": [ "Create initial ImplicitlyCreated @context", "Delete Initial @context Data" diff --git a/doc/files/jsonldContext/Provision/050_01.json b/doc/files/jsonldContext/Provision/050_01.json index 351033fb..81e85d1b 100644 --- a/doc/files/jsonldContext/Provision/050_01.json +++ b/doc/files/jsonldContext/Provision/050_01.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_2", + "clauses": [ + "5.13.2" + ], + "pics_selection": "", "keywords": [ "Add a valid @context", "Delete Initial @context" diff --git a/doc/files/jsonldContext/Provision/050_02.json b/doc/files/jsonldContext/Provision/050_02.json index 7481c727..a71f1a43 100644 --- a/doc/files/jsonldContext/Provision/050_02.json +++ b/doc/files/jsonldContext/Provision/050_02.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_2", + "clauses": [ + "5.13.2" + ], + "pics_selection": "", "keywords": [ "Add @context scenarios", "Delete @context if it was created by error" diff --git a/doc/files/jsonldContext/Provision/050_03.json b/doc/files/jsonldContext/Provision/050_03.json index fd6cb2e7..5697a346 100644 --- a/doc/files/jsonldContext/Provision/050_03.json +++ b/doc/files/jsonldContext/Provision/050_03.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_2", + "clauses": [ + "5.13.2" + ], + "pics_selection": "", "keywords": [ "Delete Initial @context Data" ], diff --git a/doc/files/jsonldContext/Provision/050_04.json b/doc/files/jsonldContext/Provision/050_04.json index bd5c638d..69c8db3a 100644 --- a/doc/files/jsonldContext/Provision/050_04.json +++ b/doc/files/jsonldContext/Provision/050_04.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_2", + "clauses": [ + "5.13.2" + ], + "pics_selection": "", "keywords": [ "Delete Initial @context" ], diff --git a/doc/files/jsonldContext/Provision/051_01.json b/doc/files/jsonldContext/Provision/051_01.json index b9722680..5ee474db 100644 --- a/doc/files/jsonldContext/Provision/051_01.json +++ b/doc/files/jsonldContext/Provision/051_01.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Create Initial hosted @context" ], diff --git a/doc/files/jsonldContext/Provision/051_02.json b/doc/files/jsonldContext/Provision/051_02.json index 76e49549..23e4e53f 100644 --- a/doc/files/jsonldContext/Provision/051_02.json +++ b/doc/files/jsonldContext/Provision/051_02.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [], "teardown": "None", "initial_condition": "with {\n the SUT containing an initial state\n}", diff --git a/doc/files/jsonldContext/Provision/051_03.json b/doc/files/jsonldContext/Provision/051_03.json index b9793a12..7d5c38a2 100644 --- a/doc/files/jsonldContext/Provision/051_03.json +++ b/doc/files/jsonldContext/Provision/051_03.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Create Initial cached @context", "Delete Initial @context" diff --git a/doc/files/jsonldContext/Provision/051_04.json b/doc/files/jsonldContext/Provision/051_04.json index f0716515..2cbe982f 100644 --- a/doc/files/jsonldContext/Provision/051_04.json +++ b/doc/files/jsonldContext/Provision/051_04.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Delete a @context with wrong data", "Create Initial @context", diff --git a/doc/files/jsonldContext/Provision/051_05.json b/doc/files/jsonldContext/Provision/051_05.json index 808be2fa..65b9618e 100644 --- a/doc/files/jsonldContext/Provision/051_05.json +++ b/doc/files/jsonldContext/Provision/051_05.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Create Initial @context condition from an external server", "Delete Initial @context condition from an external server" diff --git a/doc/files/jsonldContext/Provision/051_06.json b/doc/files/jsonldContext/Provision/051_06.json index 0088362e..c9605a84 100644 --- a/doc/files/jsonldContext/Provision/051_06.json +++ b/doc/files/jsonldContext/Provision/051_06.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Create initial ImplicitlyCreated @context", "Delete Initial @context Data" diff --git a/doc/files/jsonldContext/Provision/051_07.json b/doc/files/jsonldContext/Provision/051_07.json index 3d022432..2eb82601 100644 --- a/doc/files/jsonldContext/Provision/051_07.json +++ b/doc/files/jsonldContext/Provision/051_07.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Create initial ImplicitlyCreated @context", "Delete Initial @context Data" diff --git a/doc/files/jsonldContext/Provision/051_08.json b/doc/files/jsonldContext/Provision/051_08.json index 34cfd487..87b06de6 100644 --- a/doc/files/jsonldContext/Provision/051_08.json +++ b/doc/files/jsonldContext/Provision/051_08.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Delete a core @context" ], diff --git a/doc/files/jsonldContext/Provision/051_09.json b/doc/files/jsonldContext/Provision/051_09.json index cf49bb0f..74fc282a 100644 --- a/doc/files/jsonldContext/Provision/051_09.json +++ b/doc/files/jsonldContext/Provision/051_09.json @@ -4,7 +4,10 @@ "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", - "pics_selection": "PICS_5_13_5", + "clauses": [ + "5.13.5" + ], + "pics_selection": "", "keywords": [ "Delete core context and reload it" ], -- GitLab From 41481bbe99c1b94127412e522a74d948d119f859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 20 Mar 2024 21:04:55 +0100 Subject: [PATCH 21/25] Separate API calls from assertions in jsonldContext.resource --- .../Consumption/ListContexts/052_01.robot | 1 + .../Consumption/ListContexts/052_02.robot | 1 + .../Consumption/ListContexts/052_03.robot | 1 + .../Consumption/ListContexts/052_04.robot | 1 + .../Consumption/ListContexts/052_05.robot | 1 + .../Consumption/ListContexts/052_06.robot | 1 + .../Consumption/ServeContext/053_01.robot | 1 + .../Consumption/ServeContext/053_02.robot | 1 + .../Consumption/ServeContext/053_03.robot | 1 + .../Consumption/ServeContext/053_04.robot | 1 + .../Provision/AddContext/050_01.robot | 1 + .../Provision/AddContext/050_02.robot | 1 + .../Provision/AddContext/050_04.robot | 1 + .../Provision/DeleteContext/051_01.robot | 1 + .../Provision/DeleteContext/051_02.robot | 1 + .../Provision/DeleteContext/051_03.robot | 1 + .../Provision/DeleteContext/051_04.robot | 1 + .../Provision/DeleteContext/051_06.robot | 1 + .../Provision/DeleteContext/051_07.robot | 1 + .../Provision/DeleteContext/051_08.robot | 1 + .../Provision/DeleteContext/051_09.robot | 1 + .../test_ContextInformation_Subscription.py | 6 - resources/ApiUtils/jsonldContext.resource | 178 ------------------ resources/AssertionUtils.resource | 177 +++++++++++++++++ 24 files changed, 198 insertions(+), 184 deletions(-) diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot index 0ee9e1c8..5543d6c8 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot @@ -2,6 +2,7 @@ Documentation Check that you can list all the @context available in the broker with no previous add @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Test Template List @contexts with no previous created @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot index d0804498..a638aa56 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot @@ -2,6 +2,7 @@ Documentation Check that you can list all the @context available in the broker with one add @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot index 08ed6e4d..fa5fecdf 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot @@ -2,6 +2,7 @@ Documentation Check that you can list all the @context available in the broker with several add @contexts Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial set of @contexts diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot index 468fcec2..ece295e6 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_04.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when try to list @context with wrong details or kind Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Test Template List @contexts with no previous created @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot index 9431befb..282a6377 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot @@ -2,6 +2,7 @@ Documentation Check that you can list all the @context available in the broker with several add @contexts with details equal to true Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial set of @contexts diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot index 009f1680..a4f4e515 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot @@ -2,6 +2,7 @@ Documentation Check that you can list all the @context available in the broker with no previous add @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Test Setup Create initial ImplicitlyCreated @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot index 6c210bb3..eab71356 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot @@ -2,6 +2,7 @@ Documentation Check that you can serve a previous created @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot index 3e9c1e6d..7773ce1f 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot @@ -2,6 +2,7 @@ Documentation Check that you can serve a previous created @context with details equal to True Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot index d728bd10..74efea15 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when try to serve a @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index 6b6d7027..3265e565 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -2,6 +2,7 @@ Documentation Check that you can get an increase numberOfHits after creation of a Hosted @context and using it Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/HttpUtils.resource diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot index d74151e0..c33d4475 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_01.robot @@ -2,6 +2,7 @@ Documentation Check that you can add a hosted @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Variables ${EXECDIR}/resources/variables.py diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot index 630feb37..926bcdf8 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_02.robot @@ -2,6 +2,7 @@ Documentation Check that you receive a 400 Bad Request creating a @context if the content is incorrect Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete @context if it was created by error diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index 513b1218..8ef82135 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -2,6 +2,7 @@ Documentation Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Teardown Delete Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot index dbfab5fc..4bf1b55d 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_01.robot @@ -2,6 +2,7 @@ Documentation Check that you can delete a previous created hosted @context without reload param Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial hosted @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot index 630f13c3..14761acb 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_02.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when trying to delete an unknown @context identifier Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource *** Variables *** diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index 40a5649a..b980ae71 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -2,6 +2,7 @@ Documentation Check that you can delete a previous created cached @context without reload param Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial cached @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot index a40ecb77..e73fbb7f 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when try to delete a @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot index deca9199..73b75ca3 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot @@ -2,6 +2,7 @@ Documentation Delete a @context whose kind is ImplicitlyCreated without reload param Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/HttpUtils.resource diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot index a75973fe..a7566cb8 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot @@ -2,6 +2,7 @@ Documentation Check that you cannot delete a ImplicitlyCreated @context with reload set to true Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Test Setup Create initial ImplicitlyCreated @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot index a490796d..ccf461e7 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_08.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when try to delete the core @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Template Delete a core @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot index 85bf04b7..84c6633f 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_09.robot @@ -2,6 +2,7 @@ Documentation Check that you get an error when try to delete the core @context Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource Variables ${EXECDIR}/resources/variables.py diff --git a/doc/tests/test_ContextInformation_Subscription.py b/doc/tests/test_ContextInformation_Subscription.py index 097a4a0a..1dbf52b5 100644 --- a/doc/tests/test_ContextInformation_Subscription.py +++ b/doc/tests/test_ContextInformation_Subscription.py @@ -280,8 +280,6 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) - print("WARNING, (029_06) there is a important miss alignment with the documentation") - def test_029_07(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/029_07.json' @@ -303,8 +301,6 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) - print("WARNING, (029_09) there is a important miss alignment with the documentation") - def test_029_10(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/029_10.json' @@ -312,8 +308,6 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) - print("WARNING, (029_10) there is a important miss alignment with the documentation") - def test_029_11(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/029_11.json' diff --git a/resources/ApiUtils/jsonldContext.resource b/resources/ApiUtils/jsonldContext.resource index bb220874..1546e9d3 100644 --- a/resources/ApiUtils/jsonldContext.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -1,12 +1,9 @@ *** Settings *** Variables ${EXECDIR}/resources/variables.py -Resource ${EXECDIR}/resources/AssertionUtils.resource Library ${EXECDIR}/libraries/logUtils.py Library Collections -Library JSONLibrary Library RequestsLibrary Library OperatingSystem -Library String *** Variables *** @@ -78,54 +75,6 @@ Delete a @context Output ${response} Delete a @context RETURN ${response} -Check Context Response Body Content - [Arguments] ${expectation_filename} ${response_body} - - ${context_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${expectation_filename} - Dictionaries Should Be Equal ${response_body} ${context_payload} - -Check Context Response Body Containing Detailed Information - [Arguments] ${response_body} ${context_type} - - Should Not Be Empty ${response_body['URL']} - Should Not Be Empty ${response_body['localId']} - Should Not Be Empty ${response_body['kind']} - - Should Be String ${response_body['URL']} - Should Be String ${response_body['localId']} - Should Be String ${response_body['kind']} - - IF $response_body['kind'] not in $ALLOWED_CONTEXT - fail The value of kind:"${response_body['kind']}" is not allowed - END - - Should Be Equal ${response_body['kind']} ${context_type} - - # TODO: v1.8.1 change timestamp -> createdAt - Should Not Be Empty ${response_body['timestamp']} - ${date}= Parse Ngsild Date ${response_body['timestamp']} - Should Not Be Equal - ... ${date} - ... ${None} - ... The createdAt key contains a value (${response_body['timestamp']}) that it is not in DateTime format - -Check Context Response Body Containing numberOfHits value - [Arguments] ${response_body} ${expected_number_of_hists} - - ${value}= Evaluate $response_body.get('numberOfHits') - - IF '${value}' != '' and '${value}' != 'None' - Log Expected number of hits: ${expected_number_of_hists} - Log Received number of hits: ${response_body['numberOfHits']} - - Should Be Equal As Numbers ${response_body['numberOfHits']} ${expected_number_of_hists} - END - -Check Context Response Kind - [Arguments] ${response_body} ${context_type} - - Should Be Equal ${response_body['kind']} ${context_type} - List @contexts [Arguments] ${details}=${EMPTY} ${kind}=${EMPTY} @@ -152,130 +101,3 @@ List @contexts Output ${response} List @contexts RETURN ${response} - -Check Context Response Body Containing a list of identifiers - [Arguments] ${response_body} ${expected_length} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} - - Length Should Be - ... ${response_body} - ... ${expected_length} - ... msg=The length of the strings array of @contexts is not ${expected_length} - - IF ${expected_length}==0 - Should Be Empty ${response_body} - ELSE - IF ${expected_length}==1 - ${length_list_contexts}= Get Length ${list_contexts} - IF '${kind}' == 'Cached' or ${length_list_contexts} == 0 - Should Be Equal ${response_body[0]} ${core_context} - ELSE - List Should Contain Value - ... ${list_contexts} - ... ${response_body[0]} - ... msg=The received @context ${response_body[0]} is not included in the list of expected @contexts: ${list_contexts} - END - ELSE - IF ${expected_length}>1 - IF '${kind}' == '' - Should Be Equal ${response_body[0]} ${core_context} - ELSE - FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} - Should Be Equal ${response_body[${index}]} ${uri_context} - END - END - END - END - END - -Check Context Response Body Containing a list with several URLs - [Arguments] ${response_body} ${expected_length} ${list_contexts} - - Length Should Be - ... ${response_body} - ... ${expected_length} - ... msg=The length of the strings array of @contexts is not ${expected_length} - - Should Be Equal ${response_body[0]} ${core_context} - - FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} - Log URI: ${uri_context} index: ${index} - ${index}= Evaluate ${index} + 1 - - Should Be Equal ${response_body[${index}]} ${uri_context} - END - -Check Cached @Contexts - [Arguments] ${filename} - - ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} - ${contexts}= Get From Dictionary ${entity_payload} @context - - &{params}= Create Dictionary - Set To Dictionary ${params} details=true - - FOR ${contextId} IN @{contexts} - ${response}= Serve a @context ${contextId} true - Check Response Kind set to ${response.json()} Cached - END - -Check Context Detailed Information Keys - [Arguments] ${my_dict} - - # TODO: spec v1.8.1 timestamp -> createdAt - ${expected_keys}= Create List URL localId kind createdAt lastUsage numberOfHits extraInfo - ${actual_keys}= Get Dictionary Keys ${my_dict} - - FOR ${key} IN @{expected_keys} - Remove Values From List ${actual_keys} ${key} - END - - Should Be Empty - ... ${actual_keys} - ... msg=The @context detailed information contains keys not expected: ${actual_keys} - -Check Context Response Body Containing a JSONObject with details of the @contexts - [Arguments] ${response} ${expected_length} ${list_contexts} - - ${obtained_length}= Get Length ${response} - Length Should Be - ... ${response} - ... ${expected_length} - ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} - - FOR ${index} ${item} IN ENUMERATE @{response} - ${URL}= Get From Dictionary ${item} URL - IF '${URL}'=='${core_context}' - ${context_kind}= Set Variable Cached - ELSE - ${context_kind}= Set Variable Hosted - END - - # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values - Check Context Response Body Containing Detailed Information ${item} ${context_kind} - - # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${item} lastUsage - Check Dictionary Might Contain Additional Members ${item} numberOfHits - - # Check that there is no other keys - Check Context Detailed Information Keys ${item} - END - -Check Context Response Body Containing a JSONObject with details of a ImplicitlyCreated @contexts - [Arguments] ${response} ${expected_length} - - ${obtained_length}= Get Length ${response} - Length Should Be - ... ${response} - ... ${expected_length} - ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} - - # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values - Check Context Response Body Containing Detailed Information ${response}[0] ImplicitlyCreated - - # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response}[0] lastUsage - Check Dictionary Might Contain Additional Members ${response}[0] numberOfHits - - # Check that there is no other keys - Check Context Detailed Information Keys ${response}[0] diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 03612141..ffd89439 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -1,10 +1,12 @@ *** Settings *** Library ${EXECDIR}/libraries/assertionUtils.py +Library ${EXECDIR}/libraries/dateTimeUtils.py Library RequestsLibrary Library Collections Library JSONLibrary Library String Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource *** Variables *** @@ -542,3 +544,178 @@ Check Response Body Contains DateTime Value ... ${expected value} ... ${obtained value} ... The expected value (${expected value}) is not the same as the obtained value (${obtained value}) + +Check Context Response Body Content + [Arguments] ${expectation_filename} ${response_body} + + ${context_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${expectation_filename} + Dictionaries Should Be Equal ${response_body} ${context_payload} + +Check Context Response Body Containing Detailed Information + [Arguments] ${response_body} ${context_type} + + Should Not Be Empty ${response_body['URL']} + Should Not Be Empty ${response_body['localId']} + Should Not Be Empty ${response_body['kind']} + + Should Be String ${response_body['URL']} + Should Be String ${response_body['localId']} + Should Be String ${response_body['kind']} + + IF $response_body['kind'] not in $ALLOWED_CONTEXT + fail The value of kind:"${response_body['kind']}" is not allowed + END + + Should Be Equal ${response_body['kind']} ${context_type} + + # TODO: v1.8.1 change timestamp -> createdAt + Should Not Be Empty ${response_body['timestamp']} + ${date}= Parse Ngsild Date ${response_body['timestamp']} + Should Not Be Equal + ... ${date} + ... ${None} + ... The createdAt key contains a value (${response_body['timestamp']}) that it is not in DateTime format + +Check Context Response Body Containing numberOfHits value + [Arguments] ${response_body} ${expected_number_of_hists} + + ${value}= Evaluate $response_body.get('numberOfHits') + + IF '${value}' != '' and '${value}' != 'None' + Log Expected number of hits: ${expected_number_of_hists} + Log Received number of hits: ${response_body['numberOfHits']} + + Should Be Equal As Numbers ${response_body['numberOfHits']} ${expected_number_of_hists} + END + +Check Context Response Kind + [Arguments] ${response_body} ${context_type} + + Should Be Equal ${response_body['kind']} ${context_type} + +Check Context Response Body Containing a list of identifiers + [Arguments] ${response_body} ${expected_length} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} + + Length Should Be + ... ${response_body} + ... ${expected_length} + ... msg=The length of the strings array of @contexts is not ${expected_length} + + IF ${expected_length}==0 + Should Be Empty ${response_body} + ELSE + IF ${expected_length}==1 + ${length_list_contexts}= Get Length ${list_contexts} + IF '${kind}' == 'Cached' or ${length_list_contexts} == 0 + Should Be Equal ${response_body[0]} ${core_context} + ELSE + List Should Contain Value + ... ${list_contexts} + ... ${response_body[0]} + ... msg=The received @context ${response_body[0]} is not included in the list of expected @contexts: ${list_contexts} + END + ELSE + IF ${expected_length}>1 + IF '${kind}' == '' + Should Be Equal ${response_body[0]} ${core_context} + ELSE + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + Should Be Equal ${response_body[${index}]} ${uri_context} + END + END + END + END + END + +Check Context Response Body Containing a list with several URLs + [Arguments] ${response_body} ${expected_length} ${list_contexts} + + Length Should Be + ... ${response_body} + ... ${expected_length} + ... msg=The length of the strings array of @contexts is not ${expected_length} + + Should Be Equal ${response_body[0]} ${core_context} + + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + Log URI: ${uri_context} index: ${index} + ${index}= Evaluate ${index} + 1 + + Should Be Equal ${response_body[${index}]} ${uri_context} + END + +Check Cached @Contexts + [Arguments] ${filename} + + ${entity_payload}= Load JSON From File ${EXECDIR}/data/jsonldContext/${filename} + ${contexts}= Get From Dictionary ${entity_payload} @context + + &{params}= Create Dictionary + Set To Dictionary ${params} details=true + + FOR ${contextId} IN @{contexts} + ${response}= Serve a @context ${contextId} true + Check Response Kind set to ${response.json()} Cached + END + +Check Context Detailed Information Keys + [Arguments] ${my_dict} + + # TODO: spec v1.8.1 timestamp -> createdAt + ${expected_keys}= Create List URL localId kind createdAt lastUsage numberOfHits extraInfo + ${actual_keys}= Get Dictionary Keys ${my_dict} + + FOR ${key} IN @{expected_keys} + Remove Values From List ${actual_keys} ${key} + END + + Should Be Empty + ... ${actual_keys} + ... msg=The @context detailed information contains keys not expected: ${actual_keys} + +Check Context Response Body Containing a JSONObject with details of the @contexts + [Arguments] ${response} ${expected_length} ${list_contexts} + + ${obtained_length}= Get Length ${response} + Length Should Be + ... ${response} + ... ${expected_length} + ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} + + FOR ${index} ${item} IN ENUMERATE @{response} + ${URL}= Get From Dictionary ${item} URL + IF '${URL}'=='${core_context}' + ${context_kind}= Set Variable Cached + ELSE + ${context_kind}= Set Variable Hosted + END + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${item} ${context_kind} + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${item} lastUsage + Check Dictionary Might Contain Additional Members ${item} numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${item} + END + +Check Context Response Body Containing a JSONObject with details of a ImplicitlyCreated @contexts + [Arguments] ${response} ${expected_length} + + ${obtained_length}= Get Length ${response} + Length Should Be + ... ${response} + ... ${expected_length} + ... msg=The expected number of @contexts was ${expected_length} but we have obtained ${obtained_length} + + # Check mandatory keys in the response (URL, localId, kind, timestamp) and their possible values + Check Context Response Body Containing Detailed Information ${response}[0] ImplicitlyCreated + + # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values + Check Dictionary Might Contain Additional Members ${response}[0] lastUsage + Check Dictionary Might Contain Additional Members ${response}[0] numberOfHits + + # Check that there is no other keys + Check Context Detailed Information Keys ${response}[0] -- GitLab From 9a85da943f0480d999ca425799741154a35a67e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Wed, 20 Mar 2024 22:15:48 +0100 Subject: [PATCH 22/25] Split optional NotificationParams into Optional Fields and NotificationParams --- .../038_01.robot | 8 +-- .../040_01.robot | 8 +-- .../Consumption/ServeContext/053_02.robot | 5 +- .../Consumption/ServeContext/053_05.robot | 5 +- .../Consumption/ServeContext/053_07.robot | 5 +- doc/analysis/checks.py | 30 +++++++----- .../RegistrationSubscription/038_01.json | 2 +- .../RegistrationSubscription/040_01.json | 2 +- .../jsonldContext/Consumption/053_02.json | 2 +- .../jsonldContext/Consumption/053_05.json | 2 +- .../jsonldContext/Consumption/053_07.json | 2 +- resources/AssertionUtils.resource | 49 +++++++++++++++---- 12 files changed, 80 insertions(+), 40 deletions(-) diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot index 9f671e39..a6fae889 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot @@ -37,10 +37,10 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample Check Created Resource Set To ${subscription_payload} ${response1.json()} ${ignored_attributes} - Check Dictionary Might Contain Additional Members ${response1.json()} lastNotification - Check Dictionary Might Contain Additional Members ${response1.json()} lastFailure - Check Dictionary Might Contain Additional Members ${response1.json()} lastSuccess - Check Dictionary Might Contain Additional Members ${response1.json()} timesSent + Check Response Body Might Contain Additional Members of the NotificationParams ${response1.json()} lastNotification + Check Response Body Might Contain Additional Members of the NotificationParams ${response1.json()} lastFailure + Check Response Body Might Contain Additional Members of the NotificationParams ${response1.json()} lastSuccess + Check Response Body Might Contain Additional Members of the NotificationParams ${response1.json()} timesSent *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot index 8af89771..bccac10d 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot @@ -51,10 +51,10 @@ ${expectation_file_path}= csourceSubscriptions/expectations/subscr ... response_body=${response.json()} ... ignored_keys=${ignored_attributes} - Check Dictionary Might Contain Additional Members ${response.json()} lastNotification - Check Dictionary Might Contain Additional Members ${response.json()} lastFailure - Check Dictionary Might Contain Additional Members ${response.json()} lastSuccess - Check Dictionary Might Contain Additional Members ${response.json()} timesSent + Check Response Body Might Contain Additional Members of the NotificationParams ${response.json()} lastNotification + Check Response Body Might Contain Additional Members of the NotificationParams ${response.json()} lastFailure + Check Response Body Might Contain Additional Members of the NotificationParams ${response.json()} lastSuccess + Check Response Body Might Contain Additional Members of the NotificationParams ${response.json()} timesSent *** Keywords *** diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot index 7773ce1f..ba065950 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_02.robot @@ -43,8 +43,9 @@ Serve a @context with details equal to true Check Context Response Body Containing Detailed Information ${response.json()} ${context_type} # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response.json()} lastUsage - Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} lastUsage + Check Response Body Might Contain Optional Fields ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} extraInfo # Check that there is no other keys Check Context Detailed Information Keys ${response.json()} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 394576e6..b45ad211 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -42,8 +42,9 @@ ${reason_200}= OK Check Context Response Body Containing Detailed Information ${response.json()} Cached # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response.json()} lastUsage - Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} lastUsage + Check Response Body Might Contain Optional Fields ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} extraInfo # Check that there is no other keys Check Context Detailed Information Keys ${response.json()} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot index 4736f59e..1b1a275f 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot @@ -31,8 +31,9 @@ ${reason_200}= OK Check Context Response Body Containing Detailed Information ${response.json()} ImplicitlyCreated # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response.json()} lastUsage - Check Dictionary Might Contain Additional Members ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} lastUsage + Check Response Body Might Contain Optional Fields ${response.json()} numberOfHits + Check Response Body Might Contain Optional Fields ${response.json()} extraInfo # Check that there is no other keys Check Context Detailed Information Keys ${response.json()} diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index 0e96683b..31938872 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -62,8 +62,10 @@ class Checks: Checks.check_response_body_contains_datetime_value, 'Check Response Body Containing ProblemDetails Element Containing Title Element': Checks.check_response_body_containing_problemdetails_element_containing_title_element, - 'Check Dictionary Might Contain Additional Members': - Checks.check_dictionary_might_contain_additional_members, + 'Check Response Body Might Contain Additional Members of the NotificationParams': + Checks.check_response_body_might_contain_additional_members_notification_params, + 'Check Response Body Might Contain Optional Fields': + Checks.check_response_body_might_contain_optional_fields, 'Check Response Body Containing ProblemDetails Element': Checks.check_response_body_containing_problemdetails_element, 'Check RL Response Body Containing ProblemDetails Element Containing Type Element set to': @@ -165,7 +167,11 @@ class Checks: 'params': ['response_body'], 'position': [0] }, - 'Check Dictionary Might Contain Additional Members': { + 'Check Response Body Might Contain Additional Members of the NotificationParams': { + 'params': ['dictionary', 'key'], + 'position': [0, 1] + }, + 'Check Response Body Might Contain Optional Fields': { 'params': ['dictionary', 'key'], 'position': [0, 1] }, @@ -517,9 +523,16 @@ class Checks: raise Exception(f"ERROR, Expected 'response_body' and 'context_type' parameters but received: {kwargs}") @staticmethod - def check_dictionary_might_contain_additional_members(kwargs: list) -> str: + def check_response_body_might_contain_additional_members_notification_params(kwargs: list) -> str: if 'dictionary' in kwargs and 'key' in kwargs: - return f"The dictionary `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" + return f"The Response Body `{kwargs['dictionary']}' might contain the key '{kwargs['key']}' in the NotificationParams" + else: + raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") + + @staticmethod + def check_response_body_might_contain_optional_fields(kwargs: list) -> str: + if 'dictionary' in kwargs and 'key' in kwargs: + return f"The Response Body `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" else: raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") @@ -566,13 +579,6 @@ class Checks: def check_response_headers_id_not_empty(kwargs: list) -> str: return 'Response Header: Location is not Empty' - @staticmethod - def check_dictionary_might_contain_additional_members(kwargs: list) -> str: - if 'dictionary' in kwargs and 'key' in kwargs: - return f"The dictionary `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" - else: - raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") - @staticmethod def check_response_body_containing_an_attribute_set_to(kwargs: list) -> str: expected_parameters = ['checks', 'expected_attribute_name', 'response_body', 'expected_attribute_value'] diff --git a/doc/files/ContextSource/RegistrationSubscription/038_01.json b/doc/files/ContextSource/RegistrationSubscription/038_01.json index 5577c37f..e846d9a5 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_01.json @@ -26,7 +26,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastNotification' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastFailure' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'lastSuccess' and\n Retrieve Context Source Registration Subscription with The dictionary `${response1.json()}' might contain the key 'timesSent'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastFailure' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastSuccess' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'timesSent' in the NotificationParams\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions'\n method set to 'POST'\n Create Context Source Registration Subscription with filename set to '${subscription_payload}', accept set to '${EMPTY}', and content-type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "csourceSubscriptions" diff --git a/doc/files/ContextSource/RegistrationSubscription/040_01.json b/doc/files/ContextSource/RegistrationSubscription/040_01.json index 43c2dba4..d41021bc 100644 --- a/doc/files/ContextSource/RegistrationSubscription/040_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/040_01.json @@ -26,7 +26,7 @@ "setup": "Setup Initial Context Source Registration Subscription", "teardown": "Delete Created Context Source Registration Subscription", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Context Source Registration Subscription with Response Status Code set to 200 and\n Retrieve Context Source Registration Subscription with Response reason set to 'OK' and\n Retrieve Context Source Registration Subscription with The response headers Link is set to 'expected_link_header=${expected link header}' and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'created_resource' set to 'expectation_payload' and\n Query Parameter: 'response_body' set to 'response.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes' list of keys and\n Retrieve Context Source Registration Subscription with The dictionary `${response.json()}' might contain the key 'lastNotification' and\n Retrieve Context Source Registration Subscription with The dictionary `${response.json()}' might contain the key 'lastFailure' and\n Retrieve Context Source Registration Subscription with The dictionary `${response.json()}' might contain the key 'lastSuccess' and\n Retrieve Context Source Registration Subscription with The dictionary `${response.json()}' might contain the key 'timesSent'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Context Source Registration Subscription with Response Status Code set to 200 and\n Retrieve Context Source Registration Subscription with Response reason set to 'OK' and\n Retrieve Context Source Registration Subscription with The response headers Link is set to 'expected_link_header=${expected link header}' and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'created_resource' set to 'expectation_payload' and\n Query Parameter: 'response_body' set to 'response.json()' and\n Query Parameter: 'ignored_keys' set to 'ignored_attributes' list of keys and\n Retrieve Context Source Registration Subscription with The Response Body `${response.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response.json()}' might contain the key 'lastFailure' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response.json()}' might contain the key 'lastSuccess' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response.json()}' might contain the key 'timesSent' in the NotificationParams\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions/{subscription_id}'\n method set to 'GET'\n Retrieve Context Source Registration Subscription with data: and\n Query Parameter: subscription id set to '${subscription_id}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "csourceSubscriptions/{subscription_id}" diff --git a/doc/files/jsonldContext/Consumption/053_02.json b/doc/files/jsonldContext/Consumption/053_02.json index 406ebd8a..a26a7797 100644 --- a/doc/files/jsonldContext/Consumption/053_02.json +++ b/doc/files/jsonldContext/Consumption/053_02.json @@ -28,7 +28,7 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "Serve a @context with details equal to true", - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Hosted', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Hosted', and 'timestamp and 'DateTime' format and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'extraInfo' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/doc/files/jsonldContext/Consumption/053_05.json b/doc/files/jsonldContext/Consumption/053_05.json index b57eab17..dafa52ee 100644 --- a/doc/files/jsonldContext/Consumption/053_05.json +++ b/doc/files/jsonldContext/Consumption/053_05.json @@ -27,7 +27,7 @@ "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'extraInfo' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/doc/files/jsonldContext/Consumption/053_07.json b/doc/files/jsonldContext/Consumption/053_07.json index 4dcdf17c..5100058c 100644 --- a/doc/files/jsonldContext/Consumption/053_07.json +++ b/doc/files/jsonldContext/Consumption/053_07.json @@ -27,7 +27,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'ImplicitlyCreated', and 'timestamp and 'DateTime' format and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The dictionary `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'ImplicitlyCreated', and 'timestamp and 'DateTime' format and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'extraInfo' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${implicit_id}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index ffd89439..791f6453 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -481,17 +481,17 @@ Check Retrieving Context Source Registration ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} -Check Dictionary Might Contain Additional Members +Check Response Body Might Contain Additional Members of the NotificationParams # Check the Additional Members 5.2.14.2 in the NotificationParams data structure [Arguments] ${dictionary} ${key} - Log Dictionary Might Contain Key with a specific type - Log Dictionary: ${dictionary} + Log Check Response Body Might Contain Additional Members of the NotificationParams + Log Response Body: ${dictionary} Log Key: ${key} ${value}= Evaluate $dictionary.get($key) IF '${value}' != '' and '${value}' != 'None' - IF "${key}" == "lastNotification" or "${key}" == "lastFailure" or "${key}" == "lastSuccess" or "${key}" == "lastUsage" or "${key}" == "expiresAt" + IF "${key}" == "lastNotification" or "${key}" == "lastFailure" or "${key}" == "lastSuccess" # Need to check that there is a DateTime value ${type date}= Parse Ngsild Date ${dictionary}[${key}] Should Not Be Equal @@ -499,7 +499,36 @@ Check Dictionary Might Contain Additional Members ... ${None} ... The Additional Member ${key} contains a value (${value}) that it is not in DateTime format END - IF "${key}" == "timesSent" or "${key}" == "throttling" or "${key}" == "timeInterval" or "${key}" == "numberOfHits" + IF "${key}" == "timesSent" + # Need to check that there is a Integer value + ${type int}= Evaluate type(${dictionary}[${key}]).__name__ + Should Be Equal + ... ${type int} + ... int + ... The Additonal Member ${key} contains a value (${value}) that it is not in Number format + END + ELSE + Log The key '${key}' is not present in the dictionary + END + +Check Response Body Might Contain Optional Fields + [Arguments] ${dictionary} ${key} + Log Check Response Body Might Contain Optional Fields + Log Response Body: ${dictionary} + Log Key: ${key} + + ${value}= Evaluate $dictionary.get($key) + + IF '${value}' != '' and '${value}' != 'None' + IF "${key}" == "expiresAt" or "${key}" == "lastUsage" + # Need to check that there is a DateTime value + ${type date}= Parse Ngsild Date ${dictionary}[${key}] + Should Not Be Equal + ... ${type date} + ... ${None} + ... The Additional Member ${key} contains a value (${value}) that it is not in DateTime format + END + IF "${key}" == "throttling" or "${key}" == "timeInterval" or "${key}" == "numberOfHits" # Need to check that there is a Integer value ${type int}= Evaluate type(${dictionary}[${key}]).__name__ Should Be Equal @@ -694,8 +723,9 @@ Check Context Response Body Containing a JSONObject with details of the @context Check Context Response Body Containing Detailed Information ${item} ${context_kind} # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${item} lastUsage - Check Dictionary Might Contain Additional Members ${item} numberOfHits + Check Response Body Might Contain Optional Fields ${response}[0] lastUsage + Check Response Body Might Contain Optional Fields ${response}[0] numberOfHits + Check Response Body Might Contain Optional Fields ${response}[0] extraInfo # Check that there is no other keys Check Context Detailed Information Keys ${item} @@ -714,8 +744,9 @@ Check Context Response Body Containing a JSONObject with details of a Implicitly Check Context Response Body Containing Detailed Information ${response}[0] ImplicitlyCreated # Check optional keys in the response (lastUsage, numberOfHits, extraInfo) and their possible values - Check Dictionary Might Contain Additional Members ${response}[0] lastUsage - Check Dictionary Might Contain Additional Members ${response}[0] numberOfHits + Check Response Body Might Contain Optional Fields ${response}[0] lastUsage + Check Response Body Might Contain Optional Fields ${response}[0] numberOfHits + Check Response Body Might Contain Optional Fields ${response}[0] extraInfo # Check that there is no other keys Check Context Detailed Information Keys ${response}[0] -- GitLab From 94e4c7af7047adb86bf7367142d2464c4dcb4140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Thu, 21 Mar 2024 10:53:21 +0100 Subject: [PATCH 23/25] Create specific variables for the Context Server provider --- README.md | 2 ++ TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot | 2 +- TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot | 2 +- TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot | 2 +- resources/ContextServerUtils.resource | 2 +- resources/variables.py | 2 ++ 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e53cc348..5b539933 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ server to listen to notifications (the address must be accessible by the context Default value: `0.0.0.0` and `8085`. - `context_source_host` and `context_source_port` : The address and port used for the context source. Default value: `0.0.0.0` and `8086`. +- `context_server_host` and `context_server_port` : The address and port used for the context server provider. +Default value: `0.0.0.0` and `8087`. - `core_context`: The default cached core context used by the Brokers. When you execute locally the tests, you can leave the default values as they are. NGSI-LD Test Suite provides diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index b45ad211..8db4a2c4 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -54,7 +54,7 @@ ${reason_200}= OK Create Initial @context condition from an external server Start @context Local Server - ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} Set Global Variable ${uri} Create Entity selecting @context ${entityfile} ${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index 184fbf4b..07189824 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -50,7 +50,7 @@ Create Initial @context condition from an external server ${first_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} - ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} Set Global Variable ${uri} Create Entity selecting @context ${entityfile} ${uri} ${first_existing_entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index 74ebfb29..a1add01e 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -42,7 +42,7 @@ ${uri} /api/v1/context.jsonld Create Initial @context condition from an external server Start @context Local Server - ${uri}= Catenate http://${context_source_host}:${context_source_port}${uri} + ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} Set Global Variable ${uri} Create Entity selecting @context ${entityfile} ${uri} diff --git a/resources/ContextServerUtils.resource b/resources/ContextServerUtils.resource index 86b421e8..4eeb0957 100644 --- a/resources/ContextServerUtils.resource +++ b/resources/ContextServerUtils.resource @@ -12,7 +12,7 @@ ${filename}= @context-minimal-valid.json *** Keywords *** Start @context Local Server - [Arguments] ${host}=${context_source_host} ${port}=${context_source_port} + [Arguments] ${host}=${context_server_host} ${port}=${context_server_port} # Initialize HTTP Server Start Server ${host} ${port} diff --git a/resources/variables.py b/resources/variables.py index df01c29a..31553f93 100644 --- a/resources/variables.py +++ b/resources/variables.py @@ -5,4 +5,6 @@ notification_server_host = '0.0.0.0' notification_server_port = 8085 context_source_host = '0.0.0.0' context_source_port = 8086 +context_server_host = '0.0.0.0' +context_server_port = 8087 core_context = 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' \ No newline at end of file -- GitLab From 9d99ed3ce9bbc2457def8a19a8909ad0c132acaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Fri, 22 Mar 2024 16:09:21 +0100 Subject: [PATCH 24/25] Resolution of execution problems of python scripts in doc folder --- doc/__init__.py | 0 doc/analysis/generaterobotdata.py | 8 ++-- doc/analysis/parserobotfile.py | 4 +- doc/generateDocumentationData.py | 7 +++- doc/statisticsDocumentationData.py | 66 ++++++++++++++++++------------ 5 files changed, 51 insertions(+), 34 deletions(-) delete mode 100644 doc/__init__.py diff --git a/doc/__init__.py b/doc/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index f6b38f5e..0c6c7b39 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -1,9 +1,9 @@ from os.path import dirname from robot.api import TestSuiteBuilder -from doc.analysis.parserobotfile import ParseRobotFile -from doc.analysis.parseapiutilsfile import ParseApiUtilsFile -from doc.analysis.parsevariablesfile import ParseVariablesFile -from doc.analysis.initial_setup import InitialSetup +from analysis.parserobotfile import ParseRobotFile +from analysis.parseapiutilsfile import ParseApiUtilsFile +from analysis.parsevariablesfile import ParseVariablesFile +from analysis.initial_setup import InitialSetup from re import match, findall, finditer, sub, MULTILINE diff --git a/doc/analysis/parserobotfile.py b/doc/analysis/parserobotfile.py index 55ba5270..07ad1326 100644 --- a/doc/analysis/parserobotfile.py +++ b/doc/analysis/parserobotfile.py @@ -1,7 +1,7 @@ import re import os -from doc.analysis.checks import Checks -from doc.analysis.requests import Requests +from analysis.checks import Checks +from analysis.requests import Requests class ParseRobotFile: diff --git a/doc/generateDocumentationData.py b/doc/generateDocumentationData.py index c33d4a12..71983e2b 100644 --- a/doc/generateDocumentationData.py +++ b/doc/generateDocumentationData.py @@ -14,6 +14,10 @@ def create_json_of_robotfile(robot_file_to_be_processed: str, computestatistics: robot_path_to_be_processed, robot_file = find_robot_file(basedir=folder_test_suites, filename=robot_file_to_be_processed) + if robot_path_to_be_processed is None and robot_file is None: + print(f'No robot file found with the name: {robot_file_to_be_processed}') + exit(1) + # Check that the folder '/results' exists and if not, create it if not exists(folder_result_path): makedirs(folder_result_path) @@ -58,4 +62,5 @@ if __name__ == "__main__": args = argv[1:] robot_file_tbp = args[0] resulting_json = create_json_of_robotfile(robot_file_tbp) - print("Correctly exiting") + + print("\nCorrectly exiting") diff --git a/doc/statisticsDocumentationData.py b/doc/statisticsDocumentationData.py index 35b53130..507be998 100644 --- a/doc/statisticsDocumentationData.py +++ b/doc/statisticsDocumentationData.py @@ -1,7 +1,7 @@ from generateDocumentationData import create_json_of_robotfile -from os.path import dirname +from os.path import dirname, join from os import walk -import requests +from requests import delete, post import json import re @@ -13,7 +13,7 @@ if __name__ == "__main__": number_of_all_testcases = 0 number_of_successes = 0 ROBOT_FILE_EXTENSION = ".robot" - BASE_URL_OF_FORGE="https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/blob/tests-up-to-1_5/TP/NGSI-LD/" + BASE_URL_OF_FORGE = "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/blob/tests-up-to-1_5/TP/NGSI-LD/" fullpath = basedir+"/TP/NGSI-LD" for root, dirs, files in walk(fullpath): @@ -28,10 +28,10 @@ if __name__ == "__main__": if "error_while_parsing" in json_of_test_case and json_of_test_case["error_while_parsing"]: statistics[name_of_test_case]["failed"] = True number_of_failures += 1 - # we create a dummy entry in the "sub" test_cases, which has a "permutation_tp_id" equal to the robotfile - # We do not forget to add a trailing slash that will be removed later, and a tail _XX which will - # allow matching from the googlesheet? - json_of_test_case["test_cases"] = [{"permutation_tp_id":"/"+json_of_test_case["robotfile"]+"_XX"}] + # we create a dummy entry in the "sub" test_cases, which has a "permutation_tp_id" equal to the + # robotfile. We do not forget to add a trailing slash that will be removed later, and a tail _XX + # which will allow matching from the googlesheet? + json_of_test_case["test_cases"] = [{"permutation_tp_id": "/"+json_of_test_case["robotfile"]+"_XX"}] else: statistics[name_of_test_case]["failed"] = False number_of_successes += 1 @@ -42,8 +42,11 @@ if __name__ == "__main__": json_of_test_case["config_id"] = "CF_05" else: json_of_test_case["config_id"] = "CF_01" + # upgrade the version and add the reference in square brackets - json_of_test_case["reference"] = re.sub(r"V1.3.1 \[\]", "version 1.5.1 [1]", json_of_test_case["reference"]) + json_of_test_case["reference"] = ( + re.sub(r"V1.3.1 \[\]", "version 1.5.1 [1]", json_of_test_case["reference"])) + # now for each permutation inside this test case, create the permutation's correct parent_release if "test_cases" in json_of_test_case: # grab everything that is a permutation_body inside the "sub" test_cases, @@ -71,13 +74,14 @@ if __name__ == "__main__": print(f"Out of {number_of_all_testcases} testcases, {number_of_failures} of them failed to be correctly parsed.") - with open("testcases.json", 'w') as fp: + testcases_file = join(basedir, "doc", "results", "testcases.json") + with open(testcases_file, 'w') as fp: json.dump(obj=testcases, indent=2, fp=fp) # determine the structure/schema of a successfully parsed testcase permutation_template = {} for testcase in testcases: - if testcase["error_while_parsing"] == False: + if not testcase["error_while_parsing"]: permutation_metadata_template = {} # everything that is at the top level shall be extracted for key, value in testcase.items(): @@ -99,7 +103,7 @@ if __name__ == "__main__": # everything that is a permutation_body inside the "sub" test_cases, # shall rise on its own existenz and be joined with its permutation_metadata for permutation_body in testcase["test_cases"]: - permutation_body_template = {} # new object, not changing permutation_body + permutation_body_template = {} # new object, not changing permutation_body if "permutation_tp_id" in permutation_body: permutation_body_template["stripped_permutation_tp_id"] = "UNKNOWN" permutation_body_template["robotlink"] = "UNKNOWN" @@ -135,33 +139,42 @@ if __name__ == "__main__": # unpack all permutations of testcases that are under the same .robot file permutations = [] for testcase in testcases: - #print("--parsing "+testcase["robotfile"]) + # print("--parsing "+testcase["robotfile"]) permutation_metadata = {} + # everything that is at the top level shall be extracted for key, value in testcase.items(): if key != "test_cases": permutation_metadata[key] = value + # start creating HTML link to robot file in repo - fullurl = BASE_URL_OF_FORGE + permutation_metadata["robotpath"] + "/" + permutation_metadata["robotfile"] + ROBOT_FILE_EXTENSION + fullurl = (BASE_URL_OF_FORGE + permutation_metadata["robotpath"] + + "/" + permutation_metadata["robotfile"] + ROBOT_FILE_EXTENSION) + if "test_cases" in testcase: # everything that is a permutation_body inside the "sub" test_cases, # shall rise on its own existenz and be joined with its permutation_metadata for permutation_body in testcase["test_cases"]: if "permutation_tp_id" in permutation_body: - ptpid = permutation_body["permutation_tp_id"] + ptpid = permutation_body["permutation_tp_id"] if "then" not in permutation_body: print(" no then in " + ptpid) if "when" not in permutation_body: print(" no when in " + ptpid) - #print("::: "+ptpid) + + # print("::: "+ptpid) # strip from beginning up to including the last "/" permutation_body["stripped_permutation_tp_id"] = ptpid[ptpid.rindex("/")+1:] + # use the stripped_permutation_tp_id as text of the link - permutation_body["robotlink"] = "" + permutation_body["stripped_permutation_tp_id"] + "" + permutation_body["robotlink"] = ( + "" + permutation_body["stripped_permutation_tp_id"] + "") + # So basically we append to the permutations a new dict that is the | union merge of the - # items of the template merged with the items of the concatenation of {**permutation_metadata, **permutation_body} - # For this last concatenation we use the unpacking python operator ** that strips the container dict from both - #permutations.append(dict(permutation_template.items() | {**permutation_metadata, **permutation_body}.items())) + # items of the template merged with the items of the concatenation of {**permutation_metadata, + # **permutation_body}. For this last concatenation we use the unpacking python operator ** that + # strips the container dict from both permutations.append(dict(permutation_template.items() | + # {**permutation_metadata, **permutation_body}.items())) a = {**permutation_metadata, **permutation_body} unpacked_testcase = {**permutation_template, **a} # Perform a check on the clauses that must be equal to the @@ -177,25 +190,24 @@ if __name__ == "__main__": exit(1) else: # there is no "sub" test_cases, it likely is a failed parsing - if testcase["error_while_parsing"] == False: + if not testcase["error_while_parsing"]: print("PARSING NOT FAILED, BUT no permutations??") exit(1) - - - - - with open("permutations.json", 'w') as fp: + permutations_file = join(basedir, "doc", "results", "permutations.json") + with open(permutations_file, 'w') as fp: json.dump(obj=permutations, indent=2, fp=fp) # The URL of the REST endpoint of the NoSQL database dburl = 'http://ec2-18-153-159-20.eu-central-1.compute.amazonaws.com:5555/fromrobot' - requests.delete(dburl) + delete(dburl) + # Set the appropriate headers for JSON, if required by the endpoint headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', # Include any other headers the API requires } + # Make the POST request - response = requests.post(dburl, data=json.dumps(permutations), headers=headers) + response = post(dburl, data=json.dumps(permutations), headers=headers) -- GitLab From 3a1ecaea4664e7ebc9faeb975862329cb6a6bd23 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 23 Mar 2024 10:47:11 +0100 Subject: [PATCH 25/25] chore: update generated doc --- doc/files/ContextSource/RegistrationSubscription/038_01.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/files/ContextSource/RegistrationSubscription/038_01.json b/doc/files/ContextSource/RegistrationSubscription/038_01.json index e846d9a5..803b05b0 100644 --- a/doc/files/ContextSource/RegistrationSubscription/038_01.json +++ b/doc/files/ContextSource/RegistrationSubscription/038_01.json @@ -26,7 +26,7 @@ "setup": null, "teardown": null, "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastFailure' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastSuccess' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'timesSent' in the NotificationParams\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Context Source Registration Subscription with Response Status Code set to 201 and\n Create Context Source Registration Subscription with Response Header: Location containing $${subscription_id} and\n Retrieve Context Source Registration Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'lastNotification' in the NotificationParams and\n Retrieve Context Source Registration Subscription with The Response Body `${response1.json()}' might contain the key 'timesSent' in the NotificationParams\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions'\n method set to 'POST'\n Create Context Source Registration Subscription with filename set to '${subscription_payload}', accept set to '${EMPTY}', and content-type set to 'application/ld+json'\n}", "http_verb": "POST", "endpoint": "csourceSubscriptions" -- GitLab