Skip to content

Documentation Test Suite

Toda documentação deve ser correta, atualizada e executável, com exemplos que funcionam exatamente como descrito. Esta suite valida que guias, API docs e tutoriais refletem a realidade atual do sistema. Cobertura: 50+ testes | Prioridade: MÉDIA

README Accuracy

  • Documentation reflects current version (5 testes)
  • Installation steps work (5 testes)
  • Quick start example executes (5 testes)
  • Links are not broken (5 testes)
  • No deprecated information (3 testes)

Expectativa: README is golden source of truth

Example Test

Given: README.md with "go build ./cmd/vectora"
When: Executed in repo
Then: Binary created successfully
And: --version flag works
And: Help text shows all commands

API Documentation

  • All endpoints documented (10 testes)
  • Request/response examples correct (8 testes)
  • Parameter descriptions accurate (8 testes)
  • Error codes documented (5 testes)
  • Rate limits specified (3 testes)

Expectativa: API docs 100% complete and accurate

Code Examples Correctness

  • Setup guide example executes (8 testes)
  • Tutorial code runs without modification (8 testes)
  • Code snippets in docs are valid (8 testes)
  • Example outputs match actual output (5 testes)
  • CLI help text matches docs (3 testes)

Expectativa: All examples copy-paste-executable

Code Examples Verification Test

Given: docs/examples/search.md with code snippet
When: Code copied and executed
Then: Output matches example output
And: No import errors
And: No compilation errors

CLI Help & Usage

  • Help text is complete (5 testes)
  • Command examples provided (5 testes)
  • Flag descriptions clear (5 testes)
  • Error messages helpful (3 testes)
  • Man pages accurate (2 testes)

Expectativa: vectora --help shows accurate information

Godoc Documentation

  • All exported functions documented (15 testes)
  • Examples in Godoc (5 testes)
  • Type descriptions clear (5 testes)
  • Package overview complete (3 testes)

Expectativa: godoc pages are readable and complete

Setup Guide Verification

  • Prerequisites listed (3 testes)
  • Installation instructions accurate (5 testes)
  • Configuration guide complete (5 testes)
  • Troubleshooting covers common issues (5 testes)
  • Link to support/issues (2 testes)

Expectativa: New user can setup without external help

Tutorial Walkthrough

  • Tutorial follows narrative flow (3 testes)
  • Each step produces expected output (8 testes)
  • Prerequisites clearly stated (2 testes)
  • Concepts explained before use (3 testes)
  • Summary reinforces learning (2 testes)

Expectativa: User completes tutorial in < 30 min


Documentation Quality Metrics

MetricAlvo
Completeness100%
Accuracy100%
FreshnessUpdated with releases
Examples Executable100%
Links Working100%
Readability> 80% (Flesch scale)

Maintenance Schedule

  • Review docs with each release
  • Update examples quarterly
  • Check for broken links monthly
  • Gather user feedback on docs
  • Update troubleshooting section quarterly
  • Archive outdated versions

External Linking

ConceitoRecursoLink
Documentation Best PracticesStyle Guidedevelopers.google.com/style
Markdown Best PracticesWritingmarkdownlint.com
API DocumentationOpenAPIopenapis.org/
Godoc StandardsGo Officialpkg.go.dev/github.com/golang/go/wiki/CodeReviewComments
Technical WritingGoogle Guidedevelopers.google.com/tech-writing