CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-testing-first-steps

Get test coverage on an Express/Node API fast — the first 5 tests that catch

94

1.26x
Quality

90%

Does it follow best practices?

Impact

100%

1.26x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-5/

{
  "context": "Tests whether the agent uses the provided git log to identify high-churn routes, prioritizes routes handling state changes, deliberately excludes stable/low-risk routes, documents the reasoning in a strategy file, and writes a focused test suite with all required scripts.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "High-churn route tested",
      "description": "Test file targets the /api/tickets endpoint (the most frequently modified route per git history), not only /api/agents or /api/config",
      "max_score": 12
    },
    {
      "name": "Strategy: git history rationale",
      "description": "testing-strategy.md mentions that git commit history (or file change frequency) was used to identify which routes to prioritize",
      "max_score": 12
    },
    {
      "name": "Strategy: state/money routes prioritized",
      "description": "testing-strategy.md explains that routes handling state changes (ticket status affecting SLA) were prioritized because bugs there have real consequences",
      "max_score": 10
    },
    {
      "name": "Strategy: deliberate exclusions named",
      "description": "testing-strategy.md explicitly names at least one route that was deliberately left out (e.g. /api/agents, /api/config) and explains it is stable or low-risk",
      "max_score": 10
    },
    {
      "name": "Strategy: no 100% coverage goal",
      "description": "testing-strategy.md explicitly states that 100% coverage is NOT the goal",
      "max_score": 8
    },
    {
      "name": "Strategy: approach documented",
      "description": "testing-strategy.md describes the testing approach (supertest through HTTP routes, real database, no mocks)",
      "max_score": 8
    },
    {
      "name": "5 or fewer tests",
      "description": "Test file contains 5 or fewer it() / test() blocks",
      "max_score": 8
    },
    {
      "name": "test:coverage script",
      "description": "package.json scripts includes 'test:coverage' with value 'vitest run --coverage'",
      "max_score": 7
    },
    {
      "name": "test:watch script",
      "description": "package.json scripts includes 'test:watch' with value 'vitest'",
      "max_score": 5
    },
    {
      "name": "Conditional listen",
      "description": "src/server.ts guards app.listen() with a NODE_ENV check — does NOT call listen unconditionally",
      "max_score": 7
    },
    {
      "name": "In-memory SQLite",
      "description": "src/db.ts (or equivalent) uses ':memory:' when NODE_ENV === 'test'",
      "max_score": 7
    },
    {
      "name": "No database mock",
      "description": "Test file does NOT use vi.mock or jest.mock on the database module",
      "max_score": 6
    }
  ]
}

evals

tile.json