GithubHelp home page GithubHelp logo

load_test_k6's Introduction

load_test_k6

Load test with k6

Basic framework:

  • Node.js (JavaScript) and k6

Configuration:

  • Clone this repository.
  • You must have Node.js installed in your local machine.
  • You must install k6 in your machine, following intructions in the guide for each OS (https://k6.io/docs/getting-started/installation/) or doing npm command (after Node.js install):
 npm i k6
  • After that, install the dependencies running this command in the root:
 npm install

Project structure:

  • All files with '*_test.js' are k6 test scripts.
  • If you choice in the script execution, k6-html-reporter is generate in each directory "*_report".
  • It was created a .gitignore file to not push "node_modules" folder.
  • It was added CircleCI file to run tests in pipeline (CI/CD/Continuous Testing).

Reports:

It was configured k6-html-reporter in this project.

k6-html-reporter

  • Available in each "*_report" directory.
  • It displays thresholds, checks and metrics from test execution.
  • To generate report, run command for each script like this (after each test running):
 node contacts_report.js

N|k6-html-reporter

About each test script:

N|k6-html-reporter

Contacts

It's a script for a defined number of interations.

To execute this script, run the command:

k6 run contacts_test.js

or

npx k6 run contacts_test.js

or using script configured on package.json (that includes report generation)

npm run contacts

News

It's a script for a constant-arrival-rate.

To execute this script, run the command:

k6 run news_test.js

or

npx k6 run news_test.js

or using script configured on package.json (that includes report generation)

npm run news

Pi

It's a script for a ramping-arrival-rate.

To execute this script, run the command:

k6 run news_test.js

or

npx k6 run news_test.js

or using script configured on package.json (that includes report generation)

npm run news

CircleCI:

It was included a configuration to execut this non-functional tests in CircleCI (CI/CD/Continuous Testing). The config is in "circle.yml" file, in the project root. With this config the project execute in Circle CI each job/script in parallel, including the reports in the end of execution.

Version information:

  • 1.0.0: first version

Author:

load_test_k6's People

Contributors

marcoshioka avatar

Watchers

James Cloos avatar

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.