Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
vudovn avatar

Testing Patterns

  • 155 installs
  • 8.1k repo stars
  • Updated August 4, 2026
  • vudovn/antigravity-kit

Use testing-patterns for development tasks

About

testing-patterns: A skill skill for development. This skill provides functionality for development workflows.

  • testing-patterns

Testing Patterns by the numbers

  • 155 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #2,447 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/vudovn/antigravity-kit --skill testing-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs155
repo stars8.1k
Last updatedAugust 4, 2026
Repositoryvudovn/antigravity-kit

What it does

Use testing-patterns for development tasks

Files

SKILL.mdMarkdownGitHub ↗

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 (<100ms)
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.

Related skills

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.