| org.apache.jmeter.protocol.http.util.accesslog.Generator
All known Subclasses: org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator,
Generator | public interface Generator (Code) | | Description:
Generator is a base interface that defines the minimum methods needed to
implement a concrete generator. The reason for creating this interface is
eventually JMeter could use the logs directly rather than pre- process the
logs into a JMeter .jmx file. In situations where a test plan simulates load
from production logs, it is more efficient for JMeter to use the logs
directly.
From first hand experience, loading a test plan with 10K or more Requests
requires a lot of memory. It's important to keep in mind this type of testing
is closer to functional and regression testing than the typical stress tests.
Typically, this kind of testing is most useful for search sites that get a
large number of requests per day, but the request parameters vary
dramatically. E-commerce sites typically have limited inventory, therefore it
is better to design test plans that use data from the database.
author: Peter Lin version: $Revision: 493789 $ last updated on $Date: 2007-01-07 18:10:21 +0000 (Sun, 07 Jan 2007) $ version: Created on: Jun 23, 2003
|
Method Summary | |
public void | close() | public Object | generateRequest() The method is responsible for calling the necessary methods to generate a
valid request. | public void | reset() The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler. | public void | save() If the generator is converting the logs to a .jmx file, save should be
called. | public void | setHost(String host) The host is the name of the server. | public void | setLabel(String label) This is the label for the request, which is used in the logs and results. | public void | setMethod(String post_get) The method is the HTTP request method. | public void | setParams(NVPair[] params) | public void | setPath(String path) The path is the web page you want to test. | public void | setPort(int port) The default port for HTTP is 80, but not all servers run on that port. | public void | setQueryString(String querystring) Set the querystring for the request if the method is GET. | public void | setSourceLogs(String sourcefile) The source logs is the location where the access log resides. | public void | setTarget(Object target) The target can be either a java.io.File or a Sampler. |
close | public void close()(Code) | | close the generator
|
generateRequest | public Object generateRequest()(Code) | | The method is responsible for calling the necessary methods to generate a
valid request. If the generator is used to pre-process access logs, the
method wouldn't return anything. If the generator is used by a control
element, it should return the correct Sampler class with the required
fields set.
|
reset | public void reset()(Code) | | The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler.
|
save | public void save()(Code) | | If the generator is converting the logs to a .jmx file, save should be
called.
|
setHost | public void setHost(String host)(Code) | | The host is the name of the server.
Parameters: host - |
setLabel | public void setLabel(String label)(Code) | | This is the label for the request, which is used in the logs and results.
Parameters: label - |
setMethod | public void setMethod(String post_get)(Code) | | The method is the HTTP request method. It's normally POST or GET.
Parameters: post_get - |
setParams | public void setParams(NVPair[] params)(Code) | | Set the request parameters
Parameters: params - |
setPath | public void setPath(String path)(Code) | | The path is the web page you want to test.
Parameters: path - |
setPort | public void setPort(int port)(Code) | | The default port for HTTP is 80, but not all servers run on that port.
Parameters: port - -port number |
setQueryString | public void setQueryString(String querystring)(Code) | | Set the querystring for the request if the method is GET.
Parameters: querystring - |
setSourceLogs | public void setSourceLogs(String sourcefile)(Code) | | The source logs is the location where the access log resides.
Parameters: sourcefile - |
setTarget | public void setTarget(Object target)(Code) | | The target can be either a java.io.File or a Sampler. We make it generic,
so that later on we can use these classes directly from a HTTPSampler.
Parameters: target - |
|
|