This page will outline the steps to create a cross component health test that could be used to confirm an installation from the standpoint of multiple components that need to work together as part of a end to end test or larger use case test. It does not replace the need for per component health checks but rather augments those initial health checks with tests that confirm the multiple components that depend on each other actually work for a basic sunny day thread.

The heatldist tag in robot is one of those tests that confirms that model distribution works by onboarding the simplest vFW VNF model and confirming that model distribution works.

We will use healthdist as an example for the process to create new tests in the robot framework repository (gerrit repo: testsuite)


Healthdist – is a tag that exists to run an onboarding and distribution of the vFW VNF (a simple 3 VM VNF as you know).

 

It tests that SDC to SO, AAI, SDNC via DMaaP is working. It generally uses the asdc_interface.robot script which exists for other end to end tests (e.g. the 'distribute' tag) but for just one VNF.   

 Assuming a good ONAP installation where healthcheck passes and robot's demo.sh init has been run to populate customers (not necessarily needed but always a best practice).


To run it execute:

For OOM installs from the ~/oom/kubernetes/robot directory

./ete-k8.sh onap healthdist 

 or

 For HEAT installs from the robot VM 

./ete.sh healthdist  


This will onboard the vFW HEAT template as a Vendor Software Product, Create the Service model and then distribute the service from SDC via DMaaP to SO, AAI, SDNC etc. Success is a DISTRIBUTION_COMPLETE_OK in the final status from SO back to SDC.  It only tests distribution not that VID sees the new model nor that the model can be instantiated. That would be for tests like  'instantiate' or 'instantiateVFW' or using the VID GUI since the model should be visible on VID under Browse Models.

 

 

 Adding a new health/sanity test to health-check.robot would consist first of creating any needed additions to the *_interface.robot script.


If we wanted to consider a 5G closed loop use case; there is a policy_interface.robot, dcae_interface.robot, clamp_interface.robot, mr_interface.robot (DMaaP Message Router)  already available. Re-use existing keywords as much as you can. But new keywords can be added to the appropriate interface file.

 

Build the test case in a test_templates to combine functions across project_interface keywords like “Model Distribution For Directory”

 

Finally stitch the test case into a tag (healthdist) in the health-check.robot file.

 

Configuring ONAP in preparation for a sanity test

If you need to do work that configures ONAP we put that into 'demo.sh init'  which has a bit more tag checking but works basically the same way as ete.sh.

 

Testing your new tag/test/keyword

For testing I usually create a tag but don’t document it in ete.sh/demo.sh and simply make a copy of ete.sh/demo.sh with my tag added to a 'ete.test.sh' for instance.

 

The ete.sh/demo.s ete-k8.sh/demo-k8.sh are outside of the container either in /opt on the robot VM in HEAT or in  ~/oom/kubernetes/robot on rancher in the OOM

Install so its easy to add test version of those scripts to your local ONAP environment.