> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-pt/guias-do-contribuidor/testing-standards.md).

# Padrões de Teste

Esta seção descreve a forma como os testes são realizados nos diferentes serviços e UIs através dos projetos Decentraland.

As palavras-chave "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" e "OPTIONAL" neste documento devem ser interpretadas conforme descrito em [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).

## Visão geral

Testes são uma parte crítica do nosso processo de desenvolvimento. Mantemos padrões elevados de cobertura e qualidade de testes em todos os nossos projetos. Esta documentação fornece diretrizes abrangentes para:

* [**Escrever Testes**](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/writing-tests.md) - Princípios e padrões gerais para escrever testes claros e fáceis de manter
* [**Testar UIs**](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/testing-uis.md) - Testar componentes React, sagas do Redux, reducers, selectors e action creators
* [**Testing Services (Well-Known-Component)**](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/testing-services-wkc.md) - Testar serviços modulares construídos com a arquitetura well-known-component
* [**Testar Serviços (Depreciado)**](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/testing-services-deprecated.md) - Abordagem legada para testar serviços (para referência)
* [**Testes End-to-End**](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/testing-e2e.md) - Testes E2E com Cypress (Trabalho em Andamento)

## Filosofia de Testes

Nossa abordagem de testes enfatiza:

* **Clareza** - Os testes devem ser autoexplicativos e fáceis de entender
* **Manutenibilidade** - Os testes devem ser fáceis de atualizar quando os requisitos mudarem
* **Isolamento** - Cada teste deve rodar de forma independente sem afetar os outros
* **Cobertura** - Todos os caminhos críticos e casos de borda devem ser testados
* **Valor** - Os testes devem proporcionar confiança de que o código funciona conforme esperado

## Links rápidos

* [Como descrever contextos com `describe`](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/writing-tests.md#describing-and-building-context)
* [Como escrever expectativas com `it`](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/writing-tests.md#describing-expectations-and-executing-code)
* [O que testar e quando](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/writing-tests.md#what-to-test)
* [Quando e como simular (mock)](/contributor/contributor-pt/guias-do-contribuidor/testing-standards/writing-tests.md#when-to-mock)

## Related Standards

* [Gerenciamento de Dependências](/contributor/contributor-pt/guias-do-contribuidor/dependency-management.md) - Gerenciando dependências npm e peerDependencies
* [Padrões de UI](https://github.com/decentraland/docs/blob/main/contributor/contributor-guides/ui-standards/README.md) - Padrões do Redux e RTK Query
* [Documentação da API](/contributor/contributor-pt/guias-do-contribuidor/api-documentation.md) - Padrões de documentação OpenAPI


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decentraland.org/contributor/contributor-pt/guias-do-contribuidor/testing-standards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
