This class provides a way to provide Authorization in jmeter requests. The
format of the authorization file is: URL user pass where URL is an HTTP URL,
user a username to use and pass the appropriate password.
COL_DOMAIN
public static final int COL_DOMAIN
COL_PASSWORD
public static final int COL_PASSWORD
COL_REALM
public static final int COL_REALM
COL_URL
public static final int COL_URL
COL_USERNAME
public static final int COL_USERNAME
addAuth
public void addAuth()
addConfigElement
public void addConfigElement(ConfigElement config)
Add a configuration element to this one. This allows config elements to
combine and give a "layered" effect. For example,
HTTPConfigElements have properties for domain, path, method, and
parameters. If element A has everything filled in, but null for domain,
and element B is added, which has only domain filled in, then after
adding B to A, A will have the domain from B. If A already had a domain,
then the correct behavior is for A to ignore the addition of element B.
- addConfigElement in interface ConfigElement
- addConfigElement in interface ConfigTestElement
config
- the element to be added to this ConfigElement
addFile
public void addFile(String authFile)
throws IOException
Add authentication data from a file.
expectsModification
public boolean expectsModification()
If your config element expects to be modified in the process of a test
run, and you want those modifications to carry over from sample to sample
(as in a cookie manager - you want to save all cookies that get set
throughout the test), then return true for this method. Your config
element will not be cloned for each sample. If your config elements are
more static in nature, return false. If in doubt, return false.
- expectsModification in interface ConfigElement
- expectsModification in interface ConfigTestElement
- true if the element expects to be modified over the course of a
test run
getAddList
public Collection getAddList()
getAuthCount
public int getAuthCount()
Return the number of records.
getAuthHeaderForURL
public String getAuthHeaderForURL(URL url)
getColumnClass
public Class getColumnClass(int column)
getColumnCount
public int getColumnCount()
getColumnName
public String getColumnName(int column)
getGuiClass
public Class getGuiClass()
isEditable
public boolean isEditable()
remove
public void remove(int index)
Remove an authentication record.
save
public void save(String authFile)
throws IOException
Save the authentication data to a file.
set
public void set(int index,
String url,
String user,
String pass,
String domain,
String realm)
Update an authentication record.
uncompile
public void uncompile()