Skip to content

Commit 12cf749

Browse files
committed
translated up to 4.1
1 parent a16a62d commit 12cf749

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

readme-es.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,37 +1516,37 @@ describe("visual validation", () => {
15161516

15171517
<br/><br/>
15181518

1519-
# Section 4️⃣: Measuring Test Effectiveness
1519+
# Section 4️⃣: Midiendo la efectividad de los Test
15201520

15211521
<br/><br/>
15221522

1523-
## ⚪ ️ 4.1 Get enough coverage for being confident, ~80% seems to be the lucky number
1523+
## ⚪ ️ 4.1 Completa una cobertura suficiente que de confianza, ~80% parece el numero de la suerte
15241524

1525-
:white_check_mark: **Haz:** The purpose of testing is to get enough confidence for moving fast, obviously the more code is tested the more confident the team can be. Coverage is a measure of how many code lines (and branches, statements, etc) are being reached by the tests. So how much is enough? 10–30% is obviously too low to get any sense about the build correctness, on the other side 100% is very expensive and might shift your focus from the critical paths to the exotic corners of the code. The long answer is that it depends on many factors like the type of application — if you’re building the next generation of Airbus A380 than 100% is a must, for a cartoon pictures website 50% might be too much. Although most of the testing enthusiasts claim that the right coverage threshold is contextual, most of them also mention the number 80% as a thumb of a rule ([Fowler: “in the upper 80s or 90s”](https://martinfowler.com/bliki/TestCoverage.html)) that presumably should satisfy most of the applications.
1525+
:white_check_mark: **Haz:** El proposito de los test es tener suficiente confianza para moverse rápido, obviamente cuando más código se pruebe, más confianza tendremos en el equipo. La cobertura nos mide cuantas lineas de código (y ramas, declaraciones, etc) se alcanzan mediante los test. Entonces, cuanta es suficiente? Obviamente 10-30% es demasiado bajo para tener alguna idea de que puedes tener que corregir, y por otro lado el 100% es muy caro y puede cambiar el foco de los caminos criticos a rincones apenas usados del código. La respuesta larga es que depende de muchos dactores como el tipo de aplicación - si estas construyendo la siguiente generación del Airbus A380 un 100% es obligatorio, pero para una web de dibujos animados, el 50% podria hasta ser demasiado. Aunque la mayoria de los entusiastas de los test dicen que el porcentaje de cobertura correcto es contextual, la mayoria de ellos comentan que el 80% como la regla correcta ([Fowler: “in the upper 80s or 90s”](https://martinfowler.com/bliki/TestCoverage.html)) que posiblemente debería satisfacer la mayotia de aplicaciones.
15261526

1527-
Implementation tips: You may want to configure your continuous integration (CI) to have a coverage threshold ([Jest link](https://jestjs.io/docs/en/configuration.html#collectcoverage-boolean)) and stop a build that doesn’t stand to this standard (it’s also possible to configure threshold per component, see code example below). On top of this, consider detecting build coverage decrease (when a newly committed code has less coverage) — this will push developers raising or at least preserving the amount of tested code. All that said, coverage is only one measure, a quantitative based one, that is not enough to tell the robustness of your testing. And it can also be fooled as illustrated in the next bullets
1527+
Consejos de implementación: es posible que quieras configurar la integracion continua (CI) para que tenga un umbral de cobertura ([Jest link](https://jestjs.io/docs/en/configuration.html#collectcoverage-boolean)) y que pare el pipeline cuando no cumpla el estandar (también es posible configurar el porcentaje por compoente, vease el ejemplo a continuación). Ademas de esto, deberias considerar detectar la bajada de cobertura (cuando un nuevo commit tiene menos cobertura que antes) - esto empujara a los desarrolladores a aumentar o al menos preservar la cantidad de código con test. Y también puede ser engañado como se puestra en los siguientes puntos.
15281528

15291529
<br/>
15301530

1531-
**De lo contrario:** Confidence and numbers go hand in hand, without really knowing that you tested most of the system — there will also be some fear and fear will slow you down
1531+
**De lo contrario:** La confianza y los números van de la mano, sin saber realmente que se ha testeado la mayor parte del sistema - habrá algo de miedo y el miedo te retrasará
15321532

15331533
<br/>
15341534

15351535
<details><summary>✏ <b>Código de Ejemplo</b></summary>
15361536

15371537
<br/>
15381538

1539-
### :clap: Example: A typical coverage report
1539+
### :clap: Example: Un informe de cobertura típico
15401540

1541-
![alt text](assets/bp-18-yoni-goldberg-code-coverage.png "A typical coverage report")
1541+
![alt text](assets/bp-18-yoni-goldberg-code-coverage.png "Un informe de cobertura típico")
15421542

15431543
<br/>
15441544

1545-
### :clap: Ejemplo de cómo hacerlo correctamente: Setting up coverage per component (using Jest)
1545+
### :clap: Ejemplo de cómo hacerlo correctamente: Configurar cobertura por componente (usando Jest)
15461546

1547-
![](https://img.shields.io/badge/🔨%20Example%20using%20Jest-blue.svg "Using Jest")
1547+
![](https://img.shields.io/badge/🔨%20Example%20using%20Jest-blue.svg "Usando Jest")
15481548

1549-
![alt text](assets/bp-18-code-coverage2.jpeg "Setting up coverage per component (using Jest)")
1549+
![alt text](assets/bp-18-code-coverage2.jpeg "Configurar cobertura por componente (usando Jest)")
15501550

15511551
</details>
15521552

0 commit comments

Comments
 (0)