Git Product home page Git Product logo

k6-web-recorder's Introduction

k6-web-recorder

Web recorder for k6 load testing tool using chrome.

Pre requisites

  1. Chrome browser.
  2. Nodejs version 7.6+ installed. Download from here.

or use nvm to install and manage multiple node version.

  1. yarn (optional). Fast package manager for node.

Install

Make sure you have git installed. Go to command prompt and do

git clone https://github.com/rupeshmore/k6-web-recorder.git

or download zip.

Go inside the directory

cd k6-web-recorder

Inside the directory

if yarn is installed

yarn

or

npm install

Usage

node app.js --url=https://github.com/rupeshmore

or

npm start --url=https://github.com/rupeshmore

url is required parameter. Specify it in command line or in config.json;

This will start an instance of chrome.

Configuration

edit config.json to record added data.

{
  "url": "https://github.com/rupeshmore",
  "recordThinkTime": true,
  "assignRequestToVariable": false,
  "recordHeaders": [
    "Content-Type"
  ]
}
  1. url: is required for the app. This can be defined in config.json or passed as an argument via command line.

  2. recordThinkTime: This will record think time between requests. Think time greater than 1 seconds are only recorded. If false it will not capture think time. Default value true.

  3. assignRequestToVariable: This will assign the http requests to a variable.

Example: assignRequestToVariable: true

let req = http.get(https://github.com/rupeshmore);

assignRequestToVariable: false

http.get(https://github.com/rupeshmore);
  1. recordHeaders: This is an array of values to be recoded for headers. values it can take to match the http headers. https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields

Scripts

All scripts are recorded under the scripts folder.

Features

  • Records all http traffic and convert them to k6 load testing tool.

  • Filters out the request based on the domain of url to be recorded.

  • Records think-time for the script.

  • Options to record specific headers in the scripts.

Note

All requests with multipart/form-data are not recorded. As the k6 tool will not be able to playback the same request as a browser does.

Close Recording

Close the browser to close recording or close the app.

k6-web-recorder's People

Contributors

rupeshmore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dluong777 heriky

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.