99e957d7d0250a31b5a646a463b1c92c2ea80068
[osm/devops.git] / robot-systest / README.md
1 <!--
2  Licensed under the Apache License, Version 2.0 (the "License");
3  you may not use this file except in compliance with the License.
4  You may obtain a copy of the License at
5
6     http://www.apache.org/licenses/LICENSE-2.0
7
8  Unless required by applicable law or agreed to in writing, software
9  distributed under the License is distributed on an "AS IS" BASIS,
10  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  See the License for the specific language governing permissions and
12  limitations under the License.
13 -->
14
15 # Robot Framework: Test usage
16
17 ## Requirements
18
19 - OSM client installed (<https://osm.etsi.org/docs/user-guide/03-installing-osm.html#installing-standalone-osm-client>)
20 - devops repository cloned in home (<https://osm.etsi.org/gerrit/#/admin/projects/osm/devops>)
21 - The descriptor packages used on each test are expected to be in `${PACKAGES_FOLDER}`.
22 - A set of environment variables (there is an example file located at devops/robot-systest/environment.rc):
23   - `OSM_HOSTNAME`: IP address of target OSM.
24   - `OS_CLOUD`: Cloud credentialss.
25   - `VIM_TARGET`: VIM where tests will be run.
26   - `VIM_MGMT_NET`: VIM management network, reachable from robot.
27   - `PACKAGES_FOLDER`: Where descriptor packages are located.
28   - `ROBOT_DEVOPS_FOLDER`: Where the devops repository is located.
29   - `ROBOT_REPORT_FOLDER`: Where robot outpul will be placed.
30
31 ## Installation
32
33 ```bash
34 sudo -H python3 -m pip install --ignore-installed haikunator requests pyvcloud progressbar pathlib robotframework robotframework-seleniumlibrary robotframework-requests robotframework-SSHLibrary
35 curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
36 sudo add-apt-repository -y "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
37 sudo apt-get install -y google-chrome-stable chromium-chromedriver
38 sudo apt-get install -y python3-openstackclient  # Installs Queens by default
39 ```
40
41 ## Usage
42
43 Example using hackfest basic test. 
44
45 ```bash
46
47 # Set your environment variables in environment.rc as specified in requirements
48 source environment.rc
49
50 cd ~/devops/robot-systest
51 robot -d ${ROBOT_REPORT_FOLDER} testsuite/hackfest_basic.robot
52 ```