This test element can be placed anywhere in the test plan. For each sample in its scope, it will create a file of the response Data. The primary use for this is in creating functional tests, but it can also be useful where the response is too large to be displayed in the View Results Tree Listener. The file name is created from the specified prefix, plus a number (unless this is disabled, see below). The file extension is created from the document type, if known. If not known, the file extension is set to 'unknown'. If numbering is disabled, and adding a suffix is disabled, then the file prefix is taken as the entire file name. This allows a fixed file name to be generated if required. The generated file name is stored in the sample response, and can be saved in the test log output file if required. The current sample is saved first, followed by any sub-samples (child samples). If a variable name is provided, then the names of the files are saved in the order that the sub-samples appear. See below. Control Panel Parameters Attribute | Description | Required |
---|
Name | Descriptive name for this element that is shown in the tree. | No | Filename Prefix | Prefix for the generated file names; this can include a directory name. Relative paths are resolved relative to the current working directory (which defaults to the bin/ directory). Versions of JMeter after 2.4 also support paths relative to the directory containing the current test plan (JMX file). If the path name begins with "~/" (or whatever is in the jmeter.save.saveservice.base_prefix JMeter property), then the path is assumed to be relative to the JMX file location. | Yes | Variable Name | Name of a variable in which to save the generated file name (so it can be used later in the test plan). If there are sub-samples then a numeric suffix is added to the variable name. E.g. if the variable name is FILENAME, then the parent sample file name is saved in the variable FILENAME, and the filenames for the child samplers are saved in FILENAME1, FILENAME2 etc. | No | Save Failed Responses only | If selected, then only failed responses are saved | Yes | Save Successful Responses only | If selected, then only successful responses are saved | Yes | Don't add number to prefix | If selected, then no number is added to the prefix. If you select this option, make sure that the prefix is unique or the file may be overwritten. | Yes | Don't add suffix | If selected, then no suffix is added. If you select this option, make sure that the prefix is unique or the file may be overwritten. | Yes |
|