open-index/open-npm huggingface dataset:
npm package: @loadmill/agent
Description: Loadmill agent library
Latest version: 0.1.205

# Loadmill Agent
Users of [Loadmill](https://www.loadmill.com) 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](https://docs.loadmill.com/integrations/api-tokens).

## 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](#Setup).
* `--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
- About [Loadmill](https://www.loadmill.com)
npm package: @loadmill/mcp
Description: Loadmill mcp library
Latest version: 0.2.4

# Loadmill MCP Server

The Loadmill MCP server exposes Loadmill’s test-management APIs to any Model Context Protocol (MCP) client. Use it to search, run, write and validate Loadmill tests without leaving your MCP-enabled IDE or agent workflow.

## Use Cases
 - Query Loadmill for information
 - Execute Loadmill tests
 - Write and maintain Loadmill tests

*Note*: When working with MCPs, make sure your client runs in `Agent` mode.

## IDE Integration

### VS Code

*Important*: You will have to generate a Loadmill API token from your [Loadmill account settings](https://app.loadmill.com/app/user/settings/security) to authenticate the MCP server.
```
{
  "servers": {
    "loadmill": {
      "type": "stdio",
      "command": "npx",
      "args": ["@loadmill/mcp"],
      "env": {
        "LOADMILL_API_TOKEN": "${input:loadmill-api-token}"
      }
    }
  },
  "inputs": [
    {
      "id": "loadmill-api-token",
      "type": "promptString",
      "description": "Loadmill API token",
      "password": true
    }
  ]
}
```

### Cursor

```
{
  "mcpServers": {
    "loadmill": {
      "command": "npx",
      "args": ["@loadmill/mcp"],
      "env": {
        "LOADMILL_API_TOKEN": "${env:LOADMILL_API_TOKEN}"
      }
    }
  }
}
```


## MCP Capabilities

**Tools** – Supports `list_tools` and `call_tool`; each tool returns standard MCP text content:
- `search_test_suites` – Filter Loadmill test suites by text, dates, or labels.
- `search_test_suite_runs` – Search historical test-suite flow runs.
- `run_test_suite` – Trigger a test-suite execution by ID.
- `get_test_suite_run` – Retrieve run details (including flow run IDs).
- `get_test_suite_flow_run` – Inspect an individual flow run by ID.
- `search_test_plans` – Browse Loadmill test plans.
- `run_test_plans` – Start a plan with optional labels and parameter overrides.
- `get_test_plan_run` – Fetch plan-run status and metadata.
- `get_labels` – List team labels (id and description).
- `validate_test_suite` – Validate a local Loadmill test-suite JSON file against the official schema.
- `create_new_test_suite` – Create a new, empty Loadmill test suite and return its ID.

**Prompts** – Supports `list_prompts` and `get_prompt`:
- `investigate_failed_test` – Summarise a failed run and advise next steps.

**Resources** – Supports `list_resources` and `read_resource`:
- `loadmill://schemas/test-suite@v1` – JSON Schema (draft 2020-12) for Loadmill test suites. Responses are cached locally for an hour.

## Working with the Test-Suite Schema
- Use `validate_test_suite` to catch schema violations in local JSON files before uploading them to Loadmill.

Once connected, your MCP client can mix these tools, prompts, and resources to automate Loadmill QA workflows end-to-end.
npm package: @loadmill/node-recorder
Description: Loadmill expressjs recorder middleware
Latest version: 0.3.206

# Loadmill node-recorder
Users of [Loadmill](https://www.loadmill.com) can use `node-recorder` middleware to capture traffic in their express.js apps. Later they can generate and replay the recording as API tests.

##  Setup Walkthrough
Go to [Recordings App Setup](https://app.loadmill.com/app/recordings/setup) and create a new application.<br/>
Copy `Loadmill Tracking Id` and use it as `loadmillCode` option value in `expressRecorder`.



## Installation
Using npm:

`npm i @loadmill/node-recorder --save`

Using yarn:

`yarn add @loadmill/node-recorder`


## API
Use expressRecorder middleware:

```
const { expressRecorder } = require('@loadmill/node-recorder');
const app = require('express')();
app.use(expressRecorder({ loadmillCode: process.env.LOADMILL_CODE }));
```


expressRecorder accepts `options` object - containing:
* `loadmillCode` - (REQUIRED). can be retrieved after creating a new application for [recording](https://app.loadmill.com/app/recordings/setup).
* `notSecure` - (default = false). Optionally you can make recorded traffic not be hashed. 
* `cookieExpiration` - (default  = 3 minutes = 3 * 60 * 1000). expressRecorder maintain cookie to define new recording session per uniqueId(user). More about [split recording session](https://docs.loadmill.com/working-with-the-recorder/recorder-settings).
* `basePath` - (default = https://dummy.domain). Define the `protocol://host` of your app.


### Extended Example
```
app.use(expressRecorder({ 
   loadmillCode: process.env.LOADMILL_CODE,
   notSecure: false, 
   cookieExpiration: 10 * 60 * 1000,
   basePath: 'https://loadmill.com'
}));
```

### How do I debug?
Loadmill node-recorder uses the [debug](https://www.npmjs.com/package/debug) module internally, so you can set the DEBUG environment variable to loadmill:* to see all debugging, or select individual namespaces DEBUG=loadmill:node-recorder to constrain a bit.


## Learn More
- About [Loadmill](https://www.loadmill.com)
- About [Recordings](https://docs.loadmill.com/working-with-the-recorder)