Author: sebb
Date: Wed Jan 11 18:35:06 2006
New Revision: 368236
URL: http://svn.apache.org/viewcvs?rev=368236&view=rev
Log:
New test for base href with full URL
Modified:
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
Modified:
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
URL:
http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java?rev=368236&r1=368235&r2=368236&view=diff
==============================================================================
---
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
(original)
+++
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
Wed Jan 11 18:35:06 2006
@@ -93,40 +93,46 @@
}
// List of parsers to test. Should probably be derived automatically
- private static final String[] PARSERS = {
"org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser",
- "org.apache.jmeter.protocol.http.parser.JTidyHTMLParser",
- "org.apache.jmeter.protocol.http.parser.RegexpHTMLParser" };
+ private static final String[] PARSERS = {
+ "org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser",
+ "org.apache.jmeter.protocol.http.parser.JTidyHTMLParser",
+ "org.apache.jmeter.protocol.http.parser.RegexpHTMLParser"
+ };
private static final TestData[] TESTS = new TestData[] {
- new TestData("testfiles/HTMLParserTestCase.html",
"http://localhost/mydir/myfile.html",
- "testfiles/HTMLParserTestCase.set",
"testfiles/HTMLParserTestCase.all"),
- new TestData("testfiles/HTMLParserTestCaseWithBaseHRef.html",
"http://localhost/mydir/myfile.html",
- "testfiles/HTMLParserTestCase.set",
"testfiles/HTMLParserTestCase.all"),
+ new TestData("testfiles/HTMLParserTestCase.html",
+ "http://localhost/mydir/myfile.html",
+ "testfiles/HTMLParserTestCase.set",
+ "testfiles/HTMLParserTestCase.all"),
+ new TestData("testfiles/HTMLParserTestCaseWithBaseHRef.html",
+ "http://localhost/mydir/myfile.html",
+ "testfiles/HTMLParserTestCase.set",
+ "testfiles/HTMLParserTestCase.all"),
+ new TestData("testfiles/HTMLParserTestCaseWithBaseHRef2.html",
+ "http://localhost/mydir/myfile.html",
+ "testfiles/HTMLParserTestCase.set",
+ "testfiles/HTMLParserTestCase.all"),
new
TestData("testfiles/HTMLParserTestCaseWithMissingBaseHRef.html",
- "http://localhost/mydir/images/myfile.html",
"testfiles/HTMLParserTestCase.set",
+ "http://localhost/mydir/images/myfile.html",
+ "testfiles/HTMLParserTestCase.set",
+ "testfiles/HTMLParserTestCase.all"),
+ new TestData("testfiles/HTMLParserTestCase2.html",
+ "http:", "", ""), // Dummy as the file has no entries
+ new TestData("testfiles/HTMLParserTestCase3.html",
+ "http:", "", ""), // Dummy as the file has no entries
+ new TestData("testfiles/HTMLParserTestCaseWithComments.html",
+ "http://localhost/mydir/myfile.html",
+ "testfiles/HTMLParserTestCase.set",
"testfiles/HTMLParserTestCase.all"),
- new TestData("testfiles/HTMLParserTestCase2.html", "http:", //
Dummy,
- //
as
- //
the
- //
file
- //
has
- //
no
- //
entries
- "", ""),
- new TestData("testfiles/HTMLParserTestCase3.html", "http:", //
Dummy,
- //
as
- //
the
- //
file
- //
has
- //
no
- //
entries
- "", ""),
- new TestData("testfiles/HTMLParserTestCaseWithComments.html",
"http://localhost/mydir/myfile.html",
- "testfiles/HTMLParserTestCase.set",
"testfiles/HTMLParserTestCase.all"),
- new TestData("testfiles/HTMLScript.html", "http://localhost/",
"testfiles/HTMLScript.set",
+ new TestData("testfiles/HTMLScript.html",
+ "http://localhost/",
+ "testfiles/HTMLScript.set",
"testfiles/HTMLScript.all"),
- new TestData("testfiles/HTMLParserTestFrames.html",
"http://localhost/",
- "testfiles/HTMLParserTestFrames.all",
"testfiles/HTMLParserTestFrames.all"), };
+ new TestData("testfiles/HTMLParserTestFrames.html",
+ "http://localhost/",
+ "testfiles/HTMLParserTestFrames.all",
+ "testfiles/HTMLParserTestFrames.all"),
+ };
public static junit.framework.Test suite() {
TestSuite suite = new TestSuite();
@@ -137,8 +143,7 @@
suite.addTest(new TestHTMLParser("testNotCreatable"));
suite.addTest(new TestHTMLParser("testNotCreatableStatic"));
for (int i = 0; i < PARSERS.length; i++) {
- TestSuite ps = new TestSuite(PARSERS[i]);// Identify the
- // subtests
+ TestSuite ps = new TestSuite(PARSERS[i]);// Identify subtests
ps.addTest(new TestHTMLParser("testParserProperty",
PARSERS[i], 0));
for (int j = 0; j < TESTS.length; j++) {
TestSuite ts = new TestSuite(TESTS[j].fileName);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]