From 66b0d7f3a4772d4b7cf84503b2171abe46ebd557 Mon Sep 17 00:00:00 2001 From: Simran Singhal Date: Sat, 14 Nov 2020 16:14:36 +0530 Subject: Auto discover and register all robot test cases Issue-ID: VNFSDK-614 Change-Id: I5227425f29fb11ef4255e88d873a167b608d5360 Signed-off-by: Simran Singhal --- .../src/main/resources/open-cli-robot.properties | 16 ++++++++ .../robot/auto-discover-robot-testcases.yaml | 48 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 profiles/robot/src/main/resources/open-cli-robot.properties create mode 100644 profiles/robot/src/main/resources/open-cli-schema/robot/auto-discover-robot-testcases.yaml (limited to 'profiles/robot/src/main/resources') diff --git a/profiles/robot/src/main/resources/open-cli-robot.properties b/profiles/robot/src/main/resources/open-cli-robot.properties new file mode 100644 index 00000000..9b157596 --- /dev/null +++ b/profiles/robot/src/main/resources/open-cli-robot.properties @@ -0,0 +1,16 @@ +# Copyright 2020 Simran Singhal. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cli.robot.discover=false +cli.robot.api_tests_folder_path= \ No newline at end of file diff --git a/profiles/robot/src/main/resources/open-cli-schema/robot/auto-discover-robot-testcases.yaml b/profiles/robot/src/main/resources/open-cli-schema/robot/auto-discover-robot-testcases.yaml new file mode 100644 index 00000000..a03dbd18 --- /dev/null +++ b/profiles/robot/src/main/resources/open-cli-schema/robot/auto-discover-robot-testcases.yaml @@ -0,0 +1,48 @@ +# Copyright 2020 Simran Singhal. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_schema_version: 1.0 + +name: auto-discover-robot-testcases + +description: Auto discover and register all robot test cases + +info: + product: open-cli + service: discover + type: cmd + author: Simran Singhal singhalsimran0@gmail.com + +parameters: + - name: api-tests-folder-path + type: string + description: Location to api-tests folder + short_option: l + long_option: api-tests-folder-path + is_optional: false + - name: format + type: string + description: Output formats, supported formats such as table, csv, json, yaml + short_option: f + long_option: format + default_value: text + is_default_param: true + +robot: + command: + - python3 $s{env:OPEN_CLI_HOME}/script/discover-robot-testcases.py --api-tests-folder-path ${api-tests-folder-path} + success_codes: + - 0 + working_directory: . + output: $stdout \ No newline at end of file -- cgit 1.2.3-korg