Skip to content

A k6 extension for sending data to TCP port

License

Notifications You must be signed in to change notification settings

pfunk1978/xk6-tcp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xk6-tcp

A k6 extension for sending strings to TCP port

Build

To build a k6 binary with this plugin, first ensure you have the prerequisites:

Then:

  1. Install xk6:
go install github.com/k6io/xk6/cmd/xk6@latest
  1. Build the binary:
xk6 build master \
  --with github.com/NAlexandrov/xk6-tcp

Example

import tcp from 'k6/x/tcp';

const conn = tcp.connect('host:port')

export default function () {
  tcp.write(conn, 'some data\n'); // or tcp.writeLn(conn, 'some data')
}

About

A k6 extension for sending data to TCP port

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%