pluginagentmarketplace/custom-plugin-backend · Archived

testing

Backend testing strategies and test automation. Unit, integration, E2E, and load testing with best practices.

First seen Jan 25, 2026

Installation

$ npx skills add pluginagentmarketplace/custom-plugin-backend --skill testing

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from pluginagentmarketplace/custom-plugin-backend.

npx skills add pluginagentmarketplace/custom-plugin-backend

Browse all from pluginagentmarketplace/custom-plugin-backend

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 3
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,029 B
  • docs SUMMARY.md 124 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Testing Skill

Bonded to: testing-security-agent (Secondary)


Quick Start

# Invoke testing skill
"Write unit tests for my user service"
"Set up integration tests with database"
"Configure load testing with k6"

Testing Pyramid

            /\
           /E2E\       Few, slow, expensive
          /────\
         /Integration\  Some, medium speed
        /────────────\
       /  Unit Tests  \ Many, fast, cheap
      /────────────────\
Type Coverage Speed Cost
Unit 80%+ Fast Low
Integration 60%+ Medium Medium
E2E Critical paths Slow High

Examples

Unit Test (pytest)

import pytest
from unittest.mock import Mock
from app.services.user_service import UserService

class TestUserService:
    @pytest.fixture
    def service(self):
        return UserService(db=Mock())

    def test_get_user_returns_user(self, service):
        service.db.get_user.return_value = {"id": 1, "name": "John"}

        result = service.get_user(1)

        assert result["name"] == "John"
        service.db.get_user.assert_called_once_with(1)

    def test_get_user_raises_when_not_found(self, service):
        service.db.get_user.return_value = None

        with pytest.raises(UserNotFoundError):
            service.get_user(999)

Integration Test

import pytest
from fastapi.testclient import TestClient
from app.main import app
from app.database import get_db

@pytest.fixture
def client(test_db):
    def override_get_db():
        return test_db
    app.dependency_overrides[get_db] = override_get_db
    with TestClient(app) as c:
        yield c

def test_create_and_get_user(client):
    # Create user
    response = client.post("/users", json={"email": "[email protected]"})
    assert response.status_code == 201
    user_id = response.json()["id"]

    # Get user
    response = client.get(f"/users/{user_id}")
    assert response.status_code == 200
    assert response.json()["email"] == "[email protected]"

Load Test (k6)

import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  stages: [
    { duration: '30s', target: 100 },
    { duration: '1m', target: 100 },
    { duration: '30s', target: 0 },
  ],
  thresholds: {
    http_req_duration: ['p(95)<200'],
    http_req_failed: ['rate<0.01'],
  },
};

export default function () {
  const res = http.get('http://localhost:8000/api/v1/users');
  check(res, {
    'status is 200': (r) => r.status === 200,
    'response time < 200ms': (r) => r.timings.duration < 200,
  });
  sleep(1);
}

Troubleshooting

Issue Cause Solution
Flaky tests Race conditions Use mocks, fix async
Slow suite Too many E2E Optimize pyramid
Low coverage Untested edges Add boundary tests

Resources