Install
$ agentstack add skill-mishrashardendu22-agent-skills-test-creation-and-execution ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Test Creation & Execution Skill
This skill defines the testing standards, frameworks, conventions, and execution workflows for the GitHub Backup Automation System polyglot monorepo.
1. Branch-First Development
> [!IMPORTANT] > CREATE A LOCAL BRANCH FIRST: Always start by creating a local branch from main: > ``bash > git switch -c MishraShardendu22/main/ > ` > Never write tests or code directly on main`.
2. Testing Architecture & Frameworks
| Subsystem | Location | Framework & Tooling | Primary Test Command | | :--- | :--- | :--- | :--- | | Go Backend & Worker | backend/ & backup-worker/ | Standard Go testing, httptest | make test-go (go test -v -race ./...) | | Python Observatory | agentic-observatory/ | Python unittest, unittest.mock, httpx | make test-py | | AI Agent & RAG | agentic-observatory/ | Tool-calling mocks, LangChain agent harness | make test-agents | | Frontend | frontend/ | Next.js Turbopack compiler, TypeScript tsc | cd frontend && pnpm exec tsc --noEmit |
3. Go Test Creation Standards
File Naming & Package Placement
- Test files MUST reside in the same package and end with
_test.go(e.g.backend/handlers/health_test.go). - Package declarations match the production package (e.g.
package handlersorpackage handlers_testfor black-box testing).
Table-Driven Tests Pattern
Always prefer table-driven testing in Go:
package config_test
import (
"testing"
"github.com/MishraShardendu22/github-backup/backend/config"
)
func TestConfigValidation(t *testing.T) {
tests := []struct {
name string
envMap map[string]string
wantErr bool
}{
{
name: "valid configuration",
envMap: map[string]string{
"DATABASE_URL": "postgres://user:pass@localhost:5432/db",
"INTERNAL_SECRET": "secret123",
},
wantErr: false,
},
{
name: "missing required database url",
envMap: map[string]string{},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Set environment, run validation, and assert
})
}
}
Mocking Fiber HTTP Handlers
app := fiber.New()
routes.Setup(app)
req := httptest.NewRequest("GET", "/health", nil)
resp, err := app.Test(req)
if err != nil || resp.StatusCode != fiber.StatusOK {
t.Fatalf("expected 200 OK, got %d", resp.StatusCode)
}
3. Python Observatory Test Creation Standards
File Placement & Naming
- Unit tests reside in
agentic-observatory/with prefixtest_*.py(e.g.test_observability.py,test_openrouter_keys.py,test_agent_suite.py).
Mocking OpenRouter & Async Endpoints
- Never perform live external API calls during automated tests.
- Use
unittest.mock.patchto mockhttpx.AsyncClientorChatOpenAI:
import unittest
from unittest.mock import AsyncMock, patch
from main import app
from httpx import AsyncClient, ASGITransport
class TestObservabilityAPI(unittest.IsolatedAsyncioTestCase):
async def test_health_endpoint(self):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
resp = await client.get("/health")
self.assertEqual(resp.status_code, 200)
self.assertEqual(resp.json()["status"], "healthy")
4. Test Execution Runbook
# 1. Run all test suites across the monorepo
make test
# 2. Run Go backend and database unit tests
make test-go
# 3. Run Python Observatory test suite
make test-py
# 4. Run dedicated AI Agent & Tool-Calling RAG test suite
make test-agents
# 5. Run targeted Go package test
go test -v ./backend/handlers/...
# 6. Run single Python test file
cd agentic-observatory && uv run python -m unittest test_observability.py
5. Pre-Commit Verification
Always run make test and make test-agents before staging and committing any code changes.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: MishraShardendu22
- Source: MishraShardendu22/agent-skills
- License: MIT
- Homepage: https://github.mishrashardendu22.is-a.dev
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.