add-test-with-mock

Community

Write robust unit tests with mocks

Authoranoopg87
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Reduce fragile or incomplete test coverage by providing clear patterns, mock implementations, and examples to quickly produce reliable unit tests for KAgentic components.

Core Features & Use Cases

  • Patterned examples for testing Tools, LLM providers, AgentFramework, ConversationMemory, and agent graphs.
  • Mock object recipes and factories for LLMs, tools, memory, HTTP clients, and stateful behaviors to isolate dependencies.
  • Async and coroutine testing techniques using runBlocking, timeout handling, and coverage/run instructions for Gradle.
  • Use case: scaffold tests for a new LLM provider, validate tool selection and scoring, or simulate transient API failures to verify retry logic.

Quick Start

Create a unit test scaffold that uses a mock LLM and a mock tool to verify tool selection and response handling, then run the tests with Gradle.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-test-with-mock
Download link: https://github.com/anoopg87/KAgentic/archive/main.zip#add-test-with-mock

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.