Versions Compared

Key

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

Welcome to Test-ON TestON tutorial!

Overview

Test on TestON runs on Linux platform. Test-ON TestON requires a proper ONOS installation in order to work, see ONOS tutorialTutorial for more information.

By completing this tutorial, you will understand how to:

  • Install Test-ONTestON.
  • Create appropriate files to run test on Test-ONTestON.
  • Create and run Test-ON TestON script.
  • Create a Test-ON TestON driver.

NOTE: If you are having trouble  on running Test-ON visit Test-ON FAQs or git hub wiki for additional informationtrouble running TestON, visit TestON FAQs for additional information, or email us if you're stuck.

Configuring Linux to run

...

TestON

Requirements:

  1. A Linux 2.6.26 or greater kernel compiled with network namespace support enabled (see INSTALL for additional information.)
  2. python Python 2.6 or higher versions.

Install python package configObj using:

Code Block
$ sudo pip install configObj

Prerequisites:

...

Stuck? Found a bug? Questions?

Installation

Clone the Test-ON from TestON from https://github.com/OPENNETWORKINGLAB/ONLabTest.git

Please configure mail server details before going to start working with Test-ON

  • Open core/utilities.py file inside Test-ON Framework
  • Check def send_mail(self) and configure the mail server and your credentials as mention below:
Code Block
233:   msg['From'] = 'user@mailserver.com'
250:   smtp = smtplib.SMTP('Hostname/IP')
252:   smtp.login('user@mailserver.com','password')

Test files

You can see test files in the /TestON/tests/ folder. Each of the tests has a unique set of files defined below:

.params - This file contains user defined variables for the test case. Also specify the order of which test cases to run.

.topo - This file defines all the components and options that Test-ON will use to execute its test. The machine's user name, password, IP addresses, drivers, and/or Mininet's topology would be specified in this file. ( Please use the exact syntax/format in the topo file. The space character in the xml tags is important even though you are not defining anything in the tag Eg. <COMPONENTS> </COMPONENTS>)

.py - This is where all of the test cases are written. It calls upon functions implemented in the respective drivers to create a progression of events that produces some sort of pass/fail outcome.

PingallExample test

This test uses pingall function to ping all the host in the network. The test is successful if all the hosts are reachable.

  • CASE1: Starts up ONOS, from pulling the latest code to running ONOS, also starts the a Mininet instance. Reports success if ONOS did not start up correctly.
  • CASE2: Assign mastership to controller. Reports success if all the switches are assigned to a controller.
  • CASE3: Installs onos-app-fwd (reactive forwarding app) and does pingall. Reports success if all hosts are reachable.

Params File

Below is the PingallExample.params:

Code Block
linenumberstrue
<PARAMS>
    <testcases>1,2,3</testcases>
    <ENV>
        <cellName>HA</cellName>
    </ENV>
    <Git>True</Git>

    <CTRL>
        <ip1>10.128.30.11</ip1>
        <port1>6633</port1>
    </CTRL>
</PARAMS>

The testcases tag defines the order in which the test cases are executed.

 

 

 

 

 

 

gerrit.onosproject.org/OnosSystemTest: 

Code Block
git clone https://gerrit.onosproject.org/OnosSystemTest

Run the install.sh script:

Code Block
cd OnosSystemTest/TestON/
./install.sh


Having installation problem? visit TestON FAQ for more information.

Exploring further

Now that you finish installing TestON, you can now create your test cases. Find out how you can create your own tests in test files section of the tutorial.

Stuck? Found a bug? Questions?

Email us if you’re stuck, think you’ve found a bug, or just want to send some feedback. Please have a look at the guidelines to learn how to efficiently submit a bug report.