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