Under Construction
- Retry function
- Skip Case function
- Pause test Test functionCustom Thread class
- Command line arguments
- CHO framework
Retry Function
Available from driver functions or test cases as utilities.retry, this function allows the test to retry a function when certain conditions are met.
...
Code Block | ||
---|---|---|
| ||
# Retry on onosdriver's isup function. Will call isup up to 5 times with a 5 second sleep in between attempts. started = utilities.retry( main.ONOSbench.isup, main.FALSE, kwargs={"node":"10.0.0.1"}, sleep=5, attempts=5 ) |
Skip Case
Will skip the rest of the code in a test case. The case results will be determined as normal based on completed assertions unless the result argument is given.
...
Code Block | ||
---|---|---|
| ||
# Init Step if not result: main.skipCase() # Other steps that require Init Step to succeed |
...
Pause Test
Stops the test and interfaces with Python Debugger (pdb).
Type 'h' for help, 'n' to step, 'c' to continue, and 'q' to end test.
Code Block |
---|
main.stop() |
Command Line Arguments
When running TestON from the command line, the following arguments are supported: logdir, mail, example, tester, testcases, and onoscell.
...
Code Block | ||
---|---|---|
| ||
# The following command will modify the <TEST><flowObj> value read from "SCPFintentEventTp.params" file before the test begins $ ./cli.py run SCPFintentEventTp --params TEST/flowObj=True |
...
CHO Framework
CHO (Continuous Hours of Operation) test runs on an experimental framework called CHOTestMonkey inside TestON. Instead of running a predefined sequence of test cases, CHOTestMonkey breaks test cases into atomic test logics called events and provides a highly customizable way to organize and execute these events. With CHOTestMonkey, it becomes much easier and more flexible to maintain various pieces of test logic and assemble them in different ways for different test purposes. Please refer to CHO Test Tutorial page for details.