CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/test-code-conventions

Pure-reference catalog of test-code conventions: AAA structure (Arrange / Act / Assert), per-test single-responsibility, descriptive naming (`{sut}_{scenario}_{expected}`), assertion specificity, mocking rationale (state vs behavior, fake vs mock), fixture-coupling rules, the magic-number / hard-coded-string anti-patterns, and step design (§11: FIRST principles, step granularity, the mechanical → page → business abstraction layers, the rule-of-three extraction heuristic, declarative phrasing); the E2E selector-priority, web-first-assertion, and step-grouping conventions live in references/. Use as the shared rule book a test-code review cites back to, or as onboarding for what makes a test code-reviewable; to score a test's quality on weighted axes use test-design-scorecard, and for setup/teardown isolation specifically use test-isolation-patterns.

88

Quality

88%

Does it follow best practices?

Impact

Average score across 10 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Evaluation results

Failed

A playlist test failure never tells us which operation broke

Failed

Account tests only pass in the order they are written

Failed

Approval tests describe our columns, not our rules

Failed

Cart tests pass but do not pin anything down

Failed

Every new field on a shipping quote costs us five more tests

Failed

Order tests assert that we called our own code

Failed

Payroll tests stayed green through a rate change

Failed

Subscription tests are unreadable in the CI log

Failed

The checkout tests read like a macro recording

Failed

The ticket tests have helpers nobody can reason about

Agent
Claude Code
Model
Claude Sonnet 4.6