agentsclimarketplace

Testing patterns

Skill VoDaiLocz/kilo-kit-mcp/skills/engineering/testing-patterns

An MCP server for safer coding agents: skill routing, C4 workflow gates, memory checks, and verification before completion.

Install
npx -y skills add VoDaiLocz/kilo-kit-mcp --skill testing-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 24 stars24 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Testing patterns and principles. Unit, integration, mocking strategies.

SKILL.md

3.4 KB, 810 tokens by cl100k_base, as published. Nobody here has run it

Testing Patterns

Principles for reliable test suites.


1. Testing Pyramid

        /\          E2E (Few)
       /  \         Critical flows
      /----\
     /      \       Integration (Some)
    /--------\      API, DB queries
   /          \
  /------------\    Unit (Many)
                    Functions, classes

2. AAA Pattern

StepPurpose
ArrangeSet up test data
ActExecute code under test
AssertVerify outcome

3. Test Type Selection

When to Use Each

TypeBest ForSpeed
UnitPure functions, logicFast (<50ms)
IntegrationAPI, DB, servicesMedium
E2ECritical user flowsSlow

4. Unit Test Principles

Good Unit Tests

PrincipleMeaning
Fast< 100ms each
IsolatedNo external deps
RepeatableSame result always
Self-checkingNo manual verification
TimelyWritten with code

What to Unit Test

TestDon't Test
Business logicFramework code
Edge casesThird-party libs
Error handlingSimple getters

5. Integration Test Principles

What to Test

AreaFocus
API endpointsRequest/response
DatabaseQueries, transactions
External servicesContracts

Setup/Teardown

PhaseAction
Before AllConnect resources
Before EachReset state
After EachClean up
After AllDisconnect

6. Mocking Principles

When to Mock

MockDon't Mock
External APIsThe code under test
Database (unit)Simple dependencies
Time/randomPure functions
NetworkIn-memory stores

Mock Types

TypeUse
StubReturn fixed values
SpyTrack calls
MockSet expectations
FakeSimplified implementation

7. Test Organization

Naming

PatternExample
Should behavior"should return error when..."
When condition"when user not found..."
Given-when-then"given X, when Y, then Z"

Grouping

LevelUse
describeGroup related tests
it/testIndividual case
beforeEachCommon setup

8. Test Data

Strategies

ApproachUse
FactoriesGenerate test data
FixturesPredefined datasets
BuildersFluent object creation

Principles

  • Use realistic data
  • Randomize non-essential values (faker)
  • Share common fixtures
  • Keep data minimal

9. Best Practices

PracticeWhy
One assert per testClear failure reason
Independent testsNo order dependency
Fast testsRun frequently
Descriptive namesSelf-documenting
Clean upAvoid side effects

10. Anti-Patterns

❌ Don't✅ Do
Test implementationTest behavior
Duplicate test codeUse factories
Complex test setupSimplify or split
Ignore flaky testsFix root cause
Skip cleanupReset state

Remember: Tests are documentation. If someone can't understand what the code does from the tests, rewrite them.

What ships with it: 1 file

6.9 KB alongside SKILL.md, 1 of them executable

scripts/

Gives 0 of the 12 instructions most test skills give in 810 tokens

Counted across 964 of the 1,571 authors here whose files we hold, read 2026-08-07

  • Close the browser when donein 55 of 964, across 12 files
  • Wait for network idle statein 51 of 964, across 6 files
  • Launch Chromium in headless modein 49 of 964, across 6 files
  • Use descriptive selectors for elementsin 49 of 964, across 6 files
  • Run provided scripts with help flag firstin 49 of 964, across 6 files
  • Add appropriate explicit waitsin 48 of 964, across 5 files
  • Use bundled scripts as black boxesin 46 of 964, across 3 files
  • Do not read script source codein 46 of 964, across 3 files
  • Use sync playwright for scriptsin 46 of 964, across 3 files
  • Inspect dom before executing actionsin 46 of 964, across 3 files
  • Run the full test suitein 37 of 964
  • Write the failing test firstin 29 of 964, across 23 files

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.