Versions Compared

Key

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

...

  • cell - definition of a set of resources used to run an ONOS cluster
  • STC - framework for execution and verification of scenarios
  • scenario - a reusable logical grouping of steps to accomplish some task
  • step - a single unit of execution within a scenario. A step can be a call to bash, python, or other executable. Steps define an action and an expected outcome.
  • groupa collection of other groups and steps  used for grouping related sets of steps  and definition of shared dependencies

 

Predefined Scenarios

STC comes with a set of predefined scenarios designed to test specific ONOS behavior. The most commonly used scenarios are:

  • stc setup - pushes a build of ONOS from the host onto all nodes of the cell. Once the bits have been pushespushed, ONOS is started and STC verifies that all nodes are up and in their basic configuration, and that no errors occurred. 
  • stc net-setup - creates a mininet instance and standard topology on a running ONOS cluster
  • stc fast - runs a set of smoke tests that complete quickly, testing reactive forwarding and basic connectivity
  • stc smoke (or just stc) - runs a more involved set of smoke tests, testing intents, flows, flow objectives, drivers, and apps

...

We can tell from this output that the Check-Passwordless-Login-1 step failed. Looking back in the output stream, if we look at the started message for that step, we can see that at the time of the failure, STC was running the command `ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no sdn@10.128.11.101 date'. There are two ways we can diagnose this problem. Any time there is an error, you can always rerun the failed step by simply rerunning the command from the command line:

...

The output of the command is getting a timeout error, in this case because there is no cell set up on the given IP address. Another way to diagnose a failure is to look at the log files generated by execution of the command. STC keeps the log of each step as it executes, and you can retrieve the log using the stl command. stl takes the scenario name and the step name as arguments. Both arguments can be filled in using tab completion. In the case of previous error, since the test being run was smoke and the step was Check-Passwordless-Login-1, the command to fetch the log file is 'stl smoke Check-Passwordless-Login-1.log'. It shows us the output of the failing command:

Advanced Topics

If you want to learn more about STC, you can refer to the STC Advanced Topics page to find out more about STC internals, or the Developing Your Own STC Test to find out how to write a test scenario. You can also consult the STC Reference Guide for detailed descriptions of each STC entity.

Info
titleSTC scripts - basic usage

Not interested in smoke testing? Looking for basic STC scripts to deploy ONOS target machines and your Mininet topology ? You can find info at this page.