Skip to main content

⚡ Performance Testing

Run load tests against a single request, folder, collection, or exported collection directly from the Fetch Client CLI.

Performance testing simulates multiple concurrent virtual users (VUs) sending requests to your APIs, allowing you to measure response times, throughput, and failure rates under load. Reports can also be exported for later analysis.

💻 Syntax

fc-cli perf [options]

⚙️ Options

OptionDescription
--reqLoad test a request by name or ID
--folLoad test a folder by name or ID
--colLoad test a collection by name or ID
--fileLoad test an exported collection
--varOverride the Variable Set by name or ID
--var-fileOverride variables for an exported collection
--load-modelLoad model (fixed, duration, rampup, combined)
--vusNumber of virtual users
--iterationsNumber of iterations (Fixed model only)
--durationTest duration in seconds
--rampup-durationRamp-up duration in seconds
--rampup-stepsNumber of ramp-up steps
--think-timeDelay between request waves
--exportExport the performance report
--export-pathDirectory where reports are saved

🎯 Supported Scopes

Performance tests can be executed against:

  • A single request
  • A folder
  • A collection
  • An exported collection (--file)

🚀 Basic usage

ActionCommand
Test a requestfc-cli perf --req "Login"
Test a request by IDfc-cli perf --req <request-id>
Test a folderfc-cli perf --fol "Authentication"
Test a folder by IDfc-cli perf --fol <folder-id>
Test a collectionfc-cli perf --col "User APIs"
Test a collection by IDfc-cli perf --col <collection-id>
Test an exported collectionfc-cli perf --file collection.json
Test a folder from an exported collectionfc-cli perf --file collection.json --fol "Authentication"
Test a request from an exported collectionfc-cli perf --file collection.json --req "Login"
Override the Variable Setfc-cli perf --col "User APIs" --var "Production"
Override variables for an exported collectionfc-cli perf --file collection.json --var-file variables.json
Export a reportfc-cli perf --col "User APIs" --export html
fc-cli perf

📦 Run an Exported Collection

Fetch Client CLI can execute an exported collection JSON file directly.

This mode does not require the Fetch Client database or the VS Code extension.

Database-free execution

Running an exported collection is completely self-contained.

  • ✅ No Fetch Client database required
  • ✅ No VS Code extension required
  • ✅ Perfect for CI/CD pipelines
  • ✅ Easy to share with teammates
  • ✅ Great for running APIs on build agents or remote machines

🔧 Using variable sets

When running against the Fetch Client database, you can override the variable set.

fc-cli perf --col "User APIs" --var "Production"

If the collection is already linked to a variable set, the linked variable set takes precedence.

When running from an exported collection, use a variable file instead.

fc-cli perf --file collection.json --var-file variables.json

⚙️ Performance options

OptionDescriptionDefault
--load-modelfixed, duration, rampup, combinedfixed
--vusNumber of virtual users5
--iterationsIterations per virtual user (Fixed only)10
--durationTest duration in seconds30
--rampup-durationRamp-up duration in seconds20
--rampup-stepsNumber of ramp steps5
--think-timeDelay between waves (milliseconds)0

📈 Load models

Fetch Client CLI supports four load models.

Fixed

Runs a constant number of virtual users for a fixed number of iterations.

fc-cli perf \
--req Login \
--load-model fixed \
--vus 10 \
--iterations 50

Options

OptionDescription
--vusNumber of concurrent virtual users
--iterationsNumber of iterations performed by each virtual user

Use this model when you need repeatable benchmark tests.


Duration

Maintains a constant number of virtual users until the configured duration expires.

fc-cli perf \
--col "User APIs" \
--load-model duration \
--vus 20 \
--duration 120

Options

OptionDescription
--vusNumber of concurrent virtual users
--durationTest duration in seconds

Use this model for soak or endurance testing.


Ramp-up

Gradually increases the number of virtual users until the target concurrency is reached.

fc-cli perf \
--col "User APIs" \
--load-model rampup \
--vus 50 \
--rampup-duration 120 \
--rampup-steps 10

Options

OptionDescription
--vusTarget virtual users
--rampup-durationTotal ramp-up duration in seconds
--rampup-stepsNumber of increments during ramp-up

Use this model to identify the load level at which performance begins to degrade.


Combined

Gradually ramps up to the target concurrency and then maintains that load for a specified duration.

fc-cli perf \
--col "User APIs" \
--load-model combined \
--vus 50 \
--rampup-duration 60 \
--duration 300

Options

OptionDescription
--vusTarget virtual users
--rampup-durationRamp-up duration
--rampup-stepsNumber of ramp steps
--durationTime to maintain peak load

This model most closely resembles real production traffic patterns.

📋 Configuration summary

Before each performance test begins, the CLI prints a summary of the resolved configuration.

The summary includes:

  • Test scope
  • Load model
  • Virtual users
  • Iterations or duration
  • Think time
  • Values supplied by the user
  • Default values used automatically
  • Warnings for invalid, ignored, or out-of-range options

This helps verify the test configuration before requests are executed.

📤 Exporting reports

Performance reports can be exported after the test completes or is cancelled.

Export JSON

fc-cli perf \
--col "User APIs" \
--export json

Export HTML

fc-cli perf \
--col "User APIs" \
--export html

Export to a custom directory

fc-cli perf \
--col "User APIs" \
--export html \
--export-path ./reports

Supported export formats

FormatDescription
JSONComplete performance test results
CSVSpreadsheet-friendly summary
HTMLInteractive report for sharing
XMLStructured report for integrations

🛑 Gracefully stopping a test

Press Ctrl+C while a test is running.

  • First Ctrl+C

    • Stops scheduling new waves.
    • Waits for the current wave to finish.
    • Prints the final summary.
    • Generates export reports if requested.
  • Second Ctrl+C

    • Immediately terminates the process.

🚧 Limits

SettingMaximum
Virtual Users50
Iterations1000
Test Duration3600 seconds
Ramp-up Duration3600 seconds
Think Time300000 ms

💡 Examples

Fixed benchmark

fc-cli perf \
--req Login \
--load-model fixed \
--vus 10 \
--iterations 100

Stress test an entire collection

fc-cli perf \
--col "User APIs" \
--load-model rampup \
--vus 50 \
--rampup-duration 120 \
--rampup-steps 10

Soak test

fc-cli perf \
--col "User APIs" \
--load-model duration \
--vus 25 \
--duration 600

Production-style load

fc-cli perf \
--col "User APIs" \
--load-model combined \
--vus 50 \
--rampup-duration 60 \
--duration 300

Export the report

fc-cli perf \
--col "User APIs" \
--load-model fixed \
--vus 20 \
--iterations 50 \
--export html \
--export-path ./reports

📝 Notes

  • Performance tests can be executed directly against the Fetch Client database or an exported collection.
  • Variable overrides are supported when running against the database.
  • Exported collections use --var-file instead of --var.
  • Reports can be exported in JSON, CSV, HTML, and XML formats.
  • Invalid or unsupported command-line options are validated before the test begins.
  • Graceful cancellation preserves all completed results before exiting.