Skip to content

Development::QA::Artillery Tests and Scenario Management

Lincon Vidal edited this page Mar 18, 2025 · 1 revision

Installation

To install Artillery globally:

npm install -g artillery

Running Artillery Tests

You can run scenarios individually or collectively using the methods below.

Run Entire Test File

To execute all scenarios defined within a test YAML file:

artillery run artilleryTests/preprod/preprod-rosetta-stability-test.yml

Run and Record Test Results

To record results on Artillery Cloud (with your specific key):

artillery run artilleryTests/preprod/preprod-rosetta-stability-test.yml \
  --record \
  --key YOUR_API_KEY

Replace YOUR_API_KEY with your actual Artillery key.


Running Individual Scenarios

Use the --scenario-name flag to specify one scenario per run:

artillery run \
  --scenario-name "Network status test" \
  artilleryTests/preprod/preprod-rosetta-stability-test.yml

You can only specify one scenario per run. To run multiple scenarios individually, execute separate commands.

Example individual scenarios:

artillery run \
  --scenario-name "Account balance test" \
  artilleryTests/mainnet/mainnet-rosetta-stability-test.yml \
  --name "Account balance" \
  --tags "env:mainnet,version:1.2.4,repo:cardano-rosetta-java" \
  --record \
  --key YOUR_API_KEY

artillery run \
  --scenario-name "Block transaction test" \
  artilleryTests/mainnet/mainnet-rosetta-stability-test.yml \
  --name "Block transaction" \
  --tags "env:mainnet,version:1.2.4,repo:cardano-rosetta-java" \
  --record \
  --key YOUR_API_KEY

artillery run \
  --scenario-name "Search transactions test" \
  artilleryTests/mainnet/mainnet-rosetta-stability-test.yml \
  --name "Search transactions" \
  --tags "env:mainnet,version:1.2.4,repo:cardano-rosetta-java" \
  --record \
  --key YOUR_API_KEY
Clone this wiki locally