Refactoring to improve wiki reporting format
diff --git a/TestON/tests/TopoPerfNext/TopoPerfNext.params b/TestON/tests/TopoPerfNext/TopoPerfNext.params
index 6983791..4a2a107 100644
--- a/TestON/tests/TopoPerfNext/TopoPerfNext.params
+++ b/TestON/tests/TopoPerfNext/TopoPerfNext.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,3</testcases>
+    <testcases>1,2,3,4</testcases>
 
     <ENV>
         <cellName>topo_perf_test</cellName>
@@ -39,7 +39,7 @@
         <onosLogFile>/opt/onos/log/karaf*</onosLogFile>
 
         #Number of times to iterate each case
-        <numIter>5</numIter>
+        <numIter>9</numIter>
         <numSwitch>100</numSwitch>         
     
         <singleSwThreshold>0,1000</singleSwThreshold>
diff --git a/TestON/tests/TopoPerfNext/TopoPerfNext.py b/TestON/tests/TopoPerfNext/TopoPerfNext.py
index 07ef59e..b212705 100644
--- a/TestON/tests/TopoPerfNext/TopoPerfNext.py
+++ b/TestON/tests/TopoPerfNext/TopoPerfNext.py
@@ -31,6 +31,7 @@
         BENCH_ip = main.params['BENCH']['ip']
 
         main.case("Setting up test environment")
+        main.log.report("Setting up test environment")
 
         main.step("Creating cell file")
         cell_file_result = main.ONOSbench.create_cell_file(
@@ -86,8 +87,8 @@
                         pull_result and mvn_result and\
                         install1_result and install2_result and\
                         install3_result,
-                onpass="ONOS started successfully",
-                onfail="Failed to start ONOS")
+                onpass="Test Environment setup successful",
+                onfail="Failed to setup test environment")
 
     def CASE2(self, main):
         '''
@@ -438,17 +439,17 @@
                 (float(sum(latency_t0_to_device_list)) / \
                  len(latency_ofp_to_device_list))
 
-        main.log.report("Switch add - End-to-end latency: \n"+\
-                "Min: "+str(latency_end_to_end_min)+" mx\n"+\
-                "Max: "+str(latency_end_to_end_max)+" ms\n"+\
+        main.log.report("Switch add - End-to-end latency: "+\
+                "Min: "+str(latency_end_to_end_min)+" mx "+\
+                "Max: "+str(latency_end_to_end_max)+" ms "+\
                 "Avg: "+str(latency_end_to_end_avg)+" ms")
-        main.log.report("Switch add - OFP-to-Graph latency: \n"+\
-                "Min: "+str(latency_ofp_to_graph_min)+" ms \n"+\
-                "Max: "+str(latency_ofp_to_graph_max)+" ms\n"+\
+        main.log.report("Switch add - OFP-to-Graph latency: "+\
+                "Min: "+str(latency_ofp_to_graph_min)+" ms "+\
+                "Max: "+str(latency_ofp_to_graph_max)+" ms "+\
                 "Avg: "+str(latency_ofp_to_graph_avg)+" ms")
-        main.log.report("Switch add - t0-to-Device latency: \n"+\
-                "Min: "+str(latency_t0_to_device_min)+" ms\n"+\
-                "Max: "+str(latency_t0_to_device_max)+" ms\n"+\
+        main.log.report("Switch add - t0-to-Device latency: "+\
+                "Min: "+str(latency_t0_to_device_min)+" ms"+\
+                "Max: "+str(latency_t0_to_device_max)+" ms"+\
                 "Avg: "+str(latency_t0_to_device_avg)+" ms")
 
         if debug_mode == 'on':
@@ -630,11 +631,11 @@
             pt_down_graph_to_ofp_avg =\
                     (int(pt_down_graph_to_ofp_1) +
                      int(pt_down_graph_to_ofp_2) + 
-                     int(pt_down_graph_to_ofp_3)) / 3.0
+                     int(pt_down_graph_to_ofp_3)) / 3
             pt_down_device_to_ofp_avg = \
                     (int(pt_down_device_to_ofp_1) + 
                      int(pt_down_device_to_ofp_2) +
-                     int(pt_down_device_to_ofp_3)) / 3.0
+                     int(pt_down_device_to_ofp_3)) / 3
 
             if pt_down_graph_to_ofp_avg > down_threshold_min and \
                     pt_down_graph_to_ofp_avg < down_threshold_max:
@@ -742,14 +743,14 @@
             main.log.info("ONOS3 delta D2O: "+str(pt_up_device_to_ofp_3)) 
 
             pt_up_graph_to_ofp_avg = \
-                    (float(pt_up_graph_to_ofp_1) + 
-                     float(pt_up_graph_to_ofp_2) +
-                     float(pt_up_graph_to_ofp_3)) / 3
+                    (int(pt_up_graph_to_ofp_1) + 
+                     int(pt_up_graph_to_ofp_2) +
+                     int(pt_up_graph_to_ofp_3)) / 3
 
             pt_up_device_to_ofp_avg = \
-                    (float(pt_up_device_to_ofp_1) + 
-                     float(pt_up_device_to_ofp_2) +
-                     float(pt_up_device_to_ofp_3)) / 3
+                    (int(pt_up_device_to_ofp_1) + 
+                     int(pt_up_device_to_ofp_2) +
+                     int(pt_up_device_to_ofp_3)) / 3
 
             if pt_up_graph_to_ofp_avg > up_threshold_min and \
                     pt_up_graph_to_ofp_avg < up_threshold_max: 
@@ -787,9 +788,9 @@
                 (sum(port_down_graph_to_ofp_list) / 
                  len(port_down_graph_to_ofp_list))
         
-        main.log.report("Port down graph-to-ofp \nMin: "+
-                str(port_down_graph_to_ofp_min)+" ms  \nMax: "+
-                str(port_down_graph_to_ofp_max)+" ms  \nAvg: "+
+        main.log.report("Port down graph-to-ofp Min: "+
+                str(port_down_graph_to_ofp_min)+" ms  Max: "+
+                str(port_down_graph_to_ofp_max)+" ms  Avg: "+
                 str(port_down_graph_to_ofp_avg)+" ms")
         
         port_down_device_to_ofp_min = min(port_down_device_to_ofp_list)
@@ -798,9 +799,9 @@
                 (sum(port_down_device_to_ofp_list) /\
                  len(port_down_device_to_ofp_list))
         
-        main.log.report("Port down device-to-ofp \nMin: "+
-                str(port_down_device_to_ofp_min)+" ms  \nMax: "+
-                str(port_down_device_to_ofp_max)+" ms  \nAvg: "+
+        main.log.report("Port down device-to-ofp Min: "+
+                str(port_down_device_to_ofp_min)+" ms  Max: "+
+                str(port_down_device_to_ofp_max)+" ms  Avg: "+
                 str(port_down_device_to_ofp_avg)+" ms")
         
         port_up_graph_to_ofp_min = min(port_up_graph_to_ofp_list)
@@ -809,9 +810,9 @@
                 (sum(port_up_graph_to_ofp_list) /\
                  len(port_up_graph_to_ofp_list))
         
-        main.log.report("Port up graph-to-ofp \nMin: "+
-                str(port_up_graph_to_ofp_min)+" ms  \nMax: "+
-                str(port_up_graph_to_ofp_max)+" ms  \nAvg: "+
+        main.log.report("Port up graph-to-ofp Min: "+
+                str(port_up_graph_to_ofp_min)+" ms  Max: "+
+                str(port_up_graph_to_ofp_max)+" ms  Avg: "+
                 str(port_up_graph_to_ofp_avg)+" ms")
           
         port_up_device_to_ofp_min = min(port_up_device_to_ofp_list)
@@ -820,9 +821,9 @@
                 (sum(port_up_device_to_ofp_list) /\
                  len(port_up_device_to_ofp_list))
         
-        main.log.report("Port up device-to-ofp \nMin: "+
-                str(port_up_device_to_ofp_min)+" ms  \nMax: "+
-                str(port_up_device_to_ofp_max)+" ms  \nAvg: "+
+        main.log.report("Port up device-to-ofp Min: "+
+                str(port_up_device_to_ofp_min)+" ms  Max: "+
+                str(port_up_device_to_ofp_max)+" ms  Avg: "+
                 str(port_up_device_to_ofp_avg)+" ms")
 
         utilities.assert_equals(expect=main.TRUE, actual=assertion,
@@ -941,17 +942,17 @@
                 for obj1 in json_obj1:
                     if '01' not in obj1['src']['device']:
                         link_down1 = True
-                        main.log.report("Link down from "+
+                        main.log.info("Link down from "+
                                 "s1 -> s2 on ONOS1 detected")
                 for obj2 in json_obj2:
                     if '01' not in obj2['src']['device']:
                         link_down2 = True
-                        main.log.report("Link down from "+
+                        main.log.info("Link down from "+
                                 "s1 -> s2 on ONOS2 detected")
                 for obj3 in json_obj3:
                     if '01' not in obj3['src']['device']:
                         link_down3 = True
-                        main.log.report("Link down from "+
+                        main.log.info("Link down from "+
                                 "s1 -> s2 on ONOS3 detected")
                 
                 loop_count += 1
@@ -1029,23 +1030,23 @@
                     link_down_lat_device2 = 0
                     link_down_lat_device3 = 0
         
-            main.log.report("Link down latency ONOS1 iteration "+
+            main.log.info("Link down latency ONOS1 iteration "+
                     str(i)+" (end-to-end): "+
                     str(link_down_lat_graph1)+" ms")
-            main.log.report("Link down latency ONOS2 iteration "+
+            main.log.info("Link down latency ONOS2 iteration "+
                     str(i)+" (end-to-end): "+
                     str(link_down_lat_graph2)+" ms")
-            main.log.report("Link down latency ONOS3 iteration "+
+            main.log.info("Link down latency ONOS3 iteration "+
                     str(i)+" (end-to-end): "+
                     str(link_down_lat_graph3)+" ms")
             
-            main.log.report("Link down latency ONOS1 iteration "+
+            main.log.info("Link down latency ONOS1 iteration "+
                     str(i)+" (link-event-to-system-timestamp): "+
                     str(link_down_lat_link1)+" ms")
-            main.log.report("Link down latency ONOS2 iteration "+
+            main.log.info("Link down latency ONOS2 iteration "+
                     str(i)+" (link-event-to-system-timestamp): "+
                     str(link_down_lat_link2)+" ms")
-            main.log.report("Link down latency ONOS3 iteration "+
+            main.log.info("Link down latency ONOS3 iteration "+
                     str(i)+" (link-event-to-system-timestamp): "+
                     str(link_down_lat_link3))
       
@@ -1106,17 +1107,17 @@
                 for obj1 in json_obj1:
                     if '01' in obj1['src']['device']:
                         link_down1 = False 
-                        main.log.report("Link up from "+
+                        main.log.info("Link up from "+
                             "s1 -> s2 on ONOS1 detected")
                 for obj2 in json_obj2:
                     if '01' in obj2['src']['device']:
                         link_down2 = False 
-                        main.log.report("Link up from "+
+                        main.log.info("Link up from "+
                             "s1 -> s2 on ONOS2 detected")
                 for obj3 in json_obj3:
                     if '01' in obj3['src']['device']:
                         link_down3 = False 
-                        main.log.report("Link up from "+
+                        main.log.info("Link up from "+
                             "s1 -> s2 on ONOS3 detected")
                 
                 loop_count += 1
@@ -1211,11 +1212,11 @@
             link_up_lat_graph_avg =\
                     (link_up_lat_graph1 +
                      link_up_lat_graph2 +
-                     link_up_lat_graph3) / 3.0
+                     link_up_lat_graph3) / 3
             link_up_lat_link_avg =\
                     (link_up_lat_link1 +
                      link_up_lat_link2 +
-                     link_up_lat_link3) / 3.0
+                     link_up_lat_link3) / 3
 
             #Set threshold and append latency to list
             if link_up_lat_graph_avg > up_threshold_min and\
@@ -1245,13 +1246,13 @@
         link_up_avg = sum(link_up_graph_to_system_list) / \
                         len(link_up_graph_to_system_list)
 
-        main.log.report("Link down latency - \nMin: "+
-                str(link_down_min)+" ms  \nMax: "+
-                str(link_down_max)+" ms  \nAvg: "+
+        main.log.report("Link down latency - Min: "+
+                str(link_down_min)+" ms  Max: "+
+                str(link_down_max)+" ms  Avg: "+
                 str(link_down_avg)+" ms")
-        main.log.report("Link up latency - \nMin: "+
-                str(link_up_min)+" ms  \nMax: "+
-                str(link_up_max)+" ms  \nAvg: "+
+        main.log.report("Link up latency - Min: "+
+                str(link_up_min)+" ms  Max: "+
+                str(link_up_max)+" ms  Avg: "+
                 str(link_up_avg)+" ms")
 
         utilities.assert_equals(expect=main.TRUE, actual=assertion,
@@ -1506,9 +1507,9 @@
         sw_lat_avg = sum(sw_discovery_lat_list) /\
                      len(sw_discovery_lat_list)
 
-        main.log.report("100 Switch discovery lat - \n"+\
-                "Min: "+str(sw_lat_min)+" ms\n"+\
-                "Max: "+str(sw_lat_max)+" ms\n"+\
-                "Avg: "+str(sw_lat_avg)+" ms\n")
+        main.log.report("100 Switch discovery lat "+\
+                "Min: "+str(sw_lat_min)+" ms"+\
+                "Max: "+str(sw_lat_max)+" ms"+\
+                "Avg: "+str(sw_lat_avg)+" ms")