jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1783801 - /jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
Date Mon, 20 Feb 2017 21:38:06 GMT
Author: pmouawad
Date: Mon Feb 20 21:38:06 2017
New Revision: 1783801

URL: http://svn.apache.org/viewvc?rev=1783801&view=rev
Log:
Improve coverage

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java?rev=1783801&r1=1783800&r2=1783801&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java Mon Feb
20 21:38:06 2017
@@ -176,4 +176,29 @@ public class TestHtmlExtractorJSoup {
         assertNull(vars.get("regVal"));
         assertNull(vars.get("regVal_1"));
     }
+    
+    @Test
+    public void testPreviousVarsAreCleanedUp() throws Exception {
+        testMultipleVariableExtractionWithAttribute();
+        testMultipleVariableExtractionNoMatch();
+        assertNull(vars.get("regVal_2"));
+    }
+    
+    @Test
+    public void testUnknownExtractor() throws Exception {
+        extractor.setExtractor("UNKNOWN");
+        extractor.setExpression("c");
+        extractor.setMatchNumber(-1);
+        extractor.process();        
+        assertNull(vars.get("regVal_matchNr"));
+    }
+    
+    @Test
+    public void testNoPrevious() throws Exception {
+        jmctx.setPreviousResult(null);
+        extractor.setExpression("b");
+        extractor.setMatchNumber(-1);
+        extractor.process();        
+        assertNull(vars.get("regVal_matchNr"));
+    }
 }



Mime
View raw message