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() {
|
public String getFileField() {
|
||||||
checkCount("getFileField");
|
checkCount("getFileField");
|
||||||
return getFileFieldProperty();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getFileFieldProperty() {
|
|
||||||
return getPropertyAsString(FILE_FIELD);
|
return getPropertyAsString(FILE_FIELD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -300,10 +296,6 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
||||||
*/
|
*/
|
||||||
public String getFilename() {
|
public String getFilename() {
|
||||||
checkCount("getFilename");
|
checkCount("getFilename");
|
||||||
return getFilenameProperty();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getFilenameProperty() {
|
|
||||||
return getPropertyAsString(FILE_NAME);
|
return getPropertyAsString(FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -329,10 +321,6 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
||||||
*/
|
*/
|
||||||
public String getMimetype() {
|
public String getMimetype() {
|
||||||
checkCount("getMimetype");
|
checkCount("getMimetype");
|
||||||
return getMimetypeProperty();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getMimetypeProperty() {
|
|
||||||
return getPropertyAsString(MIMETYPE);
|
return getPropertyAsString(MIMETYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1460,9 +1448,10 @@ public abstract class HTTPSamplerBase extends AbstractSampler
|
||||||
}
|
}
|
||||||
HTTPFileArg[] outFiles;
|
HTTPFileArg[] outFiles;
|
||||||
// Check for original data names
|
// Check for original data names
|
||||||
String fileName = getFilenameProperty();
|
// Use properties so variables and functions are not resolved too early
|
||||||
String paramName = getFileFieldProperty();
|
JMeterProperty fileName = getProperty(FILE_NAME);
|
||||||
String mimeType = getMimetypeProperty();
|
JMeterProperty paramName = getProperty(FILE_FIELD);
|
||||||
|
JMeterProperty mimeType = getProperty(MIMETYPE);
|
||||||
HTTPFileArg file = new HTTPFileArg(fileName, paramName, mimeType);
|
HTTPFileArg file = new HTTPFileArg(fileName, paramName, mimeType);
|
||||||
if(file.isNotEmpty()) {
|
if(file.isNotEmpty()) {
|
||||||
// Now deal with any additional file arguments
|
// 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.
|
"Save Results to a file" and "Generate Summary Results" are now shown as Listeners.
|
||||||
"Counter" is now shown as a Configuration element.
|
"Counter" is now shown as a Configuration element.
|
||||||
</li>
|
</li>
|
||||||
|
<li>HTTPSamplers can now use variables in POSTed file names</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Improvements</h3>
|
<h3>Improvements</h3>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue