mirror of https://github.com/apache/jmeter.git
HTTPSamplers can now use variables in POSTed file names
git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@697636 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 3b0061c511
This commit is contained in:
parent
e464f741a4
commit
25707e1d1a
|
|
@ -271,10 +271,6 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
|||
*/
|
||||
public String getFileField() {
|
||||
checkCount("getFileField");
|
||||
return getFileFieldProperty();
|
||||
}
|
||||
|
||||
private String getFileFieldProperty() {
|
||||
return getPropertyAsString(FILE_FIELD);
|
||||
}
|
||||
|
||||
|
|
@ -300,10 +296,6 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
|||
*/
|
||||
public String getFilename() {
|
||||
checkCount("getFilename");
|
||||
return getFilenameProperty();
|
||||
}
|
||||
|
||||
private String getFilenameProperty() {
|
||||
return getPropertyAsString(FILE_NAME);
|
||||
}
|
||||
|
||||
|
|
@ -329,10 +321,6 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
|||
*/
|
||||
public String getMimetype() {
|
||||
checkCount("getMimetype");
|
||||
return getMimetypeProperty();
|
||||
}
|
||||
|
||||
private String getMimetypeProperty() {
|
||||
return getPropertyAsString(MIMETYPE);
|
||||
}
|
||||
|
||||
|
|
@ -1460,9 +1448,10 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
|||
}
|
||||
HTTPFileArg[] outFiles;
|
||||
// Check for original data names
|
||||
String fileName = getFilenameProperty();
|
||||
String paramName = getFileFieldProperty();
|
||||
String mimeType = getMimetypeProperty();
|
||||
// Use properties so variables and functions are not resolved too early
|
||||
JMeterProperty fileName = getProperty(FILE_NAME);
|
||||
JMeterProperty paramName = getProperty(FILE_FIELD);
|
||||
JMeterProperty mimeType = getProperty(MIMETYPE);
|
||||
HTTPFileArg file = new HTTPFileArg(fileName, paramName, mimeType);
|
||||
if(file.isNotEmpty()) {
|
||||
// Now deal with any additional file arguments
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ Moved the Scoping Rules sub-section from Section 3. "Building a Test Plan" to S
|
|||
"Save Results to a file" and "Generate Summary Results" are now shown as Listeners.
|
||||
"Counter" is now shown as a Configuration element.
|
||||
</li>
|
||||
<li>HTTPSamplers can now use variables in POSTed file names</li>
|
||||
</ul>
|
||||
|
||||
<h3>Improvements</h3>
|
||||
|
|
|
|||
Loading…
Reference in New Issue