Numerous Panicky Mimes

    @loadmill/agent
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.62 • Public • Published

    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.

    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

    Keywords

    none

    Install

    npm i @loadmill/agent

    DownloadsWeekly Downloads

    144

    Version

    0.1.62

    License

    Apache-2.0

    Unpacked Size

    117 kB

    Total Files

    59

    Last publish

    Collaborators

    • yigall
    • ggur