Complete Automation section
[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
50 vPing
51 =====
52
53 vIMS
54 ====
55
56
57 .. _manualtest:
58
59 --------------
60 Manual testing
61 --------------
62
63 Rally
64 =====
65 Check your deployment::
66
67     # rally deployment check
68     keystone endpoints are valid and following service are available:
69     +-------------+-----------+------------+
70     | Services  | Type        | Status     |
71     +-----------+-------------+------------+
72     | cinder    | volume      | Available  |
73     | cinderv2  | volumev2    | Available  |
74     | glance    | image       | Available  |
75     | keystone  | identity    | Available  |
76     | neutron   | network     | Available  |
77     | nova      | compute     | Available  |
78     | nova_ec2  | compute_ec2 | Available  |
79     | novav3    | computev3   | Available  |
80     +-----------+-------------+------------+
81
82 Create a new opnfv scenario directory and run test suite::
83
84     # cd ~/rally/samples/tasks/scenario/
85     # mkdir opnfv
86     # wget http://git.opnfv.org/.. <TODO>
87     # rally task start --abort-on-sla-failure ./opnfv.json
88
89 Tempest
90 =======
91
92 If we consider running Tempest suite with Rally::
93
94     # rally verify start
95     # rally verify list
96
97
98
99
100 OpenDaylight
101 ============
102
103 vPing
104 =====
105
106 vIMS
107 ====
108
109
110 .. _automatictest:
111
112 ------------------
113 Testing Automation
114 ------------------
115
116 Connection of your platform
117 ===========================
118 If you want to add your platform to the community automation, you need to declare your machine as a Jenkins slave.
119  * Send a mail to OPNFV LF Helpdesk (opnfv-helpdesk@rt.linuxfoundation.org)
120  * Create a local user jenkins on your machine
121  * wget http://mirrors.jenkins-ci.org/war/1.599/jenkins.war
122  * Extract contents, find the file named slave.jar and copy it to somewhere which jenkins user created in first step can access.
123  * Create a directory /home/jenkins/opnfv_slave_root
124  * check the java version (>1.7.0_75)
125  * Contact Linux Foundation to manage authentication of your server
126  * 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>
127
128 Continuous integration scripts
129 ==============================
130
131 .. _references:
132
133 ----------
134 References
135 ----------
136
137 OPNFV main site: opnfvmain_.
138
139 OPNFV functional test page: opnfvfunctest_.
140
141 IRC support chan: #opnfv-testperf
142
143 .. _opnfvmain: http://www.opnfv.org
144 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing