SlideShare a Scribd company logo
7
Most read
8
Most read
9
Most read
Introduction of K6
Presented by : Soniya Raichandani
QA Consultant
KnolX Etiquettes
Punctuality
Respect Knolx session timings,
you are requested not to join
sessions after a 5 minutes
threshold post the session start
time.
Feedback
Make sure to submit a
constructive feedback for all
sessions as it is very helpful for
the presenter.
Mute
Please keep your window on
mute.
Avoid Disturbance
Avoid leaving your window
unmuted after asking a question
What is Performance testing?
What is K6?
Why k6?
➤
➤
➤
Agenda
CI/CD in K6
➤
➤ Demo
â—Ź It is a non-functional software testing technique that determines the
stability,speed, and scalability of an application.
PERFORMANCE TESTING
â—Ź In Performance testing,we evaluating the Application
output,Speed,Velocity, Network bandwidth,maximum concurrent
users, common response time etc.
Normal and expected
load
Higher than expected
load
Sudden increase load
Huge volume of
load
Monitor database
load
Different Types Of Performance Testing
What is ?
â—Ź k6 is an open-source load testing tool for testing the performance of APIs,
microservices, and websites.
â—Ź This tool is scriptable and support the Javascript language.
â—Ź k6 was initially released on GitHub in 2017 by Load Impact as an
open-source.
● It’s written in Go Language.
K6
Load Testing in K6
Load Testing is primarily concerned with assessing the current
performance of your system in terms of concurrent users or
requests per second.
â—Ź Options
â—Ź Checks & Thresholds
â—Ź Modules
â—Ź Metrics
â—Ź Groups & Tags
Components:-
Checks
Checks
VUs Duration Stages
A fixed number of
VUs execute as
many iterations as
possible for a
specified amount of
time.
A string specifying
the total duration a
test run should be
run for.
Array of objects that
specify the target
number of VUs to
ramp up or down to.
Options in K6
â—Ź Checks are asserts, but differ in that they don't halt the execution. Instead, they store the result of
the check, pass or fail, and let the script execution continue.
â—Ź Checks are great for codifying assertions relating to HTTP requests/responses, such as making
sure the response code is an HTTP.
CHECKS
● In the script,need to import the check -’import {check} from K6’
Syntax:-
check(res,{
'is status 200': (r) => r.status === 200,
});
Threshold
â—Ź Thresholds are a pass/fail criteria used to specify the performance expectations
of the system under test.
â—Ź Thresholds analyze the performance metrics and determine the final test result
(pass/fail).
export const thres = {
thresholds: {
http_req_failed: ['rate<0.01'], // http errors should be less than 1%
http_req_duration: ['p(95)<200'], // 95% of requests should be below 200ms
},
};
Syntax:-
Modules
While writing test scripts, it's common to import different
modules, or part of modules, for usage throughout the script. In
k6, it is possible to import three different kinds of modules:
â—Ź Built-in modules
â—Ź Local filesystem modules
â—Ź Remote HTTP(S) modules
Metrics
Build-In Metrics
D
Build- In
Custom
Metrics
A metric that allows for calculating statistics on the added values
(min, max, average and percentiles).
Custom
Metrics
Counter
Gauge
Rate
Trend
Groups & Tags
Groups:- Groups are optional, and it allows you to “group” a large
load script to help you with the test result analysis. Groups can be
nested, allowing you the BDD-style of testing.
Tags:- Tags are a simple and powerful way to categorize your k6
entities for later results filtering.
Speed Maintenance
Support of
test code Reports
Language Recording
Protocol VCS
K6
Why K6?
Introduction to K6
CI/CD in K6
In k6,it is possible to integrate with CI/CD tools with the help of Github actions because github
actions has own advantages.To integrate k6 with GitHub action we need k6 based test script.
Integration K6 with Github Actions
GitHub actions more powerful and most effortless CI/CD tools among which we have
earlier tools like Jenkins, etc.
Demo
Introduction to K6
Introduction to K6

More Related Content

PPTX
Load Testing with k6 framework
PDF
Running distributed tests with k6.pdf
PDF
Performance testing with jmeter
PDF
Performance Testing Using JMeter | Edureka
PPT
Performance testing and reporting with JMeter
PPTX
Performance testing using jmeter
ODP
Gatling
PPTX
Performance Testing from Scratch + JMeter intro
Load Testing with k6 framework
Running distributed tests with k6.pdf
Performance testing with jmeter
Performance Testing Using JMeter | Edureka
Performance testing and reporting with JMeter
Performance testing using jmeter
Gatling
Performance Testing from Scratch + JMeter intro

What's hot (20)

PDF
Test cases
PDF
LoadRunner Performance Testing
PPTX
Load Runner
PPTX
Jenkins tutorial
PPTX
ISTQB Test Process
PDF
Introduction To Mobile-Automation
PPT
Performance and load testing
PPTX
Introduction to jenkins
PPTX
Test Automation Framework with BDD and Cucumber
PPT
Ppt of soap ui
PPT
Manual testing ppt
PPT
Postman.ppt
PDF
API Testing: The heart of functional testing" with Bj Rollison
PDF
4 Major Advantages of API Testing
PPTX
Automation Testing by Selenium Web Driver
PPTX
Types of testing
PPT
Performance testing : An Overview
PPTX
Why you should switch to Cypress for modern web testing?
PPTX
Automation Testing With Appium
PDF
How to start performance testing project
Test cases
LoadRunner Performance Testing
Load Runner
Jenkins tutorial
ISTQB Test Process
Introduction To Mobile-Automation
Performance and load testing
Introduction to jenkins
Test Automation Framework with BDD and Cucumber
Ppt of soap ui
Manual testing ppt
Postman.ppt
API Testing: The heart of functional testing" with Bj Rollison
4 Major Advantages of API Testing
Automation Testing by Selenium Web Driver
Types of testing
Performance testing : An Overview
Why you should switch to Cypress for modern web testing?
Automation Testing With Appium
How to start performance testing project
Ad

Similar to Introduction to K6 (17)

PDF
load-testing-with-k6-nakov-at-qa-challenge-accepted-oct-2021-211002181104.pdf
PPTX
Scripting with K6 - Beyond the Basics Presentation
PPTX
Workshop: Introduction to Performance and Load Testing with k6
PPTX
Automate your load testing using Azure DevOps, K6 and Log Analytics
PDF
Laravel Load Testing: Strategies and Tools
PDF
Running distributed load tests with k6
PDF
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
PPTX
Browser-Based Load Testing with Grafana K6
PPTX
The New era in QA: k6
 
PDF
Continuous Performance from Load Testing to SRE and Beyond
PDF
Distributed load testing with K6 - NDC London 2024
PDF
Distributed Load Testing with k6 - DevOps Barcelona
PDF
Distributed load testing with k6
PDF
Performance Testing | Instamojo
PDF
Performance test on Carrefour
PDF
Load impact insights webinar
PDF
Gatling - Bordeaux JUG
load-testing-with-k6-nakov-at-qa-challenge-accepted-oct-2021-211002181104.pdf
Scripting with K6 - Beyond the Basics Presentation
Workshop: Introduction to Performance and Load Testing with k6
Automate your load testing using Azure DevOps, K6 and Log Analytics
Laravel Load Testing: Strategies and Tools
Running distributed load tests with k6
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
Browser-Based Load Testing with Grafana K6
The New era in QA: k6
 
Continuous Performance from Load Testing to SRE and Beyond
Distributed load testing with K6 - NDC London 2024
Distributed Load Testing with k6 - DevOps Barcelona
Distributed load testing with k6
Performance Testing | Instamojo
Performance test on Carrefour
Load impact insights webinar
Gatling - Bordeaux JUG
Ad

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Programs and apps: productivity, graphics, security and other tools
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)

Introduction to K6

  • 1. Introduction of K6 Presented by : Soniya Raichandani QA Consultant
  • 2. KnolX Etiquettes Punctuality Respect Knolx session timings, you are requested not to join sessions after a 5 minutes threshold post the session start time. Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Mute Please keep your window on mute. Avoid Disturbance Avoid leaving your window unmuted after asking a question
  • 3. What is Performance testing? What is K6? Why k6? ➤ ➤ ➤ Agenda CI/CD in K6 ➤ ➤ Demo
  • 4. â—Ź It is a non-functional software testing technique that determines the stability,speed, and scalability of an application. PERFORMANCE TESTING â—Ź In Performance testing,we evaluating the Application output,Speed,Velocity, Network bandwidth,maximum concurrent users, common response time etc.
  • 5. Normal and expected load Higher than expected load Sudden increase load Huge volume of load Monitor database load Different Types Of Performance Testing
  • 7. â—Ź k6 is an open-source load testing tool for testing the performance of APIs, microservices, and websites. â—Ź This tool is scriptable and support the Javascript language. â—Ź k6 was initially released on GitHub in 2017 by Load Impact as an open-source. â—Ź It’s written in Go Language. K6
  • 8. Load Testing in K6 Load Testing is primarily concerned with assessing the current performance of your system in terms of concurrent users or requests per second. â—Ź Options â—Ź Checks & Thresholds â—Ź Modules â—Ź Metrics â—Ź Groups & Tags Components:-
  • 9. Checks Checks VUs Duration Stages A fixed number of VUs execute as many iterations as possible for a specified amount of time. A string specifying the total duration a test run should be run for. Array of objects that specify the target number of VUs to ramp up or down to. Options in K6
  • 10. â—Ź Checks are asserts, but differ in that they don't halt the execution. Instead, they store the result of the check, pass or fail, and let the script execution continue. â—Ź Checks are great for codifying assertions relating to HTTP requests/responses, such as making sure the response code is an HTTP. CHECKS â—Ź In the script,need to import the check -’import {check} from K6’ Syntax:- check(res,{ 'is status 200': (r) => r.status === 200, });
  • 11. Threshold â—Ź Thresholds are a pass/fail criteria used to specify the performance expectations of the system under test. â—Ź Thresholds analyze the performance metrics and determine the final test result (pass/fail). export const thres = { thresholds: { http_req_failed: ['rate<0.01'], // http errors should be less than 1% http_req_duration: ['p(95)<200'], // 95% of requests should be below 200ms }, }; Syntax:-
  • 12. Modules While writing test scripts, it's common to import different modules, or part of modules, for usage throughout the script. In k6, it is possible to import three different kinds of modules: â—Ź Built-in modules â—Ź Local filesystem modules â—Ź Remote HTTP(S) modules
  • 13. Metrics Build-In Metrics D Build- In Custom Metrics A metric that allows for calculating statistics on the added values (min, max, average and percentiles). Custom Metrics Counter Gauge Rate Trend
  • 14. Groups & Tags Groups:- Groups are optional, and it allows you to “group” a large load script to help you with the test result analysis. Groups can be nested, allowing you the BDD-style of testing. Tags:- Tags are a simple and powerful way to categorize your k6 entities for later results filtering.
  • 15. Speed Maintenance Support of test code Reports Language Recording Protocol VCS K6 Why K6?
  • 17. CI/CD in K6 In k6,it is possible to integrate with CI/CD tools with the help of Github actions because github actions has own advantages.To integrate k6 with GitHub action we need k6 based test script. Integration K6 with Github Actions GitHub actions more powerful and most effortless CI/CD tools among which we have earlier tools like Jenkins, etc.
  • 18. Demo