Versions Compared

Key

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

...

STC is run from a command line shell. If you have a properly configured development environment and cell, stc will run the tests for you and display the results of the test run. Here is an example of how to run the fast smoke test on a cell with one controller and one mininet node.

Diagnosing failures

STC will report failures by displaying a red line of text for the step that failed. If the environment variable stcHaltOnError is set to true, execution stops on the first error that is encountered. If this variable is undefined or set to some other value, execution continues as long as there are scenarios remaining that don't depend on failed steps. This behavior is useful for the clean up portion of scenarios. Here is an example of a failed STC run:

Image Added

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:

Image Added

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:

Image Added

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.