GithubHelp home page GithubHelp logo

grafana / awesome-k6 Goto Github PK

View Code? Open in Web Editor NEW
541.0 144.0 53.0 980 KB

A curated list of awesome tools, content and projects using k6

License: Creative Commons Zero v1.0 Universal

load-testing performance-monitoring performance-testing test-automation testing testing-tools awesome awesome-list

awesome-k6's Introduction

k6 mascot

Awesome k6 Awesome

A collection of resources by the community, on (testing with) k6.

Contents

Articles

Videos

Examples/Templates

Tools

  • k6-to-junit - Tool for converting k6 output to JUnit XML for easy use with CIs.
  • k6-reporter - Tool for converting k6 output to HTML reports.
  • k6-html-reporter - Tool for generating k6 HTML reports.
  • har-to-k6 - Tool for converting HAR recordings to k6 test scripts.
  • postman-to-k6 - Tool for converting Postman collections to k6 test scripts.
  • k6 generator - Tool for converting Swagger/OpenAPI specifications to k6 test scripts.
  • jmeter-to-k6 - Tool for converting JMeter test cases to k6 test scripts.
  • jslib.k6.io - Useful utility libs for k6 scripts.
  • k6 for visual studio code - Marketplace Extension for running k6 directly from your IDE.
  • k6 for IntelliJ - IntelliJ-based Plugin to run k6 tests locally or in the k6 Cloud from your IntelliJ IDE.
  • k6 Testkube executor
  • k6-junit - k6 JUnit summary exporter libray.
  • k6-expect - k6 library that simplifies writing tests in a functional way by providing a jest-like syntax for expectations.

CI/CD

Extensions

Related

  • How They Load Test - A collection of resources on how companies around the world perform load testing.
  • Load Testing Toolkit - A collection of open-source tools for debugging, benchmarking, load and stress testing your code or services.
  • awesome-http-benchmark - A collection of HTTP benchmark tools, testing/debugging, & restAPI (RESTful).

Contributing

Want to help in making this list better? Yay, that's awesome! Before you get started though, please have a look at our code of conduct and contribution guidelines.

awesome-k6's People

Contributors

eric-hc avatar exu avatar fischmart avatar floord avatar javaducky avatar luketn avatar mattdodsonenglish avatar mcdermg avatar mostafa avatar nicolevanderhoeven avatar notslang avatar pdelre avatar poponuts avatar ppcano avatar roock avatar safebear avatar sidpalas avatar simbadltd avatar simskij avatar thijsferyn avatar thylong 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-k6's Issues

k6 kttp_req_duration not giving correct numbers

http_req_duration number is not correct.Because I have totally 43 request. But duration is 1,193 s .1s is too low for sending+waiting+receiving requests for total 43 request.

### My result is is below;
scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
* CreatePicking: 1 iterations for each of 1 VUs (maxDuration: 10m0s, exec: CreatePicking, gracefulStop: 30s)

running (00m44.2s), 0/1 VUs, 1 complete and 0 interrupted iterations
CreatePicking ✓ [======================================] 1 VUs 00m23.3s/10m0s 1/1 iters, 1 per VU
INFO[0046] [k6-reporter v2.3.0] Generating HTML summary report source=console
█ setup

 █ Picking load test senaryosu çalıştırır

   ✓ 204 is 204

 total_count...: avg=23275      min=23275      med=23275      max=23275      p(90)=23275      p(95)=23275
 checks................................................: 100.00% ✓ 1        ✗ 0
 data_received.........................................: 41 kB   938 B/s
 data_sent.............................................: 175 kB  4.0 kB/s
 group_duration........................................: avg=23275.72ms min=23275.72ms med=23275.72ms max=23275.72ms p(90)=23275.72ms p(95)=23275.72ms
 http_req_blocked......................................: avg=19.86ms    min=0.00ms     med=0.00ms     max=382.91ms   p(90)=0.00ms     p(95)=197.05ms
 http_req_connecting...................................: avg=5.06ms     min=0.00ms     med=0.00ms     max=86.96ms    p(90)=0.00ms     p(95)=53.43ms
 http_req_duration.....................................: avg=1005.63ms  min=148.90ms   med=532.32ms   max=18206.84ms p(90)=1193.57ms  p(95)=1408.60ms
   { expected_response:true }..........................: avg=1005.63ms  min=148.90ms   med=532.32ms   max=18206.84ms p(90)=1193.57ms  p(95)=1408.60ms
 http_req_failed.......................................: 0.00%   ✓ 0        ✗ 43
 http_req_receiving....................................: avg=0.20ms     min=0.00ms     med=0.00ms     max=3.24ms     p(90)=0.59ms     p(95)=0.96ms
 http_req_sending......................................: avg=0.13ms     min=0.00ms     med=0.00ms     max=0.58ms     p(90)=0.51ms     p(95)=0.55ms
 http_req_tls_handshaking..............................: avg=8.56ms     min=0.00ms     med=0.00ms     max=165.03ms   p(90)=0.00ms     p(95)=67.28ms
 http_req_waiting......................................: avg=1005.31ms  min=148.40ms   med=532.17ms   max=18206.84ms p(90)=1193.54ms  p(95)=1408.58ms
 http_reqs.............................................: 43      0.973519/s
 iteration_duration....................................: avg=22078.97ms min=20882.21ms med=22078.97ms max=23275.72ms p(90)=23036.37ms p(95)=23156.05ms
 iterations............................................: 1       0.02264/s
 vus...................................................: 1       min=0      max=1
 vus_max...............................................: 1       min=1      max=1

### My code is below;

`
import http from 'k6/http'
import { describe } from 'https://jslib.k6.io/expect/0.0.4/index.js';
import exec from 'k6/execution';
import { Trend } from 'k6/metrics';
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import { textSummary } from 'https://jslib.k6.io/k6-summary/0.0.1/index.js';

let totalPickingTimeTrend = new Trend('total_count');

let authUrl = 'test';
let requestUrlAPI = 'test';
let requestUrlSeed = 'test';

let tokenPayload = {
client_id: "test",
}

export function setup() {

let createPickingStartedSalesOrdersHeader = {
    headers: {
        "apikey": "test",
        "Content-Type": "application/json"
    },
};
let createPickingStartedSalesOrdersRes = http.post(requestUrlSeed + 'tester', JSON.stringify({
    salesOrderConfigurations: [
        {
            amount: 100
        }
    ],
    tenant: 'test',
    operation: 'test'
}), createPickingStartedSalesOrdersHeader)

let response = http.post(authUrl, tokenPayload);
return [response.json(), createPickingStartedSalesOrdersRes.json()]

}

export function handleSummary(data) {
return {
"result.html": htmlReport(data),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}

export const options = {
summaryTimeUnit: 'ms',
scenarios: {
CreatePicking: {
exec: 'CreatePicking',
executor: 'per-vu-iterations',
vus: 1,
iterations: 1
}
}
}

export function CreatePicking(data) {

let generateTokenHeader = {
    headers: {
        'Authorization': `Bearer ${data[0].access_token}`,
        'content-type': 'application/json',
    },
};
describe('Picking load test senaryosu çalıştırır', (t) => {
    let startTime = Date.now();

    //if exist
    let continueIfExistRes = http.post(requestUrlAPI + 'test1', JSON.stringify({
        label: `${data[1][exec.vu.idInTest - 1]}`
    }), generateTokenHeader
    )
    let pickingProcessReferenceNumber = continueIfExistRes.json().route.pickingProcessReferenceNumber;
    let createdIsCompleted = continueIfExistRes.json().route.isCompleted;
    while (createdIsCompleted == false) {

        //check
        http.post(requestUrlAPI + 'test2', JSON.stringify({
            pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
        }), generateTokenHeader)

        //control
        http.post(requestUrlAPI + 'test3', JSON.stringify({
            pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
        }), generateTokenHeader)

        //place
        let placeProductRes = http.post(requestUrlAPI + 'test4', JSON.stringify({
            pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
        }), generateTokenHeader)
        pickingProcessReferenceNumber = placeProductRes.json().pickingProcessReferenceNumber;
        createdIsCompleted = placeProductRes.json().isCompleted;
    }

    //complete
    let completePickingCompleteProcessRes = http.post(requestUrlAPI + 'test5', JSON.stringify({
        pickingReferenceNumber: `${pickingProcessReferenceNumber}`,
        placeTrolleyAddressLabel: "PA",
    }), generateTokenHeader)
    t.expect(completePickingCompleteProcessRes.status).toEqual(204);
    let totalTime = Date.now() - startTime
    totalPickingTimeTrend.add(totalTime)
});

}
`

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.