Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 selected 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 —- 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.  Template expansion is
performed on files in that directory.

Configuration of the chart is split between the "recipe" used to
deploy the RIC (and consumed by the ric-common chart, which is
required for this chart) and the chart's own values.yaml file.
Generally, RIC platform configuration is specified by the recipe, and
robot and xapp configuration from the chart's values.yaml, although
there is some overlap.

Support files (testsuites, keyword definition libraries, scripts, and
variable definition files) for the robot framework itself are supplied
by k8s configmaps generated from the contents of subdirectories of the
configmap-src directory; those subdirectories may contain one or more of
the following directories:

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

Helm template expansion is performed on the contents of all
directories.
Because both resources/ and properties/ are mounted at
robot/resources, care should be taken to ensure that names do not
collide across those directories, particularly between trees.

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.