1.0.0 • Published 8 years ago
artillery-engine-tcp v1.0.0
Artillery.io TCP Plugin
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-tcpUse the plugin
- Set
config.targetto the host address of the TCP server - Specify additional options in
config.tcp:port- number (required)
- Set the
engineproperty of the scenario totcp. - Use
sendin your scenario to send arbitrary data to the server - Specify additional invocation parameters:
payload- String or object (gets converted to JSON string) with the payload to sendencoding- Payload string encoding. Defaults toutf8. 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: 1Run Your Script
artillery run my_script.ymlLicense
1.0.0
8 years ago