Updated CORD guide with Test Sections
Change-Id: I7686947eaed03dfd432cb145113e518e9c973f1a
diff --git a/docs/README.md b/docs/README.md
index 3ae8a2c..3dcebf6 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,18 +1,12 @@
# Testing CORD
CORD Tester is an automation framework that has been developed to test CORD.
-The framework currently includes extensions to test R-CORD. Few framework
-modules have been developed to test M-CORD and E-CORD basic tests.
+The framework currently includes extensions to test R-CORD Lite.
CORD Tester framework is typically deployed as one or more Docker containers,
either on the CORD POD or adjacent to the POD and interacts with the POD
-through the interfaces. The Cord-Tester container is deployed as a docker
-container, residing on the headnode of the POD. It is brought up with double
-vlan tagged interfaces (s-tags and c-tags of subscriber's traffic) to conduct
-dataplane traffic testing. The following reference diagram gives a brief
-overview of how the test container interacts with the POD.
-
-![Cord Test Container](images/test_container.png)
+through the interfaces. It is brought up with double vlan tagged interfaces
+to conduct dataplane traffic testing.
The framework is modular, making it easy to test all the components that make
up CORD. It supports both end-to-end tests and functional tests of individual
@@ -33,4 +27,3 @@
* [Prerequisites](https://github.com/opencord/cord-tester/blob/master/src/test/setup/prerequisites.sh)
* [Source Code](https://github.com/opencord/cord-tester)
-
diff --git a/docs/images/qa_jenkinsetup_diag.png b/docs/images/qa_jenkinsetup_diag.png
new file mode 100644
index 0000000..6502f8c
--- /dev/null
+++ b/docs/images/qa_jenkinsetup_diag.png
Binary files differ
diff --git a/docs/images/qa_testbed_diag.png b/docs/images/qa_testbed_diag.png
new file mode 100644
index 0000000..9c4643f
--- /dev/null
+++ b/docs/images/qa_testbed_diag.png
Binary files differ
diff --git a/docs/qa_testenv.md b/docs/qa_testenv.md
index 9fa5371..513981e 100644
--- a/docs/qa_testenv.md
+++ b/docs/qa_testenv.md
@@ -3,8 +3,8 @@
Several jenkins based jobs are created to run tests on the following platforms
* Physical POD
-* Virtual POD(Cord-in-a-Box)
-* VMs
+
+* VMs
## Test Beds
@@ -12,20 +12,13 @@
setup CORD and a brief overview on the type of tests that are performed on that
test bed.
-![Test Beds](images/qa-testbeds.png)
+![Test Beds](images/qa_testbed_diag.png)
## Jenkins Test Setup
The following diagram shows how the test servers are interconnected
-![QA Jenkins Setup](images/qa-jenkins.png)
+![QA Jenkins Setup](images/qa_jenkinsetup_diag.png)
* To view results from recent runs of the jenkins jobs, please view the
- [Jenkins dashboard](https://jenkins.opencord.org/)
-
-## Jenkins Integration with Physical POD
-
-The following diagram shows how Jenkins interconnects with a Physical POD.
-
-![QA Physical POD setup](images/qa-pod-setup.png)
-
+ [Jenkins dashboard](https://jenkins-new.opencord.org/)
diff --git a/docs/qa_testsetup.md b/docs/qa_testsetup.md
index 58ca1e9..1d9c6cf 100644
--- a/docs/qa_testsetup.md
+++ b/docs/qa_testsetup.md
@@ -2,11 +2,10 @@
## Configure Automation Framework
-* When the POD/Cord-in-a-Box is installed, cord-tester repo is downloaded on
- the head node at `/opt/cord/test` directory
-
-* Tests can be run directly from the headnode or from a different VM then it
- can be done using the following command:
+* Tests can be run directly from your local machine or from a different VM by exporting the
+ configuration file for the target CORD servers.
+
+* Download the `cord-tester` repo using the following command:
```bash
git clone https://gerrit.opencord.org/cord-tester
@@ -16,7 +15,7 @@
done using the following command:
```bash
- cd /opt/cord/test/cord-tester/src/test/setup
+ cd cord-tester/src/test/setup
sudo ./prerequisites.sh --cord
```
@@ -25,58 +24,43 @@
Most of the tests in cord-tester framework are written in `python` and
`RobotFramework`. Few examples for test execution are shown below
+* Export the configuration file(file that was generated during kubernetes/helm installation)
+
+ ```bash
+ export KUBECONFIG=/home/cord/cord-pod1.conf
+ ```
+ Assuming that `cord-pod1.conf` file is present in `/home/cord` directory
+
* Executing a sample test
```bash
- cd /opt/cord/test/cord-tester/src/test/robot/
- pybot SanityPhyPOD.robot
+ cd cord-tester/src/test/robot/
+ pybot SanityK8POD.robot
```
### Executing Control Plane Tests
* Each control plane test uses input data in `json` format which are present
- under `/opt/cord/test/cord-tester/src/test/cord-api/Tests/data`
+ under `cord-tester/src/test/cord-api/Tests/data`
* Before running control plane tests, a properties file need to be edited as
shown below. Update the following attributes accordingly
```bash
- $ cd /opt/cord/test/cord-tester/src/test/cord-api/Properties
+ $ cd cord-tester/src/test/cord-api/Properties
$ cat RestApiProperties.py
SERVER_IP = 'localhost'
- SERVER_PORT = '9101'
- USER = 'xosadmin@opencord.org'
+ SERVER_PORT = '30006'
+ USER = 'admin@opencord.org'
PASSWD = ''
```
* To run tests
```bash
- cd /opt/cord/test/cord-tester/src/test/cord-api/
+ cd cord-tester/src/test/cord-api/Tests/
pybot <testcase.txt>
```
-
-## Executing Functional/Module Tests
-
-* There are several functional tests written to test various modules of CORD
- independently.
-
-* Before executing module based tests, following steps need to be performed
- which will create a `test container` and sets up the environment in the
- container to run tests.
-
- ```bash
- cd /opt/cord/test/cord-tester/src/test/setup/
- sudo ./cord-test.py setup -m manifest-cord.json
- ```
-
-* Run a single test from a module
-
- ```bash
- sudo ./cord-test.py run -t dhcp:dhcp_exchange.test_dhcp_1request
- ```
-
For more detailed explanations of the cord-tester options please see [Running
Tests](running.md).
-
diff --git a/docs/validate_pods.md b/docs/validate_pods.md
index 7fa5df7..762f1f7 100644
--- a/docs/validate_pods.md
+++ b/docs/validate_pods.md
@@ -1,73 +1,46 @@
# Validating PODs
-PODs are deployed everynight using Jenkins Build System. After a successful
+PODs(physical nodes) are deployed everynight using Jenkins Build System. After a successful
installation of the POD, test jobs are triggered which validate the following
categories of tests
* Post Installation Verification
-* Sanity Tests
-
-* Functional Tests (Control and Data Plane)
-
-* Soak Tests
+* Functional Tests
## Post Installation Tests
These tests perform the following validations
-* Required Docker Containers are up and running
-* Synchronizer Logs are correct
-* Required ONOS applications are installed in ONOS Fabric and ONOS CORD
-* ONOS Logs does not contain any errors
+* Required services are running
+* All deployments are successfully rolled out and matches replicas to available replicas
+* All pods are running
+* Pods have external connectivity
+* Pods can ping the kube-system namespace
+* Nodes are healthy (checking “ready”, “outofdisk”, “memorypressure”, “diskpressure”)
+* Required containers are in running state
-To execute the test, perform the following from the head node
+To execute the test, perform the following from the client machine
```bash
-cd /opt/cord/build
-make collect-diag
-cd /opt/cord/test/cord-tester/src/test/diag
-pybot verifyCollectDiag.robot
-```
-
-## Sanity Checks on the installed POD
-
-Following validations are performed after installation:
-
-* Headnode interfaces are up and has external connectivity
-* Compute nodes can ping each other through the fabric
-* Computes nodes can ping the switches
-* `cordvtn` app is running and identifies the nodes and the fabric devices
-* Required MAAS services are up and running
-* Status of Docker containers
-* Juju Service States
-* MAAS Cli commands
-* Openstack LXD Container States
-* Fabric Switch services
-* Ping all Fabric switches
-
-To execute the test, perform the following on the headnode
-
-```bash
-cd /opt/cord/test/cord-tester/src/test/robot
-pybot SanityPhyPOD.robot
+cd cord-tester/src/test/diag
+pybot SanityK8Pod.robot
```
## Functional Tests
-Control and Data plane tests can be executed on the POD once the
+Control tests can be executed on the POD once the
sanity checks are successful.
### Executing Control Plane Tests
-To validate the functionality of vSG instance creations and there by
-validating the end-end functionality checks on the related APIs, the
+To validate the end-end functionality checks on the RCORD Lite APIs, the
following control plane test can be executed.
* Edit the attributes shown below in the properties file
```bash
-$ cd /opt/cord/test/cord-tester/src/test/cord-api/Properties
+$ cd cord-tester/src/test/cord-api/Properties
$ cat RestApiProperties.py
SERVER_IP = 'localhost'
@@ -76,79 +49,15 @@
PASSWD = ''
```
-* To run the test
+* To run the tests
```bash
-cd /opt/cord/test/cord-tester/src/test/cord-api/
-pybot Ch_MultiInstance.txt
+cd cord-tester/src/test/cord-api/Tests/
+pybot VOLTDevice_Test.txt
+pybot RCORDLite_E2ETest.txt
```
### Data Plane Tests
-Once the vSG instances are created after execution of the above
-`control plane` test, `data plane` tests can be executed to verify
-if the data traffic passes through the created vSG/vcpe from the
-cord-test container which simulates the interface that was created
-with similar `s_tag and c_tag`
-
-Following steps are performed when the data plane test is executed.
-
-* vSG Instances in OpenStack Nova are created per subscriber created
-* vSG Instances are ACTIVE and are reachable via mgmt interface
-* Configures X-Connects for subscribers in onos-fabric for the overlay fabric
-* Configures a dhclient on the Cord-Tester containers interface that is being
- used as the vSG Subscriber
-* Validates a DHCP IP address is received from the vCPE Container and external
- connectivity is reachable through the vCPE
-
-To run a data plane test, perform the following steps
-
-* Update the `olt_config.json` file in the `setup` directory to include
- the `s_tag` and `c_tag` used in the Control-Plane Test with the
- reserved flag turned on and create the `cord test container`
-
-```bash
-$ cd /opt/cord/test/cord-tester/src/test/setup
-$ cat out_config.json
-{ "olt" : false,
- "uplink" : 2,
- "vlan" : 0,
- "port_map" : { "num_ports" : 11, "start_vlan" : 1000, "nr_switches": 1 },
- "vcpe" :
- [
- {
- "port" : "fabric", "type" : "reserved", "s_tag" : 415, "c_tag" : 222
- },
- {
- "port" : "fabric", "type" : "reserved", "s_tag" : 333, "c_tag" : 888
- },
- {
- "port" : "fabric", "type" : "reserved", "s_tag" : 555, "c_tag" : 999
- },
- {
- "port" : "fabric", "type" : "reserved", "s_tag" : 666, "c_tag" : 661
- }
- ]
-}
-```
-
-```bash
-sudo ./cord-test.py setup -m manifest-onf-cord.json
-```
-
-* Validate the data plane connectivity
-
-```bash
-cd /opt/cord/test/cord-tester/src/test/vsg
-pybot vsg_dataplane_test.robot
-```
-
-> NOTE: All the control and data plane tests can also be executed on a `Virtual
-> POD(Cord-in-a-Box)` using the above procedure. Except for the data plane
-> tests, where it needs to be run using a different option as there are no
-> crossconnects required to be provisioned on CiaB.
-
-```bash
-pybot -e xconnect vsg_dataplane_test.robot
-```
-
+For CORD 6.0 release, data plane tests are executed manually on the
+POD using OLT/ONU.