Introduction

This leverages Robot framework for testing and validating the RIC components Health check and E2E Performance testing of the RIC.

This test automation contains containers, Helm charts, Libraries and Testsuites to support automated and end-to-end testing of the RIC.

The simplest way to execute the tests using helm chart in it/test repository ric_robot_suite/helm/nanobot path.

This helps in deploying helm chart with minimal robot container and kubernetes job to test and can extend the testing by expanding the charts.

The chart depends on docker image in docker/nanobot.

Roadmap:

test/

| - ric_robot_suite/

    | - docker/

        | - nanobot/              : Dockerfile for the Robot framework Image

        | -  robot-xapp/        : Dockerfile for an xapp used for some test

    | - helm/

        | - nanobot/             : Chart for the robot framework

    | - ric-python-utils        : RIC test-support libraries; these are built in to the docker image.

    | - robot/                      : Test libraries, Testsuites and support files to be built in to the docker image

    | - xapp/                       : Go source and deployment files for the test xapp


Using the CHART

To install the chart (which creates and runs a single Kubernetes job), first copy the packaged

Common-Template chart (from https://gerrit.o-ran-sc.org/r/it/dep.git) into test repo 

ric_robot_suite/helm/nanobot/charts. Then edit ric_robot_suite/helm/nanobot/values.yaml to 

reflect your environment and desired tests and run.

$ helm install [ --values <override-file> ] --namespace <namespace> nanobot

....in the ric_robot_suite/helm directory, where <override-file> is the recipe override file used

when deploying the RIC, if any. The output from the test will be in the job's log.

kubectl logs --namespace <namespace> job/nanobot-r0-ric-robot-run

(the job name may be different if you have altered the vlaues.yaml file; 

use 'kubectl --namespace <namespace> get jobs' to find it).

The namespace seletced will be where the job's service account is created and the job runs.

It may but need not be the same as the RIC platform or Xapp namespace ie - the chart may be deployed

in any namespace.

Customizing and Extending the Chart

The job mounts its testsuites directory as a configmap, built from files in nanobot/configmap-src/testsuites.

Support files ( testsuites, keyword definition libraries, scripts and variable definition files) for the Robot framework

itself are supplied by K8s configmaps genereted from the contents of subdirectories of the configmap-src directory; 

bin/:              scripts/binaries mounted at /robot/bin

testsuites/:    test suites, mounted at /robot/testsuites

properties/:   Variable definition (properties) files; contents mounted at /robot/resources

resources/:    Robot keyword definition libraries, contents mounted at /robot/resources


The job uses the nanobot docker image built by ric_robot_suite/docker/nanobot/Dockerfile;

see ric_robot_suite/docker/nanobot/README for information about the image.


  • No labels

3 Comments

  1. USING THE CHART
    19 To install the chart (which creates and runs a single Kubernetes job),
    20 first copy the packaged Common-Template chart (from
    21 https://gerrit.o-ran-sc.org/r/it/dep.git) into
    22 ric_robot_suite/helm/nanobot/charts.

    The README file under the /test/ric_robot_suite/helm/nanobot/ mentions to pull the source code from the above repository. However, it seems that is not sufficient.  If we try to install the helm chart for the ric_robot_suite like below...

    /test/ric_robot_suite/helm/nanobot# helm install --name helm-nanobot --namespace nanobot .

    we are getting the following error...

    /test/ric_robot_suite/helm/nanobot/charts/dep/ric-dep/RECIPE_EXAMPLE: no such file or directory


    I have tried to copy the RECIPE_EXAMPLE from the near-rt-ric deployment folder's /dep/ric-dep/RECIPE_EXAMPLE and again tried to install the helm chart for ric_robot_suite, but it still fails with the following error...


    /test/ric_robot_suite/helm/nanobot# helm install --name helm-nanobot --namespace nanobot .
    Error: error unpacking dep in nanobot: chart metadata (Chart.yaml) missing


    I suspect some required files were not checked in to the gerrit repository. I request the test and development team of this project to push the required files into the gerrit repository.

  2. user-23d35

    You must copy only ric-common charts folder from dep repo and keep it in this path ric_robot_suite/helm/nanobot/charts.

    Then try executing.

  3. I followed the following steps - 

    1.Modified Values.yaml based with my Xapp name
    2.Copied the packaged Common-Template chart from ric-common into ric_robot_suite/helm/nanobot/charts from dep repo.
    3.Copied the recipe file into the nanobot directory
    4.Executed helm install --values example_recipe_oran_dawn_release.yaml --generate-name . command

    It gave the following response -
    NAME: chart-1633606354
    LAST DEPLOYED: Thu Oct 7 11:32:34 2021
    NAMESPACE: default
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None

    But when I execute kubectl --namespace default get jobs no jobs come up. Could I please get some help on this?