mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	kpi: Support subtests passed/failed.
This commit is contained in:
		| @@ -27,7 +27,7 @@ | ||||
|  | ||||
| <h3>Individual test results and logs.</h3> | ||||
| <table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px"> | ||||
| <!-- <tr><td><a href=ap_auto_basic_cx/index.html>AP AUto Basic CX Report</a></td><td><a href=ap_auto_basic_cx/logs>Logs</a></td></tr> --> | ||||
| <!-- <tr><td><a href=ap_auto_basic_cx/index.html>AP Auto Basic CX Report</a></td><td><a href=ap_auto_basic_cx/logs>Logs</a></td></tr> --> | ||||
|    ___TR_TESTS___ | ||||
| </table> | ||||
| <P> | ||||
| @@ -41,8 +41,8 @@ | ||||
| <P> | ||||
|      | ||||
|     <table border="1" cellpadding="2" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px"> | ||||
|       <tr><th>Test-ID</th><th>Short Description</th><th>Pass/Fail</th><th>Numeric Result</th><th>Test Details</th></tr> | ||||
|       <!-- <tr><td>AP AUtomated Test</td><td>Daul Band Performance</td><td>PASS</td><td>86.44</td><td>Dual-Concurrent vs 90% of Sum: 435.68 Mbps / 558.84 Mbps Dual-Concurrent vs 90% of Sum: 598.17 Mbps / 630.11 Mbps</td></tr> --> | ||||
|       <tr><th>Test-ID</th><th>Short Description</th><th>Pass/Fail</th><th>Subtest-Passed</th><th>Subtest-Failed</th><th>Numeric Result</th><th>Test Details</th></tr> | ||||
|       <!-- <tr><td>AP AUtomated Test</td><td>Daul Band Performance</td><td>PASS</td><td>1</td><td>2</td><td>86.44</td><td>Dual-Concurrent vs 90% of Sum: 435.68 Mbps / 558.84 Mbps Dual-Concurrent vs 90% of Sum: 598.17 Mbps / 630.11 Mbps</td></tr> --> | ||||
|       ___TR_KPI___ | ||||
|     </table> | ||||
| <P> | ||||
|   | ||||
							
								
								
									
										34
									
								
								gui/kpi.java
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								gui/kpi.java
									
									
									
									
									
								
							| @@ -42,6 +42,8 @@ public class kpi { | ||||
|    public static int NOTES_IDX = 11; | ||||
|    public static int UNITS_IDX = 12; | ||||
|    public static int GRAPH_GROUP_IDX = 13; | ||||
|    public static int SUBTEST_PASS_IDX = 14; | ||||
|    public static int SUBTEST_FAIL_IDX = 15; | ||||
|  | ||||
|    public static String TESTBED_TEMPLATE = "testbed_template.html"; | ||||
|    public static String AP_AUTO_BASIC_CX = "ap_auto_basic_cx"; | ||||
| @@ -684,6 +686,18 @@ class Row { | ||||
|       return rdata.elementAt(kpi.NOTES_IDX); | ||||
|    } | ||||
|  | ||||
|    String getSubtestPassed() { | ||||
|       if (rdata.size() > kpi.SUBTEST_PASS_IDX) | ||||
|          return rdata.elementAt(kpi.SUBTEST_PASS_IDX); | ||||
|       return ""; | ||||
|    } | ||||
|  | ||||
|    String getSubtestFailed() { | ||||
|       if (rdata.size() > kpi.SUBTEST_FAIL_IDX) | ||||
|          return rdata.elementAt(kpi.SUBTEST_FAIL_IDX); | ||||
|       return ""; | ||||
|    } | ||||
|  | ||||
|    String getUnits() { | ||||
|       try { | ||||
|          return rdata.elementAt(kpi.UNITS_IDX); | ||||
| @@ -928,6 +942,26 @@ class Test { | ||||
|             fail++; | ||||
|          } | ||||
|  | ||||
|          String spass = row.getSubtestPassed(); | ||||
|          try { | ||||
|             if (!spass.equals("")) { | ||||
|                pass += Long.valueOf(spass).longValue(); | ||||
|             } | ||||
|          } | ||||
|          catch (Exception ee) { | ||||
|             ee.printStackTrace(); | ||||
|          } | ||||
|  | ||||
|          String sfail = row.getSubtestFailed(); | ||||
|          try { | ||||
|             if (!sfail.equals("")) { | ||||
|                fail += Long.valueOf(sfail).longValue(); | ||||
|             } | ||||
|          } | ||||
|          catch (Exception ee) { | ||||
|             ee.printStackTrace(); | ||||
|          } | ||||
|  | ||||
|          row.setShortDescKey(row.getShortDesc().replace(" ", "_")); | ||||
|          //System.out.println("Row: " + row); | ||||
|          descs.put(row.getShortDesc(), row.getShortDesc()); | ||||
|   | ||||
| @@ -148,7 +148,15 @@ foreach my $line (@files) { | ||||
|             if  ( $nval =~ /^[+-]?(?=\.?\d)\d*\.?\d*(?:e[+-]?\d+)?\z/i ) { | ||||
|                $nval = sprintf("%.2f", $nval); | ||||
|             } | ||||
|             $kpi_tr .= "<tr><td>$cols[7]</td><td>$cols[8]</td><td>$cols[9]</td><td>$nval</td><td>$cols[11]</td></tr>\n"; | ||||
|  | ||||
|             my $s_passed = "0"; | ||||
|             my $s_failed = "0"; | ||||
|             if (@cols >= 16) { | ||||
|                $s_passed = $cols[14]; | ||||
|                $s_failed = $cols[15]; | ||||
|             } | ||||
|  | ||||
|             $kpi_tr .= "<tr><td>$cols[7]</td><td>$cols[8]</td><td>$cols[9]</td><td>$s_passed</td><td>$s_failed</td><td>$nval</td><td>$cols[11]</td></tr>\n"; | ||||
|          } | ||||
|       } | ||||
|    } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear