Stubbing settings for the File transport
If you are using a File transport stub to consume from one or more files in a directory, you might want to change the default stubbing settings for the File transport.
By using the Stub tab, on the corresponding operation, you can specify the stubbing settings as follows:
- Click Browse in the Binding panel for the Transport option, and perform the following steps:
- Locate and select the transport you created as the File transport in the Select a Resource dialog.
- Select from the following options for the action you want:
Option Action No If you select No, you can select any transport in the project. Yes If you select Yes, you can select only transports that are referenced (directly or indirectly) by the operation that contains the test. Only Direct If you select Only Direct, you can select only transports that are referenced directly by the operation that contains the test. - Click OK.
- Click the Browse option to select the required text file with any associated tags and complete the File Name Pattern Override field.Note: If the override is a simple file name, it is resolved relative to the directory from the transport. If the override contains a directory (or directories), it overrides the entire path, including the directory from the transport.
- Change the default value in the Polling Interval field, if you want. Polling Interval is the interval, in seconds, that the file system is queried. The default value is 10.
- Select the Ignore Existing Files option, if you want. If Ignore Existing Files is selected, files that exist when the first poll occurs are ignored.
- Select the Delete files after successful processing option, if you want. If Delete files after successful processing is selected, files whose content is matched and validated successfully are deleted once processing of the file completes. Where multiple messages are consumed from a file, all messages must be successfully validated for deletion to occur. When consuming a file within a test, if the test fails, deletion does not occur.
Note: The Default Timeout section contains common settings for stub replies. They do not apply to the file transport and are ignored.