Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loadmill/agent

Package Overview
Dependencies
Maintainers
0
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loadmill/agent

Loadmill agent library

  • 0.1.140
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
decreased by-9.41%
Maintainers
0
Weekly downloads
 
Created
Source

Loadmill Agent

Users of Loadmill can use @loadmill/agent to run API and Load tests locally or on their servers.

Setup

In order to use the Loadmill Agent you will need to generate an API Token.

Installation

Using npm:

npm i @loadmill/agent -g

Using yarn:

yarn add @loadmill/agent -g

API

CLI

Start an agent:

loadmill-agent start -t INSERT_TOKEN_HERE

The start command accepts the following options:

  • --token - (REQUIRED). can be retrieved through the UI, see above.
  • --loads-capacity - (default = 50). Optionally you can supply the number of users this agent can simulate. can be 0 in order to not run load tests.
  • --no-api - Can be supplied in order to prevent the agent from running API tests.
  • --pool - Can be supplied in order to set the agent pool.
  • --team-agent - Allow other members of your team to run tests on this agent.
  • --config - Alternatively, you can supply a path to a yaml file that will contain all the options above.
Parameters

You may set loadmill parameter values that will override any value in any run for the desired parameters.

You can set these parameters via command line arguments by passing name=value pairs:

loadmill-agent start -t INSERT_TOKEN_HERE host=test.myapp.com port=4443

Sensitive Data

When testing with sensitive dynamic data supply LOADMILL_AGENT_SENSITIVE_DATA=true environment variable. By doing so Loadmill will redact:

  • Request body
  • Response body
  • Parameters values
Extended Example

loadmill-agent start -t INSERT_TOKEN_HERE --no-api --loads-capacity 80

loadmill-agent start -t INSERT_TOKEN_HERE --pool myPoolId

loadmill-agent start --config /path/to/config.yml

Working with insecure certificates

In case you are testing a system that uses https but has a self-signed or invalid SSL certificate, you need to set env var - NODE_TLS_REJECT_UNAUTHORIZED=0 at the beginning of the start command to run your tests via the Loadmill Agent. It should look like this: NODE_TLS_REJECT_UNAUTHORIZED=0 loadmill-agent start -t INSERT_TOKEN_HERE IMPORTANT: The Loadmill agent won’t be able to verify that it is talking to the right website in this case.

Programmatically

Start the agent:

const {start} = require('@loadmill/agent');
const stop = start({
  token: 'INSERT_TOKEN_HERE',
  // loadsCapacity: 80,
  // api: false
});

// Stop the agent at a later time

Learn More

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc