Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artillery.io TCP Plugin

Load test TCP with Artillery.io

Based on the AWS Lambda Engine by orchestrated.io.

Usage

Important: The plugin requires Artillery 1.5.8-3 or higher.

Install the plugin

# If Artillery is installed globally:
npm install -g artillery-engine-tcp

Use the plugin

  1. Set config.target to the host address of the TCP server
  2. Specify additional options in config.tcp:
    • port - number (required)
  3. Set the engine property of the scenario to tcp.
  4. Use send in your scenario to send arbitrary data to the server
  5. Specify additional invocation parameters:
    • payload - String or object (gets converted to JSON string) with the payload to send
    • encoding - Payload string encoding. Defaults to utf8. See Buffer.from(string).

Note: The TCP server must respond (with anything) to each send command in order for the request to finish.

Example Script

config:
  target: "localhost"
  tcp:
    port: 1234
  phases:
    - arrivalCount: 10
      duration: 1
  engines:
    tcp: {}

scenarios:
  - name: "Send data"
    engine: tcp
    flow:
      - count: 10
        loop:
        - send:
            payload: "hello world"
        - think: 1
        - send:
            payload: "1111111111"
            encoding: "hex"
        - think: 1

Run Your Script

artillery run my_script.yml

License

MPL 2.0

About

Artillery.io TCP Plugin

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages