WhichAI
← All tasks

Coding

Write tests

Generate unit, integration or end-to-end tests for existing code.

Used an AI for “Write tests”? Add your take.

Vote head-to-head

Community ranking

from coding, reasoning, speed

Nobody has rated an AI for “Write tests” yet, so this order comes from how people rate the abilities the task asks for (coding, reasoning, speed) — not from the task itself. Rate one you have used for “Write tests” and the order starts to reflect it.

  1. ★
    ChatGPT
    OpenAI
    Mostly overall rating
    6.8
    —
  2. 2
    Claude
    Anthropic
    From ability ratings
    6.6
    —
  3. 3
    Gemini
    Google
    Mostly overall rating
    6.5
    —
  4. 4
    Copilot
    Microsoft
    Mostly overall rating
    5.2
    —
  5. 5
    DeepSeek
    DeepSeek
    Mostly overall rating
    5.0
    —
  6. 5
    Meta AI
    Meta
    Mostly overall rating
    5.0
    —
  7. 5
    Grok
    xAI
    Mostly overall rating
    5.0
    —
  8. 5
    Perplexity
    Perplexity AI
    Mostly overall rating
    5.0
    —
  9. 5
    Mistral
    Mistral AI
    Mostly overall rating
    5.0
    —

Start with this prompt

Written for this task. Fill in the bracketed parts.

Write tests for the code below using [test framework].

Cover the happy path, the edge cases, and the failure modes. I care more about
tests that would actually catch a regression than about coverage percentage.

For each test, a one-line comment on what breakage it's guarding against. Tell
me anything you found untestable as written, and why.

---
[paste the code]

Try another task