diff --git a/testing/aether-roc-tests.rst b/testing/aether-roc-tests.rst index 9344ab4..b98f305 100644 --- a/testing/aether-roc-tests.rst +++ b/testing/aether-roc-tests.rst @@ -1,34 +1,37 @@ API Tests =========== -The REST API and GUI of Aether is tested with the Robot Framework. -The tests are located inside the ``aether-system-tests`` repository -and they are run nightly using a Jenkins job. +The REST API and GUI of Aether are tested with the Robot Framework. +The tests are located in the ``aether-system-tests`` repository on +Gerrit, but they are **not** currently activated on Jenkins. This +section is archived with the goal of reactivating them. Development Prerequisites ------------------------- -To access the ROC from a local system, it is necessary to deploy the components of µONOS. -This can be done with the use of Helm (see instructions on -`this page `_). -Additionally, it is necessary to add the SD-RAN chart repo with the following command: +To access the ROC from a local system, it is necessary to deploy the +components of µONOS. This can be done with the use of Helm (see +instructions on `this page +`_). -.. code-block:: shell +Additionally, it is necessary to add the SD-RAN chart repo with the +following command: - helm repo add sdran --username USER --password PASSWORD https://charts.aetherproject.org +.. code-block:: shell -where USER and PASSWORD can be obtained from the Aether Login Information file, -which is accessible to the ``onfstaff`` group. + helm repo add sdran https://charts.aetherproject.org -Finally, the ROC GUI tests are running on the Firefox browser, so it is -necessary to have the Firefox browser and the Firefox web driver +Finally, the ROC GUI tests are running on the Firefox browser, so it +is necessary to have the Firefox browser and the Firefox web driver (``geckodriver``) installed on the system in order to run these tests. Running the ROC API Tests ------------------------- + Follow the steps below to access the ROC API: -1. Deploy the ``aether-roc-umbrella`` chart from the Aether repo with the following command: +1. Deploy the ``aether-roc-umbrella`` chart from the Aether repo with + the following command: .. code-block:: shell @@ -40,7 +43,8 @@ Follow the steps below to access the ROC API: kubectl -n micro-onos get pods -3. Once all pods are in a Running state, port-forward aether-roc-api to port 8181 with the following command: +3. Once all pods are in a Running state, port-forward aether-roc-api + to port 8181 with the following command: .. code-block:: shell @@ -52,8 +56,8 @@ Follow the steps below to access the ROC API: kubectl -n micro-onos port-forward service/onos-config 5150 & -Now that we have access to the ROC API, we can proceed with running the ROC API tests from the ``aether-system-tests`` -repository: +Now that we have access to the ROC API, we can proceed with running +the ROC API tests from the ``aether-system-tests`` repository: 1. Checkout the aether-system-tests repo: @@ -74,11 +78,12 @@ repository: make ast-venv source ast-venv/bin/activate -4. Go to the ``roc`` folder and generate the ROC API test framework and test files: +4. Go to the ``roc`` folder and generate the ROC API test framework + and test files: .. code-block:: shell - cd roc + cd aether-2.1/roc python libraries/api/codegen/class_generator.py \ --models=variables/2_0_0_model_list.json \ --template=libraries/api/codegen/templates/class_template.py.tmpl \ @@ -113,7 +118,7 @@ This will generate test reports and logs in the ``results`` directory. Running the ROC GUI Tests ------------------------- -We test the ROC GUI by installing the ROC with keycloak-dev.onlab.us. +Test the ROC GUI by installing the ROC with Keycloak enabled. Currently, only v4 GUI automation tests are supported: 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: kubectl -n micro-onos get pods -3. Once all pods are in a Running state, port-forward to port 8183 to access the ROC GUI: +3. Once all pods are in a Running state, port-forward to port 8183 to + access the ROC GUI: .. code-block:: shell kubectl -n micro-onos port-forward service/aether-roc-gui-v4 8183:80 & -4. Port-forward to port 8181 to access the ROC API (which is necessary for some test cases): +4. Port-forward to port 8181 to access the ROC API (which is necessary + for some test cases): .. code-block:: shell kubectl -n micro-onos port-forward service/aether-roc-api 8181 & -Now that we have access to the ROC API and GUI, we can proceed with running the ROC GUI tests from the -``aether-system-tests`` repository: +Now that we have access to the ROC API and GUI, we can proceed with +running the ROC GUI tests from the ``aether-system-tests`` repository: 1. Checkout the aether-system-tests repo: @@ -185,7 +192,7 @@ Now that we have access to the ROC API and GUI, we can proceed with running the .. code-block:: shell - cd roc + cd aether-2.1/roc python tests/gui/codegen/tests_generator.py \ --models=variables/4_0_0_model_list.json \ --template=tests/gui/codegen/templates/tests_template.robot.tmpl \