083e1dd243410104244cdce5b45707778507a4d3
[osm/tests.git] / robot-systest / deprecated / README_Robot_Test.md
1 <!--
2 Copyright 2019 Tech Mahindra Limited
3
4 All Rights Reserved.
5
6 Licensed under the Apache License, Version 2.0 (the "License"); you may
7 not use this file except in compliance with the License. You may obtain
8 a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 License for the specific language governing permissions and limitations
16 under the License.
17 -->
18
19
20 # Step to run robot framework test standalone linux environment
21
22 All installation commands run using root user(`sudo su`)
23 ## Step 1: Install python packages
24 Install below python packages using pip
25 >pip install python-magic pyangbind haikunator requests pyvcloud progressbar pathlib robotframework robotframework-seleniumlibrary robotframework-requests robotframework-jsonlibrary
26
27 ## Step 2: Install linux packages
28 Install below linux packages
29 >curl http://osm-download.etsi.org/repository/osm/debian/ReleaseSIX/OSM%20ETSI%20Release%20Key.gpg | apt-key add -
30
31 >add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseSIX stable devops osmclient IM" && apt update
32
33 >curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
34
35 >echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
36
37 > apt-get install -y python-osmclient python-osm-im google-chrome-stable chromium-chromedriver
38
39 >./git-repo/devops/tools/OVF_converter/install.sh
40
41 ## Step 3: checkout robot seed code
42 Checkout devops from gerrit
43 > git clone "https://osm.etsi.org/gerrit/osm/devops"
44
45 If robot seed code not merged to to master, pull it
46 > git pull "https://osm.etsi.org/gerrit/osm/devops" refs/changes/52/7852/4
47
48 ## Step 4: Set environmet
49 for build test need to create env-file and provide below details and for Standalone testing export them
50 ```
51 export OSM_HOSTNAME=<OSM server IP>
52 ```
53
54 OpenStack Details
55 ```
56 export OS_AUTH_URL=<auth url>
57 export OS_PASSWORD=<password>
58 export OS_PROJECT_NAME=<project name>
59 export OS_VIM_CONFIG=<config value>
60 ```
61
62 VCD Details
63 ```
64 export VCD_AUTH_URL=<VCD auth url>
65 export VCD_USERNAME=<VCD username>
66 export VCD_PASSWORD=<VCD password>
67 export VCD_TENANT_NAME=<VCD Tenant name>
68 export VCD_ORGANIZATION=<VCD Org name>
69 export VCD_VIM_CONFIG=<config value>
70 ```
71
72 Note:- Optional
73 ```
74 export NS_CONFIG=<NS Config Details>
75 e.g. export NS_CONFIG="'{vld: [ {name: mgmtnet, vim-network-name: mgmt}]}'"
76 ```
77
78 ## Step 5: Run Test
79 There are two ways to run the test-case:
80 * use `devops/robot-systest/run_test.sh` file and provide test-name(vim/smoke/sanity/comprehensive).
81   > ./devops/robot-systest/run_test.sh -t smoke
82
83 * use `robot` command
84   > robot -d path/to/report/dir -i test-tag-to-be-included -e test-tag-to-be-excluded path/to/testsuiet
85   
86   > robot -d devops/robot-systest/reports -i comprehensive devops/robot-systest/testsuite