
Learn to automate API performance testing by simulating thousands of concurrent users across regions, executing end-to-end workflows (search, add to cart, checkout, payment), and validating response times and success rates.
Write a JavaScript load test with k6, exporting a default function that simulates thousands of users hitting a URL to measure API and microservice performance, then review metrics and logs.
Explore building and invoking API requests with various HTTP methods, configuring a main function and worker groups, and preparing for automated performance testing of APIs and microservices.
Learn how to configure ramp-up and ramp-down of user load using stage-based scenarios, specifying duration, target virtual users, and test execution for API and microservices performance.
Learn to automate performance testing of APIs and microservices with k6, configuring ramp up and ramp down stages, virtual users, and test duration to simulate realistic load.
Apply multiple checks in automated performance tests by running api and microservice load tests with multiple virtual users, validating status codes, response times, and payload sizes.
Use checks to validate API responses, including status codes and body size, and mark tests as pass or fail during a load test with 12 virtual users and 146 requests.
Automate API and microservices testing by building a mock EPA that returns an object with headers and status 200. Validate the response body message to ensure a successful outcome.
Learn how to perform a post request to an api by sending a json body with email and password, including endpoint, headers, and payload construction.
Implement a counter metric from a metrics module, initialize and increment it, and demonstrate an api retry pattern that calls an api until a 200 response, up to five attempts.
Implement a counter-based retry mechanism for API calls, retrying on non-200 responses with a backoff delay, while logging outcomes and ensuring per-user scope to avoid global counter issues.
Define and apply checks with a 95 percent pass threshold to automate performance and load testing of APIs and microservices, ensuring 200 responses when criteria are met.
Learn the k6 test life cycle, including init, setup, the default main function, and cleanup, with variable initialization, logging, and returning values to shared blocks.
Trigger and view live test executions and metrics on the dashboard, with automatic graph updates, shareable links, and alerting for performance defects and pass/fail conditions.
Explore a Grafana load test dashboard to analyze metrics, filter by time, inspect response time and failure rate, and customize panels with thresholds for API performance.
Follow the commands to install k6 on an Ubuntu EC2 instance using the console. Verify the installation to confirm that k6 is successfully installed on the instance.
We will enhance this training course regularly to cover more examples and real-time projects.
Summary - Learn the future of performance testing and automate Performance & Load Testing of API and micro-services using open-source tool K6.
Open Source - K6 is an open-source load testing tool built for developers and testers' happiness. It has over 1 million installations.
Notifications - Pass/Fail behavior for easy automation and integration into CI pipelines, Gitlab
Developer centric load testing - Everyone loves fast apps, APIs and websites. K6 helps you to automate Load tests that simulate real-world users as closely as possible.
Goal-based load testing - You will be able to automate test which covers performance and functional goals like what level is a response time not acceptable, and/or what is an acceptable failure rate
Store and Visualize Performance Test Results - K6 can output its test result data to different sources like JSON file, Grafana
IntelliSense - Get code auto-completion and in-context documentation.
Visual Studio Code Extension - Execute VS Code commands to run a k6 test of your current file.
Performance Monitoring - Performance monitoring of your APIs and micro-services in production.
Load Testing - Quickly build test cases to validate the performance of your APIs or micro-services. Validate that your system can handle the expected volume of traffic, and catch critical performance regressions in CI before they reach production.
Automated testing - Automate your performance tests. Get Pass/Fail behavior on performance goals.
Write tests in Javascript code - Full scripting language to write realistic load tests. Reuse modules and Javascript libraries to build and maintain a performance test suite.
Scaled to the cloud - Designed to use the same test in a local or cloud environment.
k6 Cloud - Speed-up performance testing and Avoid managing your own infrastructure.
GUI test builder - Record your tests using the browser extension
Run cloud tests - Scale tests in the cloud up to 100k concurrent virtual users and Generate load from 16 geographic locations
Test Scheduling - Schedule and run tests from the web app, CLI, and CI pipelines
Analyze test results - Filter your test results by location, period, and tags. Get a convenient overview of your test results.
Be a performance expert - Compare performance results between tests. Get automatic analysis and recommendations that quickly pinpoint performance issues. Get alert about your performance tests.
Are you still stuck with JMeter? Then, learn GUI and Code-based testing with JavaScript and Upgrade to K6 & K6 Cloud for better developer experience.
K6 is used by Amazon, Microsoft, Grafana, Gitlab, Citrix, etc. Backed by 20 years of experience.
Course Curriculum Summary
Promotion Video Walkthrough
Understand the Basics of K6
Understand API Performance Testing
Design and execute Sample Test Script
Running K6 with 100S of virtual users
Ramp-up and Ramp-down Users
Checks, Asserts and Design Error Rate and Failure Rate
Write HTTP Requests and parse responses
Understand Built-in Metrics, Counter, Trend, Retry Mechanism
Design Threshold on Checks to pass/fail load test
Test Life Cycle, SetUp, TearDown, Main Function
Fixed RPS with Example
InfluxDB, Grafana, Design Dashboard
K6, InfluxDB, Grafana on Amazon EC2
Understand Load-impact to design and execute scripts on Cloud from the various geographic location
Define tags and groups for better filtering
Performance Test Framework design using Postman to K6 Converter
Real-time project and Automated Performance Testing Framework Design
Understand Virtual Users, Runners, Debugging Scripts
Example
1. Write your load test
Use the k6 Javascript API to write simple and realistic load test.
export let options = {
thresholds: {
"http_req_duration": ["p(90)<300"],
"failed requests": ["rate<0.15"],
}
};
2. Define Pass and Fail criteria for performance tests
- 95th percentile response time must be below 1s.
- Less than 0.15% request errors.
3. Execute the test. Verify Pass/ Fail behaviour.
Test many load configurations to ensure your performance goals in multiple situations.
Running the test (50VUs, 2m), please wait...
Test Run Successful
Total thresholds: 2. Passed: 2. Failed: 0.
4. Automate your performance and load tests
Run your tests frequently to be confident in your system's performance.
Schedule your test execution and integrate your tests into CI pipelines.
Performance test Execution Run 1
Checkout API. 2 of 4 thresholds failed.
Performance test Execution Run 2
Checkout API. 4 of 4 thresholds passed.
5. Receive alerts on performance regressions
Configure your notifications and get alerts if any change breaks your performance goals.
6. Visualize Test Results
Host Grafana and share with stakeholders to view live test execution and test metrics