functional-testing
Installation
SKILL.md
Functional Testing Philosophy
Core Principle
ALWAYS test the public interface of a project. Tests should interact with the system the same way end users or consumers would, never calling internal/private functions directly.
The "public interface" varies by project type:
- HTTP APIs: Test via HTTP requests to running server
- Libraries: Test via exported package functions
- CLIs: Test via command execution with captured output
CLI Testing Pattern
Code Structure
Structure CLI applications to be testable by making the main() function a thin wrapper:
package main