Council LogoCouncil
coding•6 prompts

Test Writing Prompts

Good tests catch bugs before users do. These prompts help you write tests that give confidence without being brittle.

1. Unit Test Generation

Best: Claude
Write unit tests for this function: [paste function]. Cover: happy path, edge cases, error conditions, boundary values, and type edge cases. Use [Jest/pytest/etc.] syntax. Each test should be independent and clearly named.
Test behavior, not implementation. Tests should survive refactoring.

2. Integration Test

Best: Claude
Write an integration test for this flow: [describe flow]. Components involved: [list them]. The test should verify: correct component interaction, data flow between components, and error handling across boundaries.
Integration tests catch issues unit tests miss. Test the seams.

3. E2E Test Scenarios

Best: Claude
Create E2E test scenarios for [feature/page]. Include: critical user flows, edge cases users might encounter, cross-browser considerations, and performance thresholds. Write in [Playwright/Cypress/etc.] format.
E2E tests should cover what matters most to users. Don't test everything.

4. Test Data Factory

Best: Claude
Create a test data factory for [entity type]. Include: basic factory function, variations for different scenarios (valid, invalid, edge cases), and builder pattern for customization. Make it easy to create test data.
Good test data factories speed up test writing and reduce duplication.

5. Mock Implementation

Best: Claude
Create mocks for testing code that depends on: [external service/database/API]. The mock should: simulate realistic responses, allow configuring different scenarios, and track calls for assertions.
Mocks should be realistic enough to catch real issues.

6. TDD Walkthrough

Best: Claude
Help me build [feature] using TDD. First, write the failing test based on the requirement: [describe requirement]. Then I'll implement. Then we'll refactor. Guide me through the red-green-refactor cycle.
TDD forces clear thinking about requirements before implementation.

Try These Prompts with Multiple AIs

Get responses from Claude, ChatGPT, Gemini, and more—all at once. Compare which AI handles these prompts best.

Try Council Free

Related Prompt Templates

Code Review Prompts

6 prompts

Debugging Prompts

6 prompts

Refactoring Prompts

6 prompts

Compare AI

  • Claude vs ChatGPT
  • ChatGPT vs Gemini
  • Claude vs Gemini
  • Claude vs DeepSeek
  • ChatGPT vs DeepSeek
  • Claude vs Perplexity
  • ChatGPT vs Perplexity
  • Claude vs Grok
  • ChatGPT vs Grok
  • Gemini vs Grok
  • Gemini vs DeepSeek
  • Gemini vs Perplexity
  • Grok vs DeepSeek
  • Grok vs Perplexity
  • DeepSeek vs Perplexity

AI Models

  • Claude
  • ChatGPT
  • Gemini
  • Grok
  • DeepSeek
  • Perplexity

Best AI For

  • Best AI for Coding
  • Best AI for Writing
  • Best AI for Research
  • Best AI for Business
  • Best AI for Students
  • Best AI for Math
  • Best AI for Data Analysis
  • Best AI for Creative
  • Best AI for SQL
  • Best AI for Essays
  • Best AI for Emails
  • Best AI for Code Review

AI By Industry

  • AI for Developers
  • AI for Marketers
  • AI for Writers
  • AI for Lawyers
  • AI for Entrepreneurs
  • AI for Students
  • AI for Designers
  • AI for Sales
  • AI for Finance
  • AI for Healthcare
  • AI for Educators
  • AI for Consultants

Resources

  • What is an LLM?
  • Prompt Engineering
  • AI Hallucinations
  • Context Window
  • RAG
  • Chain of Thought
  • AI Agents
  • AI Benchmarks
  • About Council

Guides

  • How to Write Emails with AI
  • How to Analyze Data with AI
  • How to Write Code with AI
  • How to Debug Code with AI
  • How to Summarize Docs with AI
  • Is Claude Better Than ChatGPT?
  • Can AI Write Code?
  • Which AI is Best for Coding?
  • Is ChatGPT Plus Worth It?

Alternatives

  • ChatGPT Alternatives
  • Claude Alternatives
  • Gemini Alternatives
  • Perplexity Alternatives
  • Grok Alternatives
  • DeepSeek Alternatives

Features & More

  • AI with Web Search
  • AI Image Generation
  • AI with Long Context
  • AI with Citations
  • AI APIs for Developers
  • Free AI Assistants
  • AI with Reasoning Mode
  • AI Prompt Templates
  • AI Workflows
  • AI by Role
Council LogoCouncil

© 2026 Council AI Inc. All rights reserved.

TermsPrivacy PolicyContact