You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/03/28 19:26:50 UTC

svn commit: r1789198 - /jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java

Author: pmouawad
Date: Tue Mar 28 19:26:50 2017
New Revision: 1789198

URL: http://svn.apache.org/viewvc?rev=1789198&view=rev
Log:
Bug 60112 - Report / Dashboard : Add ability to customize APDEX thresholds per Transaction name
Increase coverage
Bugzilla Id: 60112

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java?rev=1789198&r1=1789197&r2=1789198&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java Tue Mar 28 19:26:50 2017
@@ -88,6 +88,25 @@ public class ApdexPerTransactionTest ext
         assertTrue(keys.contains("sample(\\d+)"));
         assertArrayEquals(new Long[] {1000L,  2000L}, apdex.get("sample(\\d+)"));
     }
+   
+   @Test
+   public void testGetApdexPerTransactionNoValue() {
+       Map<String, Long[]> apdex = ReportGeneratorConfiguration.getApdexPerTransactionParts("");
+       assertNotNull("map should not be null", apdex);
+       assertEquals(0, apdex.size());
+       
+       apdex = ReportGeneratorConfiguration.getApdexPerTransactionParts(" ");
+       assertNotNull("map should not be null", apdex);
+       assertEquals(0, apdex.size());
+   }
+   
+   @Test
+   public void testGetApdexPerTransactionWrongFormat() {
+       Map<String, Long[]> apdex = 
+               ReportGeneratorConfiguration.getApdexPerTransactionParts("sample1|123:434");
+       assertNotNull("map should not be null", apdex);
+       assertEquals(0, apdex.size());
+   }
 	
 	@Test
 	public void testSampleNameMatching() {