You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2006/04/29 14:29:51 UTC
svn commit: r398139 -
/jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
Author: sebb
Date: Sat Apr 29 05:29:51 2006
New Revision: 398139
URL: http://svn.apache.org/viewcvs?rev=398139&view=rev
Log:
Add https test
Modified:
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
Modified: jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
URL: http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java?rev=398139&r1=398138&r2=398139&view=diff
==============================================================================
--- jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java (original)
+++ jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java Sat Apr 29 05:29:51 2006
@@ -117,6 +117,25 @@
parser.process();
assertEquals("http://www.apache.org/subdir/index.html", config.getUrl().toString());
}
+
+ // Test https works too
+ public void testSimpleParse1() throws Exception {
+ HTTPSamplerBase config = makeUrlConfig(".*/index\\.html");
+ config.setProtocol("https");
+ HTTPSamplerBase context = makeContext("https://www.apache.org/subdir/previous.html");
+ String responseText = "<html><head><title>Test page</title></head><body>"
+ + "<a href=\"index.html\">Goto index page</a></body></html>";
+ HTTPSampleResult result = new HTTPSampleResult();
+ jmctx.setCurrentSampler(context);
+ jmctx.setCurrentSampler(config);
+ result.setResponseData(responseText.getBytes());
+ result.setSampleLabel(context.toString());
+ result.setSamplerData(context.toString());
+ result.setURL(context.getUrl());
+ jmctx.setPreviousResult(result);
+ parser.process();
+ assertEquals("https://www.apache.org/subdir/index.html", config.getUrl().toString());
+ }
public void testSimpleParse2() throws Exception {
HTTPSamplerBase config = makeUrlConfig("/index\\.html");
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org