Have questions? Stuck? Please check our FAQ for some common questions and answers.

Although CHOTestMonkey still runs based on test cases, we don't explicitly specify pass/fail criteria for each test case, but catch abnormal conditions of ONOS by injecting various checking into each test case.

Sample test case sequence:

0,1,2,3,[10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,40,60,10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,41,60]*500,100

Test Case #Description
0Initialize CHOTestMonkey
1

Load topology and balances all switches

2Collect and store device and link data from ONOS
3Collect and store host data from ONOS
10Run all enabled checks
20Bring down/up links and check topology and ping
21Bring down/up a group of links and check topology and ping
30Install host intents and check intent states and ping
31Uninstall host intents and check intent states
32Install point intents and check intent states and ping
33Uninstall point intents and check intent states
40Randomly bring down one ONOS node
41Randomly bring up one ONOS node that is down
50Set FlowObjective to True
51Set FlowObjective to False
60Rebalance devices across controllers
70Run randomly generated events
80Replay events from log file
90Sleep for some time
100Wait until the test stops

 

We also list all enabled and planned events in CHOTestMonkey:

Event IndexEvent NameDescription
0NULLDo nothing
1TEST_PAUSE

Pause the test

2TEST_RESUMEResume the test from pausing
3TEST_SLEEPMake the test sleep for some time
10CHECK_INTENTCheck whether all intents are in expected state
11CHECK_FLOWCheck whether all flows in ONOS are in ADDED state and match those on Mininet
12CHECK_TRAFFICCheck whether all installed intents work by sending ping traffic
13CHECK_TOPOCheck whether the number of devices, links and hosts are as expected and match those in Mininet
14CHECK_ONOSCheck whether the mastership, leaders and ONOS node states are as expected
20NETWORK_LINK_DOWNBring down a link in Mininet
21NETWORK_LINK_UPBring up a link in Mininet
22NETWORK_DEVICE_DOWNBring down a device in Mininet
23NETWORK_DEVICE_UPBring up a device in Mininet
30APP_INTENT_HOST_ADDAdd a host intent via ONOS CLI
31APP_INTENT_HOST_DELRemove a host intent via ONOS CLI
32APP_INTENT_POINT_ADDAdd a point intent via ONOS CLI
33APP_INTENT_POINT_DELRemove a point intent via ONOS CLI
40ONOS_ONOS_DOWNBring down an ONOS node
41ONOS_ONOS_UPBring up an ONOS node
42ONOS_SET_CFGSet a configuration via ONOS CLI
43ONOS_SET_FLOWOBJSet flow objective to True or False via ONOS CLI
44ONOS_BALANCE_MASTERSRun balance-masters via ONOS CLI
110CHECK_ALLInject all enabled check events into the test
120NETWORK_LINK_RANDOM_TOGGLERandomly bring down a link in Mininet and then bring it up
121NETWORK_LINK_GROUP_RANDOM_TOGGLERandomly bring down a group of links in Mininet and then bring them up
122NETWORK_DEVICE_RANDOM_TOGGLERandomly bring down a device in Mininet and then bring it up
123NETWORK_DEVICE_GROUP_RANDOM_TOGGLERandomly bring down a group of devices in Mininet and then bring them up
130APP_INTENT_HOST_ADD_ALLAdd host intents for all host pairs in the network
131APP_INTENT_HOST_DEL_ALLRemove host intents for all host pairs in the network
132APP_INTENT_POINT_ADD_ALLAdd point intents for all device pairs in the network
133APP_INTENT_POINT_DEL_ALLRemove point intents for all device pairs in the network
140ONOS_ONOS_RANDOM_TOGGLERandomly bring down an ONOS node and then bring it up
  • No labels