small fixes to script starting odl suite
[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 vPing
63 =====
64
65 vIMS
66 ====
67
68
69 .. _manualtest:
70
71 --------------
72 Manual testing
73 --------------
74
75 Rally
76 =====
77 Check your deployment::
78
79     # rally deployment check
80     keystone endpoints are valid and following service are available:
81     +-------------+-----------+------------+
82     | Services  | Type        | Status     |
83     +-----------+-------------+------------+
84     | cinder    | volume      | Available  |
85     | cinderv2  | volumev2    | Available  |
86     | glance    | image       | Available  |
87     | keystone  | identity    | Available  |
88     | neutron   | network     | Available  |
89     | nova      | compute     | Available  |
90     | nova_ec2  | compute_ec2 | Available  |
91     | novav3    | computev3   | Available  |
92     +-----------+-------------+------------+
93
94 Create a new opnfv scenario directory and run test suite::
95
96     # cd ~/rally/samples/tasks/scenario/
97     # mkdir opnfv
98     # wget http://git.opnfv.org/.. <TODO>
99     # rally task start --abort-on-sla-failure ./opnfv.json
100
101 Tempest
102 =======
103
104 If we consider running Tempest suite with Rally::
105
106     # rally verify start
107     # rally verify list
108
109
110
111
112 OpenDaylight
113 ============
114
115 Tests can be executed with script *start_test.sh* from directory *functest/testcases/Controllers/ODL/CI*. For usage example see::
116
117     # bash start_test.sh -h
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