Socket
Socket
Sign inDemoInstall

artillery-engine-tcp

Package Overview
Dependencies
310
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    artillery-engine-tcp

Load test TCP with Artillery.io


Version published
Weekly downloads
171
decreased by-12.31%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 04 Mar 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc