Skip to content

Add spanish translation and update some terms #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ makes writing good tests a challenge.

Selenium provides tools to make functional user interaction easier,
but does not help you write well-architected test suites.
In this chapter we offer advice, guidelines, and recommendations.
In this chapter we offer advice, guidelines, and recommendations
on how to approach functional web page automation.

This chapter records software design patterns popular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@ chapter: true
weight: 7
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}

# Guías y recomendaciones

A note on "Best Practices": We've intentionally avoided the phrase "Best
Practices" in this documentation. No one approach works for all situations.
We prefer the idea of "Guidelines and Recommendations". We encourage
you to read through these and thoughtfully decide what approaches
will work for you in your particular environment.
Una nota sobre "Mejores prácticas": hemos evitado
intencionalmente la frase "Mejores Prácticas" en esta
documentación. Ningún enfoque funciona para todas las
situaciones. Preferimos la idea de "Directrices y
recomendaciones". Te alentamos a leer a través de estos y
decidir cuidadosamente cuales enfoques funcionarían para ti en tu
entorno particular.

Functional testing is difficult to get right for many reasons.
As if application state, complexity, and dependencies do not make testing difficult enough,
dealing with browsers (especially with cross-browser incompatibilities)
makes writing good tests a challenge.
Las pruebas funcionales son difíciles de realizar por muchas
razones. Como si el estado de la aplicación, la complejidad y
las dependencias no dificultaran las pruebas, tratar con
navegadores (especialmente con incompatibilidades entre
navegadores) hace que escribir buenas pruebas sea un desafío.

Selenium provides tools to make functional user interaction easier,
but does not help you write well-architected test suites.
In this chapter we offer advice, guidelines, and recommendations.
on how to approach functional web page automation.
Selenium proporciona herramientas para facilitar la interacción
funcional del usuario, pero no le ayuda a escribir conjuntos de
pruebas bien diseñados. En este capítulo ofrecemos consejos,
pautas y recomendaciones sobre cómo abordar la automatización
funcional de páginas web.

This chapter records software design patterns popular
amongst many of the users of Selenium
that have proven successful over the years.
Este capítulo registra los patrones de diseño de software
populares entre muchos de los usuarios de Selenium que han
demostrado tener éxito a lo largo de los años.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fait de la rédaction de bons tests un défi.

Selenium fournit des outils pour faciliter l'interaction fonctionnelle des utilisateurs,
mais ne vous aide pas à écrire des suites de tests bien conçues.
Dans ce chapitre, nous proposons des conseils, des directives et des recommandations.
Dans ce chapitre, nous proposons des conseils, des directives et des recommandations
sur la façon d'aborder l'automatisation fonctionnelle des pages Web.

Ce chapitre enregistre les modèles de conception de logiciels populaires
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ makes writing good tests a challenge.

Selenium provides tools to make functional user interaction easier,
but does not help you write well-architected test suites.
In this chapter we offer advice, guidelines, and recommendations.
In this chapter we offer advice, guidelines, and recommendations
on how to approach functional web page automation.

This chapter records software design patterns popular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ makes writing good tests a challenge.

Selenium provides tools to make functional user interaction easier,
but does not help you write well-architected test suites.
In this chapter we offer advice, guidelines, and recommendations.
In this chapter we offer advice, guidelines, and recommendations
on how to approach functional web page automation.

This chapter records software design patterns popular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ title: "Evitar compartir estados"
weight: 6
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}
Aunque se menciona en varios lugares, vale la pena mencionarlo
nuevamente. Asegurate de que las pruebas estén aisladas unas de otras.

Although mentioned in several places it is worth mentioning again. Ensure
tests are isolated from one another.
* No compartas datos de prueba. Imagina varias pruebas en la que cada una
consulta a la base de datos para pedidos válidos antes de elegir
uno para realizar una acción. Si dos pruebas eligen el mismo
pedido es probable que obtengas un comportamiento
inesperado.

* Do not share test data. Imagine several tests that each query the database
for valid orders before picking one to perform an action on. Should two tests
pick up the same order you are likely to get unexpected behaviour.
* Limpia los datos obsoletos en la aplicación que podrían ser
recogidos por otra prueba p. ej. registros de pedidos inválidos.

* Clean up stale data in the application that might be picked up by another
test e.g. invalid order records.

* Create a new WebDriver instance per test. This helps ensure test isolation
and makes parallelisation simpler.
* Crear una nueva instancia de WebDriver por prueba. Esto ayuda
a garantizar el aislamiento de la prueba y simplifica la
paralelización.
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,20 @@ title: "Considerar el uso de un API fluída"
weight: 8
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}

Martin Fowler coined the term ["Fluent API"](//www.martinfowler.com/bliki/FluentInterface.html). Selenium already
implements something like this in their `FluentWait` class, which is
meant as an alternative to the standard <code>Wait</code> class.
You could enable the Fluent API design pattern in your page object
and then query the Google search page with a code snippet like this one:
Martin Fowler acuñó el término ["API fluido"](//www.martinfowler.com/bliki/FluentInterface.html).
Selenium ya implementa algo como esto en su clase `FluentWait`, que
se entiende como una alternativa a la clase estándar <code>Wait</code>.
Puedes habilitar el patrón de diseño Fluent API en tu objeto de página
y luego consulta la página de búsqueda de Google con un fragmento de código como este:

```java
driver.get( "http://www.google.com/webhp?hl=en&amp;tab=ww" );
GoogleSearchPage gsp = new GoogleSearchPage();
gsp.withFluent().setSearchString().clickSearchButton();
```

The Google page object class with this fluent behavior
might look like this:
La clase de objeto de página de Google con este comportamiento fluido
podría verse así:

```java
public class GoogleSearchPage extends LoadableComponent<GoogleSearchPage> {
Expand Down Expand Up @@ -51,8 +45,8 @@ public class GoogleSearchPage extends LoadableComponent<GoogleSearchPage> {
@FindBy(id = "gbqfb") private WebElement searchButton;
public GoogleSearchPage(WebDriver driver) {
gspfi = new GSPFluentInterface( this );
this.get(); // If load() fails, calls isLoaded() until page is finished loading
PageFactory.initElements(driver, this); // Initialize WebElements on page
this.get(); // Si load() falla, se llama a isLoaded() hasta que la página termine de cargarse
PageFactory.initElements(driver, this); // Inicializa los WebElements en la pagina
}

public GSPFluentInterface withFluent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ title: "Nueva instancia del navegador por prueba"
weight: 9
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}

Start each test from a clean known state.
Ideally, spin up a new virtual machine for each test.
If spinning up a new virtual machine is not practical,
at least start a new WebDriver for each test.
For Firefox, start a WebDriver with your known profile.
Comienza cada prueba desde un estado limpio conocido.
Idealmente, ejecuta una nueva máquina virtual para cada prueba.
Si ejecutar una nueva máquina virtual no es práctico,
al menos inicia un nuevo WebDriver para cada prueba.
Para Firefox, inicia un WebDriver con su perfil conocido.

```java
FirefoxProfile profile = new FirefoxProfile(new File("pathToFirefoxProfile"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ title: "Generar el estado de la aplicación"
weight: 3
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}
Selenium no debe usarse para preparar un caso de prueba. Todas
las acciones repetitivas y los preparativos para un caso de
prueba deben realizarse a través de otros métodos. Por ejemplo,
la mayoría de las IU web tienen autenticación (por ejemplo, un
formulario de inicio de sesión). Eliminar el inicio de sesión a través
del navegador web antes de cada prueba mejora tanto la
velocidad como la estabilidad de la prueba. Un método debe ser
creado para obtener acceso al AUT* (por ejemplo, usando una API
para iniciar sesión y establecer un cookie). Además, crear
métodos para precargar datos para las pruebas no deben
realizarse con Selenium. Como se mencionó previamente, las API
existentes se deben aprovechar para crear datos para el AUT*.

Selenium should not be used to prepare a test case. All repetitive
actions and preparations for a test case, should be done through other
methods. For example, most web UIs have authentication (e.g. a login
form). Eliminating logging in via web browser before every test will
improve both the speed and stability of the test. A method should be
created to gain access to the AUT* (e.g. using an API to login and set a
cookie). Also, creating methods to pre-load data for
testing should not be done using Selenium. As mentioned previously,
existing APIs should be leveraged to create data for the AUT*.

***AUT**: Application under test
***AUT**: Application Under Test (aplicación bajo prueba)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ reports are popular for importing results to a Continuous Integration
for more information regarding report outputs for several languages.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ reports are popular for importing results to a Continuous Integration
for more information regarding report outputs for several languages.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ title: "Mejores reportes"
weight: 5
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}

Selenium is not designed to report on the status of test cases
run. Taking advantage of the built-in reporting capabilities of unit
test frameworks is a good start. Most unit test frameworks have
reports that can generate xUnit or HTML formatted reports. xUnit
reports are popular for importing results to a Continuous Integration
(CI) server like Jenkins, Travis, Bamboo, etc. Here are some links
for more information regarding report outputs for several languages.
Selenium no está diseñado para informar sobre el estado de los
casos de prueba ejecutados. Aprovechando las capacidades de
reporte incorporadas en la mayoría de los frameworks de pruebas
unitarias es un buen comienzo. La mayoría de los frameworks de
pruebas unitarias tienen utilidades que
pueden generar reportes con formato xUnit o HTML. Los reportes
xUnit son populares para importar resultados a una
integración continua (CI) como Jenkins, Travis, Bamboo, etc.
Aquí hay algunos enlaces para obtener más información sobre la
generación de los reportes para varios lenguajes.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ les rapports sont populaires pour importer des résultats dans une intégration
pour plus d'informations sur les sorties de rapports pour plusieurs langues.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ xUnitレポートは、Jenkins、Travis、Bambooなどの継続的インテグ
いくつかの言語のレポート出力に関する詳細情報へのリンクがあります。
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ reports are popular for importing results to a Continuous Integration
for more information regarding report outputs for several languages.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ reports are popular for importing results to a Continuous Integration
for more information regarding report outputs for several languages.
<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ xUnit报表很受欢迎, 可以将其结果导入到持续集成(CI)服务

<!-- TODO: Add links.-->
[NUnit 3 Console Runner](//github.com/nunit/docs/wiki/Console-Runner)

[NUnit 3 Console Command Line](//github.com/nunit/docs/wiki/Console-Command-Line)

[xUnit getting test results in TeamCity](//xunit.net/docs/getting-test-results-in-teamcity)

[xUnit getting test results in CruiseControl.NET](//xunit.net/docs/getting-test-results-in-ccnet)
[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)

[xUnit getting test results in Azure DevOps](//xunit.net/docs/getting-test-results-in-azure-devops)
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ title: "Mock de servicios externos"
weight: 4
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}

Eliminating the dependencies on external services will greatly improve
the speed and stability of your tests.
Eliminar las dependencias de servicios externos
mejorará en gran medida la velocidad y la estabilidad
de tus pruebas.
Loading