commit | 5f55779bce07cc477b651b9babe5ef4c3731d007 | [log] [tgz] |
---|---|---|
author | You Wang <you@opennetworking.org> | Mon Aug 07 23:51:35 2017 +0000 |
committer | Gerrit Code Review <gerrit@onosproject.org> | Mon Aug 07 23:51:35 2017 +0000 |
tree | 4f8d90b07bd4c9dca237ed1cf8743ddbf92f3786 | |
parent | 8dfe47e717a257bbfcd98d9d6c7471001012f5b1 [diff] | |
parent | d2f199a2cde988bfb70ed365c207d39cb3b3bf7f [diff] |
Merge "[ONOS-6862] SCPFflowTp1g redesign Test Steps"
TestON is the testing platform that all the ONOS tests are being run on currently.
At ON.Lab, we have adopted the Mininet Python style for our drivers and testcases. The one exception is that TestON does not correctly parse multiline comments in testcases when the ending triple double quotes are on the same line as the comment. Therefore, in the testcases, the ending triple double quotes must be on it's own line.
Pull the git repo from gerrit or github(Read only mirror)
$ git clone https://gerrit.onosproject.org/OnosSystemTest
or
$ git clone https://github.com/OPENNETWORKINGLAB/OnosSystemTest.git
Run the install script
$ cd OnosSystemTest/TestON
$ install.sh
ONOS - The system under test
Mininet - A Network Emulator. NOTE: Some driver functions rely on a modified version of Mininet. These functions are noted in the mininet driver file. To checkout this branch from your Mininet folder:
$ git remote add jhall11 https://github.com/jhall11/mininet.git
$ git fetch jhall11
$ git checkout -b dynamic_topo remotes/jhall11/dynamic_topo
$ git pull
Note that you may need to run 'sudo make develop' if your mnexec.c file changed when switching branches.
There are some python modules required by some test cases. These modules should be installed by running the install.sh script.
Linc-OE - Some testcases use this to emulate optical devices
Requirements:
$ sudo apt-get install erlang
$ sudo apt-get install libpcap-dev
Building and Running:
$ git clone https://github.com/shivarammysore/LINC-Switch.git linc-oe
$ cd linc-oe
$ git checkout tags/oe-0.3
$ cp rel/files/sys.config.orig rel/files/sys.config
$ make rel
Config file at TestON/config/teston.cfg
Change the file paths to the appropriate paths
The .topo file for each test
Must change the IPs/login/etc to point to the nodes you want to run on
TestON must be ran from its bin directory
$ cd TestON/bin
Run the test
$ teston run SAMPstartTemplate_1node
The tests are all located it TestON/tests/ Each test has its own folder with the following files:
.ospk file (optional)
This is written in Openspeak, a word based language developed by Paxterra.
It defines the cases and sequence of events for the test
TestON will automatically generate the .py file based on the .ospk file if the .ospk file exists.
.py file
This file serves the same exact function as the openspeak file.
It will only be used if there is NO .ospk file, so if you like python, delete or rename the .ospk file
.topo file
This defines all the components that TestON creates for that test and includes data such as IP address, login info, and device drivers
The Components must be defined in this file to be uesd in the openspeak or python files.
.params file
Defines all the test-specific variables that are used by the test.
NOTE: The variable testcases
defines which testcases run when the test is ran.
Here are a few things to check if it doesn't work
Double check the topo file for that specific test the nodes must be able to run that specific component ( Mininet IP -> machine with mn installed)
Enable passwordless logins between your nodes and the TestON node.