Copy Files Step
The Copy Files step copies files and directories on the file system during test execution. The step is not supported inside a Load Test context. Use it for test setup, artifact management, or preparing file-based request payloads.
When to Use
- Copying fixture files into a working directory before a test
- Archiving test outputs, logs, or screenshots
- Deploying configuration files before integration tests
- Preparing file uploads for
multipart/form-datarequests
Quickest Scenario
- Add a Copy Files step from the step palette.
- Set Source Path to the folder (or files) to copy.
- Set Target Path to the destination folder.
- Run the test — the copied file count is reported in the Information panel.
Configuration
The step editor exposes the following fields (from CopyFilesPanel.axaml):
| Field | Type | Default | Description |
|---|---|---|---|
| Source Path | text | (empty) | Source folder. Empty = project location; a relative path is resolved against the project location; otherwise an absolute path. |
| Target Path | text | (empty) | Destination folder. Same resolution rules as Source Path. |
| Search filter | text | *.* | Filter selecting which files to copy (e.g. *.json, report*.xml). |
| Recursive copy | toggle | true | When On, labeled "Files in folder only" — actually copies sub-folders and files in sub-folders recursively. When Off, labeled "Files in folder and sub-folders.". |
| Clean target folder | toggle | true | When On, "Clean target folder before copy." — deletes all content from the target folder before copying. |
| Overwrite existing files | toggle | false | When On, overwrites files already present in the target folder. |
The Recursive copy toggle labels are inverted by design: the control's "On" state corresponds to the non-recursive wording in the UI. The effective behavior follows the Recursive property — true (default) copies sub-folders.
Examples
Copy a Single File
Source Path: .\fixtures\test-data.json
Target Path: .\working\input.json
Overwrite existing files: On
Copy All Files Matching a Pattern
Source Path: .\output\${TestRunId}\*.xml
Target Path: .\archive\${TestRunId}\
Search filter: *.xml
Prepare an Upload Payload
Source Path: .\fixtures\avatar-${UserId}.png
Target Path: .\uploads\avatar.png
Reference .\uploads\avatar.png in a Send Request step with multipart/form-data content type to upload the prepared file.
Why
Copy Files keeps test data and artifacts deterministic: fixtures are staged predictably before a test runs, and results are archived in a known location, which makes local and CI test runs reproducible.