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

What's hot (20)

PPTX
Browser-Based Load Testing with Grafana K6
Knoldus Inc.
 
PDF
Distributed Load Testing with k6 - DevOps Barcelona
Thijs Feryn
 
ODP
Testing RESTful Webservices using the REST-assured framework
Micha Kops
 
PPTX
Introduction to helm
Jeeva Chelladhurai
 
PPTX
Automation test framework with cucumber – BDD
123abcda
 
PPTX
Cucumber BDD
Pravin Dsilva
 
PPTX
SonarQube Presentation.pptx
Satwik Bhupathi Raju
 
PPTX
API Test Automation Using Karate (Anil Kumar Moka)
Peter Thomas
 
PPT
SonarQube Overview
Ahmed M. Gomaa
 
PPTX
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
PPTX
Angular Unit Testing
Shailendra Chauhan
 
PDF
Introduction to kubernetes
Raffaele Di Fazio
 
ODP
An Introduction To Jenkins
Knoldus Inc.
 
PPT
Postman.ppt
ParrotBAD
 
PDF
Introduction to Docker Compose
Ajeet Singh Raina
 
PPT
Selenium Automation Framework
Mindfire Solutions
 
PDF
Distributed load testing with k6
Thijs Feryn
 
PPTX
BDD WITH CUCUMBER AND JAVA
Srinivas Katakam
 
PDF
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
PDF
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Applitools
 
Browser-Based Load Testing with Grafana K6
Knoldus Inc.
 
Distributed Load Testing with k6 - DevOps Barcelona
Thijs Feryn
 
Testing RESTful Webservices using the REST-assured framework
Micha Kops
 
Introduction to helm
Jeeva Chelladhurai
 
Automation test framework with cucumber – BDD
123abcda
 
Cucumber BDD
Pravin Dsilva
 
SonarQube Presentation.pptx
Satwik Bhupathi Raju
 
API Test Automation Using Karate (Anil Kumar Moka)
Peter Thomas
 
SonarQube Overview
Ahmed M. Gomaa
 
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
Angular Unit Testing
Shailendra Chauhan
 
Introduction to kubernetes
Raffaele Di Fazio
 
An Introduction To Jenkins
Knoldus Inc.
 
Postman.ppt
ParrotBAD
 
Introduction to Docker Compose
Ajeet Singh Raina
 
Selenium Automation Framework
Mindfire Solutions
 
Distributed load testing with k6
Thijs Feryn
 
BDD WITH CUCUMBER AND JAVA
Srinivas Katakam
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Applitools
 

Similar to Introduction to K6 (20)

PDF
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
apidays
 
PPTX
Integration Testing as Validation and Monitoring
Melissa Benua
 
DOCX
Amardeep qa test_automation_cv
FNU Amardeep
 
DOCX
Amardeep qa test_automation_cv
FNU Amardeep
 
PDF
Joomla Code Quality Control and Automation Testing
Shyam Sunder Verma
 
PDF
Laravel Load Testing: Strategies and Tools
Muhammad Shehata
 
PPTX
Modern Testing Strategies for Evolving Ecosystems
Julian Warszawski
 
PPSX
Automation Tool Overview
ANKUR-BA
 
PPTX
Automation Tools Overview
Sachin-QA
 
PDF
Cypress Best Pratices for Test Automation
Knoldus Inc.
 
DOC
Goutham_2+_Testing.docx
goutham mylu
 
PDF
Top Performance Testing Tools of 2025: Ensure Speed, Stability, and Scale
Shubham Joshi
 
PPTX
Automation Tools Overview
Murageppa-QA
 
DOC
Gajanan Bhat
Gajanan Bhat
 
PDF
Accelerating tests with Cypress for a leaderboard platform
Knoldus Inc.
 
PPTX
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
PDF
Continuous Performance Testing
C4Media
 
DOC
ChandraPrabhaSR_Resume
Chandraprabha S R
 
DOC
Vijay_Teekinavar_Kallesh
Vijay Teekinavar
 
PDF
End-end tests as first class citizens - SeleniumConf 2020
Abhijeet Vaikar
 
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
apidays
 
Integration Testing as Validation and Monitoring
Melissa Benua
 
Amardeep qa test_automation_cv
FNU Amardeep
 
Amardeep qa test_automation_cv
FNU Amardeep
 
Joomla Code Quality Control and Automation Testing
Shyam Sunder Verma
 
Laravel Load Testing: Strategies and Tools
Muhammad Shehata
 
Modern Testing Strategies for Evolving Ecosystems
Julian Warszawski
 
Automation Tool Overview
ANKUR-BA
 
Automation Tools Overview
Sachin-QA
 
Cypress Best Pratices for Test Automation
Knoldus Inc.
 
Goutham_2+_Testing.docx
goutham mylu
 
Top Performance Testing Tools of 2025: Ensure Speed, Stability, and Scale
Shubham Joshi
 
Automation Tools Overview
Murageppa-QA
 
Gajanan Bhat
Gajanan Bhat
 
Accelerating tests with Cypress for a leaderboard platform
Knoldus Inc.
 
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
Continuous Performance Testing
C4Media
 
ChandraPrabhaSR_Resume
Chandraprabha S R
 
Vijay_Teekinavar_Kallesh
Vijay Teekinavar
 
End-end tests as first class citizens - SeleniumConf 2020
Abhijeet Vaikar
 
Ad

More from Knoldus Inc. (20)

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

Recently uploaded (20)

PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
PDF
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Machine Learning Benefits Across Industries
SynapseIndia
 
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 

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