1
2 '''
3 Created on 26-Nov-2012
4
5 @author: Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
6
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20
21 Testing of the Experimental Mode
22
23 ofautomation>run ExperimentTest example 1
24 will execute this example.
25 '''
27 '''
28 Testing of the Experimental Mode
29
30 '''
31
34
36 '''
37 Testing the configuration of the host by using checkIP functionof Mininet driver
38 '''
39 main.EXPERIMENTAL_MODE = main.TRUE
40 main.case("Testing the configuration of the host")
41 main.step("Host IP Checking using checkIP")
42 result = main.Mininet1.checkIP(main.params['CASE1']['destination'])
43 main.step("Verifying the result")
44 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
45 main.step("Calling Non Existing API for Experimental Mode")
46 testReturn = main.POX2.verify_flow(returns=main.TRUE)
47 utilities.assert_equals(expect=main.TRUE,actual=testReturn,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
48
50 '''
51 Testing of the reachability of the hosts by using pingall of Mininet driver
52 '''
53 main.EXPERIMENTAL_MODE = main.TRUE
54 main.case("Testing Reachabilty of all the hosts")
55 main.step("Checking Hosts reachability by using pingall")
56 result = main.Mininet1.pingall()
57 main.step("Verifying the result")
58 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="All hosts are reacchable",onfail="Hosts are not reachable")
59 main.step("Calling Non Existing API for Experimental Mode")
60 testReturn = main.Mininet1.verify_flow(returns=main.TRUE)
61 utilities.assert_equals(expect=main.TRUE,actual=testReturn,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
62