Receber por email
← Voltar para o catálogo

test-writing

Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.

35estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add KarmaloopAI/Jiva

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/test-writing/svg)](https://www.skillteca.com.br/skills/test-writing)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Test Writing Skill

Overview

Create thorough test coverage for software components.

Workflow

  1. Analyze Code: Understand what needs testing
  2. Identify Test Cases:
  3. Happy path scenarios
  4. Edge cases
  5. Error conditions
  6. Boundary values
  7. Write Tests: Create test files following project conventions
  8. Verify: Run tests to ensure they pass
  9. Document: Add test descriptions

Test Types

Unit Tests

  • Test individual functions/methods
  • Mock dependencies
  • Fast execution
  • High coverage

Integration Tests

  • Test component interactions
  • Real dependencies when possible
  • Test data flow
  • API contracts

End-to-End Tests

  • Test complete user workflows
  • Real environment
  • Critical paths
  • User scenarios

Test Quality Standards

  • Clear test names describing what is tested
  • Arrange-Act-Assert pattern
  • One assertion per test (generally)
  • Independent tests (no shared state)
  • Fast and reliable

Tools

  • view: To read code being tested
  • create_file: To create new test files
  • run_terminal_command: To execute test suites
  • grep_search: To find existing tests

Best Practices

  • Test behavior, not implementation
  • Cover edge cases thoroughly
  • Keep tests maintainable
  • Use descriptive test names
  • Don't test framework code
  • Mock external dependencies
Compartilhar X LinkedIn