Script for starting Robotframework ODL suites.
[functest.git] / functest.rst
1 ===========================
2 OPNFV functional test guide
3 ===========================
4
5 The goal of this document consists in describing how to run functional tests on OPNFV solution and how to automate these tests.
6
7 For release 1, several test cases have been selected:
8  * Rally Bench test suite
9  * Tempest tes suite
10  * OpenDaylight test suite
11  * vPing
12  * vIMS
13
14 .. _prereqs:
15
16 -------------
17 Prerequisites
18 -------------
19 We assume that an OPNFV solution has been installed (System Under Test).
20 For release 1, the tools needed for functional testing are not part of the installer and are not automatically installed.
21
22 .. _pharos: https://wiki.opnfv.org/pharos
23
24 It is recommended to install the tools on the jump host server as defined in the Pharos project.
25
26 .. _installation:
27
28 ------------
29 Installation
30 ------------
31
32 Rally bench test suite
33 ======================
34
35 Create or enter a folder where you want to check out the tool repos. Follow `Rally installation procedure`_.
36
37 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
38
39
40 Tempest
41 =======
42
43 It is possible to use Rally to perform Tempest tests. See `tempest installation guide using Rally`_.
44
45 .. _`tempest installation guide using Rally`: https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
46
47 OpenDaylight
48 ============
49 ODL wiki page describes system preparation and running tests. See `Integration Group CSIT`_.
50
51 .. _`Integration Group CSIT`: https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT
52
53 Summary: Set up python2.7 virtual environment::
54
55     mkvirtualenv robot
56
57     pip install requests
58     pip install robotframework
59     pip install robotframework-sshlibrary
60     pip install robotframework-requests
61
62 Clone test repo::
63
64     git clone https://github.com/opendaylight/integration.git
65
66 vPing
67 =====
68
69 vIMS
70 ====
71
72
73 .. _manualtest:
74
75 --------------
76 Manual testing
77 --------------
78
79 Rally
80 =====
81 Check your deployment::
82
83     # rally deployment check
84     keystone endpoints are valid and following service are available:
85     +-------------+-----------+------------+
86     | Services  | Type        | Status     |
87     +-----------+-------------+------------+
88     | cinder    | volume      | Available  |
89     | cinderv2  | volumev2    | Available  |
90     | glance    | image       | Available  |
91     | keystone  | identity    | Available  |
92     | neutron   | network     | Available  |
93     | nova      | compute     | Available  |
94     | nova_ec2  | compute_ec2 | Available  |
95     | novav3    | computev3   | Available  |
96     +-----------+-------------+------------+
97
98 Create a new opnfv scenario directory and run test suite::
99
100     # cd ~/rally/samples/tasks/scenario/
101     # mkdir opnfv
102     # wget http://git.opnfv.org/.. <TODO>
103     # rally task start --abort-on-sla-failure ./opnfv.json
104
105 Tempest
106 =======
107
108 If we consider running Tempest suite with Rally::
109
110     # rally verify start
111     # rally verify list
112
113
114
115
116 OpenDaylight
117 ============
118
119 vPing
120 =====
121
122 vIMS
123 ====
124
125
126 .. _automatictest:
127
128 ------------------
129 Testing Automation
130 ------------------
131
132 Connection of your platform
133 ===========================
134 If you want to add your platform to the community automation, you need to declare your machine as a Jenkins slave.
135  * Send a mail to OPNFV LF Helpdesk (opnfv-helpdesk@rt.linuxfoundation.org)
136  * Create a local user jenkins on your machine
137  * wget http://mirrors.jenkins-ci.org/war/1.599/jenkins.war
138  * Extract contents, find the file named slave.jar and copy it to somewhere which jenkins user created in first step can access.
139  * Create a directory /home/jenkins/opnfv_slave_root
140  * check the java version (>1.7.0_75)
141  * Contact Linux Foundation to manage authentication of your server
142  * A key/token will be produced. Establish connection towards OPNFV Jenkins by using below command: java -jar slave.jar -jnlpUrl https://build.opnfv.org/ci/computer/<slave_name>/slave-agent.jnlp -secret <token>
143
144 Continuous integration scripts
145 ==============================
146
147 .. _references:
148
149 ----------
150 References
151 ----------
152
153 OPNFV main site: opnfvmain_.
154
155 OPNFV functional test page: opnfvfunctest_.
156
157 IRC support chan: #opnfv-testperf
158
159 .. _opnfvmain: http://www.opnfv.org
160 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing