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 js...@apache.org on 2003/12/12 22:55:22 UTC

cvs commit: jakarta-jmeter/bin/testfiles jmeter_home_page_with_base_href.html

jsalvata    2003/12/12 13:55:22

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/modifier
                        AnchorModifier.java
               src/protocol/http/org/apache/jmeter/junit/protocol/http/parser
                        HtmlParserTester.java
  Added:       bin/testfiles jmeter_home_page_with_base_href.html
  Log:
  Test for yet-to-be-implemented feature. Commented out, of course.
  
  Revision  Changes    Path
  1.11      +19 -62    jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
  
  Index: AnchorModifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AnchorModifier.java	12 Dec 2003 20:03:53 -0000	1.10
  +++ AnchorModifier.java	12 Dec 2003 21:55:22 -0000	1.11
  @@ -297,7 +297,7 @@
               super(name);
           }
   
  -        public void testModifySampler() throws Exception
  +        public void testProcessingHTMLFile(String HTMLFileName) throws Exception
           {
               HTTPSampler config =
                   (HTTPSampler) SaveService
  @@ -320,11 +320,12 @@
               result.setResponseData(
                   new TextFile(
                       System.getProperty("user.dir")
  -                        + "/testfiles/jmeter_home_page.html")
  +                        + HTMLFileName)
                       .getText()
                       .getBytes());
               result.setSampleLabel(context.toString());
               result.setSamplerData(context.toString());
  +            result.setURL(new URL("http://nagoya.apache.org/fakepage.html"));
               JMeterContextService.getContext().setPreviousResult(result);
               AnchorModifier modifier = new AnchorModifier();
               modifier.process();
  @@ -359,67 +360,23 @@
                   config.toString());
           }
   
  +        public void testModifySampler() throws Exception
  +        {
  +            testProcessingHTMLFile(
  +                "/testfiles/jmeter_home_page.html");
  +        }
  +        
           public void testModifySamplerWithRelativeLink() throws Exception
           {
  -            HTTPSampler config =
  -                (HTTPSampler) SaveService
  -                    .loadSubTree(
  -                        new FileInputStream(
  -                            System.getProperty("user.dir")
  -                                + "/testfiles/load_bug_list.jmx"))
  -                    .getArray()[0];
  -            config.setRunningVersion(true);
  -            HTTPSampleResult result = new HTTPSampleResult();
  -            HTTPSampler context =
  -                (HTTPSampler) SaveService
  -                    .loadSubTree(
  -                        new FileInputStream(
  -                            System.getProperty("user.dir")
  -                                + "/testfiles/Load_JMeter_Page.jmx"))
  -                    .getArray()[0];
  -            JMeterContextService.getContext().setCurrentSampler(context);
  -            JMeterContextService.getContext().setCurrentSampler(config);
  -            result.setResponseData(
  -                new TextFile(
  -                    System.getProperty("user.dir")
  -                        + "/testfiles/jmeter_home_page_with_relative_links.html")
  -                    .getText()
  -                    .getBytes());
  -            result.setURL(new URL("http://nagoya.apache.org/fakepage.html"));
  -            result.setSampleLabel(context.toString());
  -            result.setSamplerData(context.toString());
  -            JMeterContextService.getContext().setPreviousResult(result);
  -            AnchorModifier modifier = new AnchorModifier();
  -            modifier.process();
  -            assertEquals(
  -                "http://nagoya.apache.org/bugzilla/buglist.cgi?"
  -                    + "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED"
  -                    + "&email1=&emailtype1=substring&emailassigned_to1=1"
  -                    + "&email2=&emailtype2=substring&emailreporter2=1"
  -                    + "&bugidtype=include&bug_id=&changedin=&votes="
  -                    + "&chfieldfrom=&chfieldto=Now&chfieldvalue="
  -                    + "&product=JMeter&short_desc=&short_desc_type=substring"
  -                    + "&long_desc=&long_desc_type=substring&bug_file_loc="
  -                    + "&bug_file_loc_type=substring&keywords="
  -                    + "&keywords_type=anywords"
  -                    + "&field0-0-0=noop&type0-0-0=noop&value0-0-0="
  -                    + "&cmdtype=doit&order=Reuse+same+sort+as+last+time",
  -                config.toString());
  -            config.recoverRunningVersion();
  -            assertEquals(
  -                "http://nagoya.apache.org/bugzilla/buglist.cgi?"
  -                    + "bug_status=.*&bug_status=.*&bug_status=.*&email1="
  -                    + "&emailtype1=substring&emailassigned_to1=1&email2="
  -                    + "&emailtype2=substring&emailreporter2=1"
  -                    + "&bugidtype=include&bug_id=&changedin=&votes="
  -                    + "&chfieldfrom=&chfieldto=Now&chfieldvalue="
  -                    + "&product=JMeter&short_desc=&short_desc_type=substring"
  -                    + "&long_desc=&long_desc_type=substring&bug_file_loc="
  -                    + "&bug_file_loc_type=substring&keywords="
  -                    + "&keywords_type=anywords&field0-0-0=noop"
  -                    + "&type0-0-0=noop&value0-0-0=&cmdtype=doit"
  -                    + "&order=Reuse+same+sort+as+last+time",
  -                config.toString());
  +            testProcessingHTMLFile(
  +                "/testfiles/jmeter_home_page_with_relative_links.html");
  +        }
  +/* Feature not yet implemented. TODO: implement it.
  +        public void testModifySamplerWithBaseHRef() throws Exception
  +        {
  +            testProcessingHTMLFile(
  +                "/testfiles/jmeter_home_page_with_base_href.html");
           }
  +*/
       }
   }
  
  
  
  1.9       +1 -2      jakarta-jmeter/src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java
  
  Index: HtmlParserTester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HtmlParserTester.java	12 Dec 2003 20:03:53 -0000	1.8
  +++ HtmlParserTester.java	12 Dec 2003 21:55:22 -0000	1.9
  @@ -8,7 +8,6 @@
   import org.apache.jmeter.protocol.http.modifier.AnchorModifier;
   import org.apache.jmeter.protocol.http.sampler.HTTPSampleResult;
   import org.apache.jmeter.protocol.http.sampler.HTTPSampler;
  -import org.apache.jmeter.samplers.SampleResult;
   import org.apache.jmeter.threads.JMeterContextService;
   
   /**
  
  
  
  1.1                  jakarta-jmeter/bin/testfiles/jmeter_home_page_with_base_href.html
  
  Index: jmeter_home_page_with_base_href.html
  ===================================================================
  HTTP/1.1 200 OK
  Date: Thu, 24 Apr 2003 21:15:26 GMT
  Server: Apache/2.0.45-dev (Unix)
  Last-Modified: Thu, 24 Apr 2003 13:26:51 GMT
  ETag: "31a620-1b1e-6ee17cc0"
  Accept-Ranges: bytes
  Content-Length: 6942
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/html
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  
  <!-- Content Stylesheet for Site -->
  
  	 
  <!-- start the processing -->
  	 <!-- ====================================================================== -->
  	 <!-- Main Page Section -->
  	 <!-- ====================================================================== -->
  	 <html>
  		  <head>
  				<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  
  													 				<meta name="author" value="Brendan Burns, et al.">
  				<meta name="email" value="bburns@apache.org">
  				<base href="bugzilla/"/>
  				<title>JMeter - Apache JMeter</title>
  		  </head>
  
  		  <body bgcolor="#ffffff" text="#000000" link="#525D76">
  				<table border="0" cellspacing="0">
  					 <!-- TOP IMAGE -->
  					 <tr>
  						  <td colspan="2">
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
  </td>
  					 </tr>
  				</table>
  				<table border="0" width="100%" cellspacing="4">
  					 <tr><td colspan="2">
  						  <hr noshade="" size="1"/>
  					 </td></tr>
  
  					 <tr>
  						  <!-- LEFT SIDE NAVIGATION -->
  						  <td width="20%" valign="top" nowrap="true">
  						  	 		  <p><strong>About</strong></p>
  		  <ul>
  		  				<li>	 <a href="./index.html">Overview</a>
  </li>
  		  				<li>	 <a href="http://jakarta.apache.org/builds/jakarta-jmeter/">Download Releases</a>
  </li>
  		  				<li>	 <a href="http://cvs.apache.org/builds/jakarta-jmeter/nightly">Download Nightly Tarball</a>
  </li>
  		  				<li>	 <a href="./changes.html">Changes</a>
  </li>
  		  				<li>	 <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=JMeter&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Reuse+same+sort+as+last+time">Known Bugs</a>
  </li>
  		  				<li>	 <a href="./license.html">License</a>
  </li>
  		  				<li>	 <a href="./contributing.html">Contributors</a>
  </li>
  		  		  </ul>
  	 		  <p><strong>Documentation</strong></p>
  		  <ul>
  		  				<li>	 <a href="./usermanual/index.html">User Manual</a>
  </li>
  		  				<li>	 <a href="./extending/index.html">Developer Manual</a>
  </li>
  		  				<li>	 <a href="http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterProjectPages">JMeter Wiki</a>
  </li>
  		  		  </ul>
  	 		  <p><strong>JMeter Resources</strong></p>
  		  <ul>
  		  				<li>	 <a href="http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterLinks">JMeter Articles</a>
  </li>
  		  				<li>	 <a href="./jmeter_irc.html">JMeter on IRC</a>
  </li>
  		  		  </ul>
  	 		  <p><strong>Community</strong></p>
  		  <ul>
  		  				<li>	 <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
  </li>
  		  				<li>	 <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
  </li>
  		  				<li>	 <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
  </li>
  		  		  </ul>
  	 						  </td>
  						  <td width="80%" align="left" valign="top">
  						  						  									 <table border="0" cellspacing="0" cellpadding="2" width="100%">
  		<tr><td bgcolor="#525D76">
  		  <font color="#ffffff" face="arial,helvetica,sanserif">
  			 <a name=""><strong>Apache JMeter</strong></a>
  		  </font>
  		</td></tr>
  		<tr><td>
  		  <blockquote>
  		  									 				<p	>
  								
  	  
  												<b	>
  								Apache JMeter
  						</b>
  									 is a 100% pure Java desktop application designed
  	  to load test functional behavior and measure performance.  It was
  	  originally designed for testing Web Applications but has
  	  since expanded to other test functions.
  	
  						</p>
  							  									 				<h2	>
  								What can I do with it?
  						</h2>
  							  									 				<p	>
  								
  	  Apache JMeter may be used to test performance both on static and dynamic
  	  resources (files, Servlets, Perl scripts, Java Objects, Data Bases and
  	  Queries, FTP Servers and more). It can be used to simulate a heavy
  load on a server, network or object to test its strength or to analyze
  overall performance under different load types. You can use it to make a
  graphical analysis of performance or to test your server/script/object
  behavior under heavy concurrent load.
  
  						</p>
  							  									 				<p	>
  												<a	 HREF="usermanual/index.html">
  								Using JMeter
  						</a>
  							</p>
  							  									 				<h2	>
  								What does it do?
  						</h2>
  							  									 				<p	>
  								Apache JMeter features include:
  						</p>
  							  									 				<ul	>
  								
  	
  												<li	>
  								Can load and performance test HTTP and FTP servers as well as
  		arbitrary database queries (via JDBC)
  						</li>
  									
  	
  												<li	>
  								Complete portability and 
  												<b	>
  								100% Java purity
  						</b>
  									.
  						</li>
  									
  	
  												<li	>
  								Full 
  												<b	>
  								Swing
  						</b>
  									 and lightweight component support (precompiled JAR uses packages
  		
  												<code	>
  								javax.swing.*
  						</code>
  									).
  						</li>
  									
  	
  												<li	>
  								Full 
  												<b	>
  								multithreading
  						</b>
  									 framework allows concurrent sampling by many threads and
  		simultaneous sampling of different functions by seperate thread groups.
  						</li>
  									
  	
  												<li	>
  								Careful 
  												<b	>
  								GUI
  						</b>
  									 design allows faster operation and more precise timings.
  						</li>
  									
  	
  												<li	>
  								Caching and offline analysis/replaying of test results.
  						</li>
  									
  	
  												<li	>
  								 Highly Extensible:
  	  
  												<ul	>
  								
  		
  												<li	>
  								Pluggable Samplers allow unlimited testing capabilities.
  						</li>
  									
  		
  												<li	>
  								Several load statistics may be choosen with 
  												<b	>
  								pluggable timers
  						</b>
  									.
  						</li>
  									
  		
  												<li	>
  								Data analysis and 
  												<b	>
  								visualization plugins
  						</b>
  									 allow great extendibility
  		as well as personalization.
  						</li>
  									
  	  
  						</ul>
  									
  	
  						</li>
  									
  
  						</ul>
  							  		  </blockquote>
  		  </p>
  		</td></tr>
  		<tr><td><br/></td></tr>
  	 </table>
  						  						  </td>
  					 </tr>
  
  					 <!-- FOOTER -->
  					 <tr><td colspan="2">
  						  <hr noshade="" size="1"/>
  					 </td></tr>
  					 <tr><td colspan="2">
  						  <div align="center"><font color="#525D76" size="-1"><em>
  						  Copyright &#169; 1999-2001, Apache Software Foundation
  						  </em></font></div>
  					 </td></tr>
  				</table>
  		  </body>
  	 </html>
  <!-- end the processing -->
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org