generating-tests-from-code

Generate k6 load test scripts by analyzing API codebases.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of k6 load test scripts by analyzing existing API codebases, saving significant manual effort and ensuring tests accurately reflect the application's structure.

Core Features & Use Cases

  • Codebase Analysis: Scans route definitions, controllers, and middleware in frameworks like Express, NestJS, Spring Boot, FastAPI, and Django.
  • Authentication Detection: Identifies and configures authentication flows (JWT, sessions, API keys) for secure test generation.
  • Endpoint Mapping: Extracts all endpoints, HTTP methods, parameters, and request/response shapes.
  • Use Case: You have a new Express.js API with several protected endpoints. Use this Skill to automatically generate a k6 script that logs in, performs CRUD operations on your resources, and includes necessary checks and thresholds.

Quick Start

Use the generating-tests-from-code skill to analyze my NestJS API codebase and generate a k6 load test script.

Frequently Asked Questions about generating-tests-from-code

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

FAQPage Schema
How do I automatically generate k6 load test scripts from my API codebase?

To generate k6 load test scripts, this Skill analyzes your existing API codebase to detect route definitions, controllers, and middleware, then outputs structured k6 scripts that map endpoints and parameters for realistic user flows.

Can I generate k6 tests for my NestJS or Express API without manually writing test logic?

Yes, you can generate k6 tests for NestJS and Express APIs without manual logic by scanning your source code files to identify endpoint definitions, data transfer objects, and authentication mechanisms for automated script creation.

Does automated k6 test generation work with Python frameworks like FastAPI and Django?

Automated k6 test generation works with FastAPI and Django by analyzing their specific source code files to extract HTTP methods, request and response shapes, and route parameters to structure accurate load tests.

How does code analysis handle JWT authentication when generating API load tests?

Code analysis handles JWT authentication by identifying and configuring secure authentication flows during the codebase scan, ensuring the generated k6 scripts properly log in and include necessary tokens for protected endpoints.

What do I need to provide to auto-generate realistic k6 user flows for CRUD operations?

You need to provide access to your API source code files so the analysis can identify endpoint definitions, middleware, and data transfer objects to structure k6 tests that log in and perform CRUD operations with checks and thresholds.

Are there limitations when generating k6 scripts from Spring Boot source code?

A primary limitation when generating k6 scripts from Spring Boot is the requirement for accessible source code files; the Skill needs to analyze actual endpoint definitions and middleware to accurately map routes and configure authentication.