| Service | Status |
|---|---|
| GitHub |
This repository contains performance tests for the QuickPizza API, implemented using k6.
The test suite is designed with modularity and maintainability in mind, leveraging TypeScript for type safety and a clean project structure separating configuration, test scenarios, models, and utility classes. Workloads and scenarios are configurable via environment variables, allowing flexible execution in local and CI environments.
Follow these steps to set up and run the QuickPizza API performance tests locally:
- Node.js (version 18 or later recommended)
- npm (comes with Node.js)
- k6 (can be installed via npm or your OS package manager)
- Clone the repository:
git clone https://github.com/randonNaidoo/quickpizza-performance-tests.git cd quickpizza-performance-tests - Install npm dependencies:
npm install
- Install k6:
npm install -g k6
Use npm scripts to run tests with different scenarios:
-
Smoke test:
npm run testSmoke
-
Average load test:
npm run testAverage
-
Spike load test:
npm run testSpike
.github/workflows/— GitHub Actions workflows for running performance testsk6/config/— Environment settings, workloads, scenarios, thresholds, and API pathsframework/— HTTP client, login helper, and reusable test utilitiesmodels/— TypeScript interfaces for request and response data modelsbuilders/— Payload builders for requests, e.g., pizza request buildertests/— Test scripts for individual endpoints and combined test runnerpackage.json— npm scripts and dependenciestsconfig.json— TypeScript configuration
LICENSE.md— License information for the projectREADME.md— Project documentation and setup instructions
GitHub Actions is configured to run K6 performance tests on demand via workflow dispatch.
- The workflow supports running different load scenarios: smoke, average, and spike.
- Tests run in a clean Ubuntu environment with Node.js and K6 installed automatically
At this time, this project is not open to external contributions.
Please feel free to fork the repository for personal use or experimentation, but I am not currently accepting pull requests or feature suggestions.
This project is licensed under the MIT License.
Thanks to Grafana Labs for providing a public Api for testing.