public interface Generator
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.
Modifier and Type | Method and Description |
---|---|
void |
close()
close the generator
|
Object |
generateRequest()
The method is responsible for calling the necessary methods to generate a
valid request.
|
void |
reset()
The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler.
|
void |
save()
If the generator is converting the logs to a .jmx file, save should be
called.
|
void |
setHost(String host)
The host is the name of the server.
|
void |
setLabel(String label)
This is the label for the request, which is used in the logs and results.
|
void |
setMethod(String post_get)
The method is the HTTP request method.
|
void |
setParams(NVPair[] params)
Set the request parameters
|
void |
setPath(String path)
The path is the web page you want to test.
|
void |
setPort(int port)
The default port for HTTP is 80, but not all servers run on that port.
|
void |
setQueryString(String querystring)
Set the querystring for the request if the method is GET.
|
void |
setSourceLogs(String sourcefile)
The source logs is the location where the access log resides.
|
void |
setTarget(Object target)
The target can be either a java.io.File or a Sampler.
|
void close()
void setHost(String host)
host
- void setLabel(String label)
label
- void setMethod(String post_get)
post_get
- void setParams(NVPair[] params)
params
- void setPath(String path)
path
- void setPort(int port)
port
- -
port numbervoid setQueryString(String querystring)
querystring
- void setSourceLogs(String sourcefile)
sourcefile
- void setTarget(Object target)
target
- Object generateRequest()
void save()
void reset()
Copyright © 1998-2016 Apache Software Foundation. All Rights Reserved.