Generate dogfooding test suites (automated + interactive) for any project
Generates comprehensive dogfooding test suites with automated and interactive modes for any project type.
/plugin marketplace add Data-Wise/craft/plugin install data-wise-craft@Data-Wise/crafttest/Generate comprehensive dogfooding test suites for any project type.
automated-tests.sh - CI-ready, non-interactiveinteractive-tests.sh - Human-guided QA with expected/actual comparison| Files Present | Detected Type | Test Focus |
|---|---|---|
.claude-plugin/plugin.json | Claude Plugin | Structure, commands, skills, agents |
pyproject.toml + [project.scripts] | Python CLI | CLI commands, subcommands, exit codes |
pyproject.toml (library) | Python Library | Imports, API surface |
package.json + bin | Node CLI | Commands, npm scripts |
DESCRIPTION | R Package | Package structure, exports |
Cargo.toml + [[bin]] | Rust CLI | Binary commands |
go.mod + main.go | Go CLI | Commands |
tests/
└── cli/
├── README.md # How to run tests
├── automated-tests.sh # Non-interactive (CI)
├── interactive-tests.sh # Human-guided QA
└── logs/ # Execution logs
# Current directory
/craft:test:generate
# Specific project
/craft:test:generate ~/projects/my-tool
# Force project type
/craft:test:generate . cli
# Plugin project
/craft:test:generate ~/projects/my-plugin plugin
When this command runs, I will:
# Check for project indicators
if [[ -f ".claude-plugin/plugin.json" ]]; then
TYPE="plugin"
elif [[ -f "pyproject.toml" ]] && grep -q "project.scripts" pyproject.toml; then
TYPE="python-cli"
elif [[ -f "package.json" ]] && jq -e '.bin' package.json >/dev/null 2>&1; then
TYPE="node-cli"
elif [[ -f "DESCRIPTION" ]]; then
TYPE="r-package"
else
TYPE="generic"
fi
For CLI:
For Plugin:
Template structure:
#!/bin/bash
# Automated CLI Test Suite for: [PROJECT_NAME]
# Generated: [DATE]
set -euo pipefail
PASS=0
FAIL=0
TOTAL=0
# Test functions...
# Tests based on detected structure...
# Summary...
Template structure:
#!/bin/bash
# Interactive Test Suite for: [PROJECT_NAME]
# Generated: [DATE]
TOTAL_TESTS=[COUNT]
run_test() {
# Show test, run command, compare expected/actual
# Single prompt: y/n/q
}
# Tests...
print_summary
Document how to run both test suites.
set -euo pipefail safelogs/ directoryAfter generation:
# Run automated tests
bash tests/cli/automated-tests.sh
# Run interactive tests
bash tests/cli/interactive-tests.sh
# Add to CI (.github/workflows/test.yml)
- name: Run CLI tests
run: bash tests/cli/automated-tests.sh
The generated tests are starting points. Customize by:
/generateGenerate ready-to-execute hypershift cluster creation commands from natural language descriptions
/generateGenerate documentation from TypeScript/JavaScript code, OpenAPI specs, GraphQL schemas, and SpecWeave specifications.