1 .. This work is licensed under a Creative Commons Attribution 4.0
2 International License. http://creativecommons.org/licenses/by/4.0
11 Robot Framework is a generic open source automation framework for acceptance
12 testing, acceptance test driven development (ATDD), and robotic process
13 automation (RPA). This framework is widely used in ONAP.
14 The full documentation of robot can be found in https://robotframework.org/.
16 In ONAP, Robot scripts have been developed to validate the components, provision
17 and run end to end tests.
19 The robot scripts can be retrieved in the ONAP testsuite repository: https://git.onap.org/testsuite/
21 A Robot pod is part of the ONAP default installation.
22 This pod includes the robot framework and the needed scripts cloned from the
24 Additional scripts are created during the installation in order to simplify
25 the launch of the different tests and are loacted in /opt/oom/kubernetes/robots.
27 From one of the kubernetes controller, you shall see the pod as follows:
31 $ kubectl get pods -n onap | grep robot
32 onap-robot-robot-7fc49977fd-6jblt 1/1 Running 0 9h
34 You can access the robot configuration through its configmap.
38 $ kubectl describe cm onap-robot-robot-eteshare-configmap -n onap
40 You shall see a long list of variables set during the ONAP installation by OOM.
41 Please note that some of these variables are set thanks to the OOM
42 overide openstack.yaml file. See the examples described in https://git.onap.org/oom/tree/kubernetes/onap/resources/overrides/openstack.yaml
44 Verification of the ONAP components
45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 ONAP robot healthcheck tests have been created to give a quick feedback on the
47 status of the ONAP components.
49 You can run them from one of the kubernetes controller. You need to log on the
50 machine then perform the following commands:
54 $ cd /opt/oom/kubernetes/robot
55 $ ./ete-k8s.sh onap health
57 You shall the execution of all the healthcheck launched from bash script hosted
58 on the kubernetes controller and executed on the robot pod.
60 At the end you shall see that logs and reporting are automatically generated
61 by robot and stored on the pod under /share/logs/.
62 You can retrieve the logs directly from the pods or through the web interface
63 integrated in the robot pod by typing
64 http://portal.api.simpledemo.onap.org:30209/logs/ (test/test)
66 .. figure:: files/robot/robot_logs.png
69 You shall see 3 files:
75 A new directory will be created after each run.
77 log.html should look like
79 .. figure:: files/robot/robot_report_logs.png
82 When the testsuite is passed, the reporting page is green.
84 .. figure:: files/robot/robot_report_ok.png
87 You can click on the test case to get details.
89 .. figure:: files/robot/robot_report_details.png
92 If one of the test is FAIL, the generated web reporting page will be red.
94 .. figure:: files/robot/robot_report_ko.png
97 Lots of tags have been created for healthcheck tests. You may replace health by
98 core, small, medium, 3rdparty, health-sdc, health-multicloud,...
100 See https://git.onap.org/testsuite/tree/robot/testsuites/health-check.robot to
103 As an illustration, healthcheck core traces should be displayed as follows.
107 $ ./ete-k8s.sh onap core
108 ++ export NAMESPACE=onap
110 +++ kubectl --namespace onap get pods
113 ++ POD=onap-robot-robot-7c47659f7-tt9w4
115 ++ ETEHOME=/var/opt/ONAP
116 +++ kubectl --namespace onap exec onap-robot-robot-7c47659f7-tt9w4 -- bash -c 'ls -1q /share/logs/ | wc -l'
117 ++ export GLOBAL_BUILD_NUMBER=2
118 ++ GLOBAL_BUILD_NUMBER=2
120 ++ OUTPUT_FOLDER=0002_ete_core
122 ++ VARIABLEFILES='-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py'
123 ++ VARIABLES='-v GLOBAL_BUILD_NUMBER:17175'
124 ++ kubectl --namespace onap exec onap-robot-robot-7c47659f7-tt9w4 -- /var/opt/ONAP/runTags.sh -V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -v GLOBAL_BUILD_NUMBER:17175 -d /share/logs/0002_ete_core -i core --display 92
125 Starting Xvfb on display :92 with res 1280x1024x24
126 Executing robot tests at log level TRACE
127 ==============================================================================
129 ==============================================================================
130 Testsuites.Health-Check :: Testing ecomp components are available via calls.
131 ==============================================================================
132 Basic A&AI Health Check | PASS |
133 ------------------------------------------------------------------------------
134 Basic DMAAP Message Router Health Check | PASS |
135 ------------------------------------------------------------------------------
136 Basic Portal Health Check | PASS |
137 ------------------------------------------------------------------------------
138 Basic SDC Health Check (DMaaP:UP)| PASS |
139 ------------------------------------------------------------------------------
140 Basic SDNC Health Check | PASS |
141 ------------------------------------------------------------------------------
142 Basic SO Health Check | PASS |
143 ------------------------------------------------------------------------------
144 Testsuites.Health-Check :: Testing ecomp components are available ... | PASS |
145 6 critical tests, 6 passed, 0 failed
146 6 tests total, 6 passed, 0 failed
147 ==============================================================================
149 6 critical tests, 6 passed, 0 failed
150 6 tests total, 6 passed, 0 failed
151 ==============================================================================
152 Output: /share/logs/0002_ete_core/output.xml
153 Log: /share/logs/0002_ete_core/log.html
154 Report: /share/logs/0002_ete_core/report.html
156 Onboard and Instantiate VNF/PNF with Robot
157 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158 Robot scripts have been also created to provision components and perform end
160 All the robot scripts are hosted on the tesuite repository and deal with various
161 test cases and/or components.
167 │ └── aai-regression-test-v14.robot
170 ├── closed-loop.robot
171 ├── create-cloud-config.robot
173 ├── health-check.robot
175 ├── model-distribution.robot
176 ├── model-distribution-vcpe.robot
181 ├── pnf-registration.robot
183 ├── post-install-tests.robot
184 ├── update_onap_page.robot
185 ├── vnf-orchestration-direct-so.robot
186 └── vnf-orchestration.robot
188 It is, for instance possible to test the onboarding of the vFirewall model in
189 the SDC by running the command:
193 $ ete-k8s.sh onap healthdist
195 If you consider the ete-k8s.sh script, the following testsuites are referenced:
199 * demo.robot: InitDemo, InitCustomer, APPCCDTPreloadDemo, APPCMountPointDemo, DistributeDemoVFWDT, DistributeVFWNG
200 * health-check.robot: health, core, small, medium, 3rdparty, api, datarouter, externalapi, health-aaf,...
201 * hvves.robot: HVVES, ete
202 * model-distribution-vcpe.robot: distributevCPEResCust
203 * model-distribution.robot: distribute, distributeVFWDT, distributeVLB
204 * oof-cmso.robot, oof-homing.robot, oof-has.robot: oof related tests
205 * pnf-registration.robot: ete, pnf_registrate
206 * post-install-tests.robot dmaapacl, postinstall
207 * update_onap_page.robot: UpdateWebPage
208 * vnf-orchestration-direct-so.robot: instantiateVFWdirectso
209 * vnf-orchestration.robot: instantiate, instantiateNoDelete, stability72hr
211 If you use the demo-k8s.s script, you may see the following options:
220 * instantiateVFWdirectso
225 * distributeDemoVFWDT
226 * instantiateDemoVFWDT
229 See :ref:`Verified Use Cases and Functional Requirements <docs_usecases>` to see
230 how to use these scripts. Some of them may need specific prerequisites on the
231 environment and may support specific versions and/or configurations.
234 Develop your own Robot scripts
235 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236 A dedicated wiki page has been created to help people to design and write their
237 own robot scripts within ONAP context (https://wiki.onap.org/display/DW/Robot+Framework+Development+Guide)
238 It is also possible to contact the integration team to get support.