Skip to content

Dhruvit96/xk6-tls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xk6-tls

A k6 extension for sending data to tcp tls port

Build

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

Then:

  1. Install xk6:
go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
xk6 build master \
  --with github.com/dhruvit96/xk6-tls

Example

import tls from 'k6/x/tls';
import { check } from 'k6';

const conn = tls.connect('host:port');

export default function () {
  tls.write(conn, 'Say Hello');
  let res = String.fromCharCode(...tls.read(conn, 1024))
  check (res, {
    'verify ag tag': (res) => res.includes('Hello')
  });
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages