generating-tests-from-openapi

Generate k6 load test scripts from OpenAPI 3.0/3.1 specification files.

10|1|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/KimDoubleB/grafana-k6-skills --skill generating-tests-from-openapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generating-tests-from-openapi
Source: https://github.com/KimDoubleB/grafana-k6-skills/tree/main/plugins/grafana-k6-skills/skills/generating-tests-from-openapi
Command: npx skills add https://github.com/KimDoubleB/grafana-k6-skills --skill generating-tests-from-openapi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of k6 load testing scripts directly from OpenAPI specification files, significantly reducing the manual effort and time required to set up API performance tests.

Core Features & Use Cases

  • Automated Script Generation: Parses OpenAPI 3.0/3.1 specs (YAML/JSON) to generate k6 scripts.
  • Endpoint & Parameter Mapping: Extracts paths, operations, parameters, and request bodies.
  • Authentication Handling: Analyzes and maps various security schemes (Bearer, API Key, OAuth2) to k6 authentication setups.
  • Use Case: You have an OpenAPI v3.1 specification for your new REST API. Use this Skill to quickly generate a comprehensive k6 load test suite that covers all endpoints and handles the defined authentication methods.

Quick Start

Use the generating-tests-from-openapi skill to create a k6 test script from the provided OpenAPI specification file 'openapi.yaml'.

Frequently Asked Questions about generating-tests-from-openapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate k6 load testing scripts from an OpenAPI spec?

To generate k6 load testing scripts from an OpenAPI spec, this Skill parses OpenAPI 3.0/3.1 files (YAML/JSON) and extracts endpoints, parameters, and request bodies to output comprehensive k6 test suites automatically.

Can I map OpenAPI security schemes to k6 authentication flows?

Yes, you can map OpenAPI security schemes to k6 authentication flows. The generation process analyzes defined security definitions like Bearer, API Key, and OAuth2, translating them directly into appropriate k6 authentication setups.

Does k6 test generation work with both OpenAPI 3.0 and 3.1 specifications?

k6 test generation works with both OpenAPI 3.0 and 3.1 specifications. The parser reads YAML and JSON formats to extract paths, operations, and request bodies for creating comprehensive API performance test scripts.

What is the best way to automate API load testing for a new REST API?

The best way to automate API load testing is using your existing OpenAPI specification file. By parsing the defined endpoints and security schemes, you can automatically generate comprehensive k6 test scripts without manual coding effort.

How are API parameters and request bodies handled when generating k6 tests?

API parameters and request bodies are handled by extracting them directly from the OpenAPI specification paths and operations. The generator maps these definitions into structured k6 script configurations for comprehensive endpoint coverage.

What file formats do I need to provide for automated k6 script generation?

You need to provide your OpenAPI specification in either YAML or JSON file format. The script generator parses these files to extract API endpoints, parameters, and security schemes to create the k6 test suite.