1
1
API Tests
2
2
===========
3
3
4
- The REST API and GUI of Aether is tested with the Robot Framework.
5
- The tests are located inside the ``aether-system-tests `` repository
6
- and they are run nightly using a Jenkins job.
4
+ The REST API and GUI of Aether are tested with the Robot Framework.
5
+ The tests are located in the ``aether-system-tests `` repository on
6
+ Gerrit, but they are **not ** currently activated on Jenkins. This
7
+ section is archived with the goal of reactivating them.
7
8
8
9
Development Prerequisites
9
10
-------------------------
10
- To access the ROC from a local system, it is necessary to deploy the components of µONOS.
11
- This can be done with the use of Helm (see instructions on
12
- `this page <https://docs.onosproject.org/onos-docs/docs/content/developers/deploy_with_helm/ >`_).
13
11
14
- Additionally, it is necessary to add the SD-RAN chart repo with the following command:
12
+ To access the ROC from a local system, it is necessary to deploy the
13
+ components of µONOS. This can be done with the use of Helm (see
14
+ instructions on `this page
15
+ <https://docs.onosproject.org/onos-docs/docs/content/developers/deploy_with_helm/> `_).
15
16
16
- .. code-block :: shell
17
+ Additionally, it is necessary to add the SD-RAN chart repo with the
18
+ following command:
17
19
18
- helm repo add sdran --username USER --password PASSWORD https://charts.aetherproject.org
20
+ .. code-block :: shell
19
21
20
- where USER and PASSWORD can be obtained from the Aether Login Information file,
21
- which is accessible to the ``onfstaff `` group.
22
+ helm repo add sdran https://charts.aetherproject.org
22
23
23
- Finally, the ROC GUI tests are running on the Firefox browser, so it is
24
- necessary to have the Firefox browser and the Firefox web driver
24
+ Finally, the ROC GUI tests are running on the Firefox browser, so it
25
+ is necessary to have the Firefox browser and the Firefox web driver
25
26
(``geckodriver ``) installed on the system in order to run these tests.
26
27
27
28
Running the ROC API Tests
28
29
-------------------------
30
+
29
31
Follow the steps below to access the ROC API:
30
32
31
- 1. Deploy the ``aether-roc-umbrella `` chart from the Aether repo with the following command:
33
+ 1. Deploy the ``aether-roc-umbrella `` chart from the Aether repo with
34
+ the following command:
32
35
33
36
.. code-block :: shell
34
37
@@ -40,7 +43,8 @@ Follow the steps below to access the ROC API:
40
43
41
44
kubectl -n micro-onos get pods
42
45
43
- 3. Once all pods are in a Running state, port-forward aether-roc-api to port 8181 with the following command:
46
+ 3. Once all pods are in a Running state, port-forward aether-roc-api
47
+ to port 8181 with the following command:
44
48
45
49
.. code-block :: shell
46
50
@@ -52,8 +56,8 @@ Follow the steps below to access the ROC API:
52
56
53
57
kubectl -n micro-onos port-forward service/onos-config 5150 &
54
58
55
- Now that we have access to the ROC API, we can proceed with running the ROC API tests from the `` aether-system-tests ``
56
- repository:
59
+ Now that we have access to the ROC API, we can proceed with running
60
+ the ROC API tests from the `` aether-system-tests `` repository:
57
61
58
62
1. Checkout the aether-system-tests repo:
59
63
@@ -74,11 +78,12 @@ repository:
74
78
make ast-venv
75
79
source ast-venv/bin/activate
76
80
77
- 4. Go to the ``roc `` folder and generate the ROC API test framework and test files:
81
+ 4. Go to the ``roc `` folder and generate the ROC API test framework
82
+ and test files:
78
83
79
84
.. code-block :: shell
80
85
81
- cd roc
86
+ cd aether-2.1/ roc
82
87
python libraries/api/codegen/class_generator.py \
83
88
--models=variables/2_0_0_model_list.json \
84
89
--template=libraries/api/codegen/templates/class_template.py.tmpl \
@@ -113,7 +118,7 @@ This will generate test reports and logs in the ``results`` directory.
113
118
Running the ROC GUI Tests
114
119
-------------------------
115
120
116
- We test the ROC GUI by installing the ROC with keycloak-dev.onlab.us .
121
+ Test the ROC GUI by installing the ROC with Keycloak enabled .
117
122
Currently, only v4 GUI automation tests are supported:
118
123
119
124
1. Deploy the ``aether-roc-umbrella `` chart from the Aether repo with the
@@ -147,20 +152,22 @@ Alternatively, v2 GUI can be deployed with the following command:
147
152
148
153
kubectl -n micro-onos get pods
149
154
150
- 3. Once all pods are in a Running state, port-forward to port 8183 to access the ROC GUI:
155
+ 3. Once all pods are in a Running state, port-forward to port 8183 to
156
+ access the ROC GUI:
151
157
152
158
.. code-block :: shell
153
159
154
160
kubectl -n micro-onos port-forward service/aether-roc-gui-v4 8183:80 &
155
161
156
- 4. Port-forward to port 8181 to access the ROC API (which is necessary for some test cases):
162
+ 4. Port-forward to port 8181 to access the ROC API (which is necessary
163
+ for some test cases):
157
164
158
165
.. code-block :: shell
159
166
160
167
kubectl -n micro-onos port-forward service/aether-roc-api 8181 &
161
168
162
- Now that we have access to the ROC API and GUI, we can proceed with running the ROC GUI tests from the
163
- ``aether-system-tests `` repository:
169
+ Now that we have access to the ROC API and GUI, we can proceed with
170
+ running the ROC GUI tests from the ``aether-system-tests `` repository:
164
171
165
172
1. Checkout the aether-system-tests repo:
166
173
@@ -185,7 +192,7 @@ Now that we have access to the ROC API and GUI, we can proceed with running the
185
192
186
193
.. code-block :: shell
187
194
188
- cd roc
195
+ cd aether-2.1/ roc
189
196
python tests/gui/codegen/tests_generator.py \
190
197
--models=variables/4_0_0_model_list.json \
191
198
--template=tests/gui/codegen/templates/tests_template.robot.tmpl \
0 commit comments