# ¿Cómo realizar pruebas unitarias?

Las pruebas unitarias, que consisten en probar una funcionalidad individual codificada por el equipo que la escribió, son parte del proceso de codificación, no algo diferente. Parte del diseño del código es diseñar cómo se probará. Deberías escribir un plan de pruebas, incluso si es solo una oración. A veces, la prueba será simple: '¿Se ve bien el botón?' A veces será compleja: '¿Este algoritmo de coincidencia devolvió coincidencias precisas?'

Utiliza la verificación de afirmaciones y los controladores de prueba siempre que sea posible. Esto no solo detecta errores temprano, sino que también es muy útil más adelante y te permite eliminar misterios sobre los que de lo contrario tendrías que preocuparte.

Los desarrolladores de Extreme Programming escriben extensamente sobre cómo realizar pruebas unitarias de manera efectiva; no puedo hacer más que recomendar sus escritos.

Siguiente [Tomarse descansos cuando te sientes bloqueado](https://braydie.gitbook.io/how-to-be-a-programmer/es/1-beginner/team-skills/09-take-breaks-when-stumped)


---

# Agent Instructions: 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://braydie.gitbook.io/how-to-be-a-programmer/es/1-beginner/team-skills/08-how-to-unit-test.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.
