|
1 | 1 | ---
|
2 |
| -title: "When to use Grid" |
| 2 | +title: "Cuando usar el Grid" |
3 | 3 | weight: 4
|
4 | 4 | ---
|
5 | 5 |
|
6 |
| -{{% notice info %}} |
7 |
| -<i class="fas fa-language"></i> Page being translated from |
8 |
| -English to Spanish. Do you speak Spanish? Help us to translate |
9 |
| -it by sending us pull requests! |
10 |
| -{{% /notice %}} |
11 |
| - |
12 |
| - |
13 |
| -Generally speaking, there’s two reasons why you might want to use Grid. |
14 |
| - |
15 |
| -* To run your tests against multiple browsers, multiple versions of browser, |
16 |
| -and browsers running on different operating systems. |
17 |
| -* To reduce the time it takes for the test suite to complete a test pass. |
18 |
| - |
19 |
| -Grid is used to speed up the execution of a test pass by using |
20 |
| -multiple machines to run tests in parallel. For example, if you have a suite of |
21 |
| -100 tests, but you set up Grid to support 4 different machines (VMs or |
22 |
| -separate physical machines) to run those tests, your test suite will complete |
23 |
| -in (roughly) one-fourth the time as it would if you ran your tests sequentially |
24 |
| -on a single machine. For large test suites, and long-running test suite such as |
25 |
| -those performing large amounts of data-validation, this can be a significant |
26 |
| -time-saver. Some test suites can take hours to run. Another reason to boost the |
27 |
| -time spent running the suite is to shorten the turnaround time for test results |
28 |
| -after developers check-in code for the AUT. Increasingly software teams |
29 |
| -practicing Agile software development want test feedback as immediately as |
30 |
| -possible as opposed to wait overnight for an overnight test pass. |
31 |
| - |
32 |
| -Grid is also used to support running tests against multiple runtime |
33 |
| -environments, specifically, against different browsers at the same time. For |
34 |
| -example, a ‘grid’ of virtual machines can be setup with each supporting a |
35 |
| -different browser that the application to be tested must support. So, machine 1 |
36 |
| -has Internet Explorer 8, machine 2, Internet Explorer 9, machine 3 the latest |
37 |
| -Chrome, and machine 4 the latest Firefox. When the test suite is run, |
38 |
| -Selenium-Grid receives each test-browser combination and assigns each test to |
39 |
| -run against its required browser. |
40 |
| - |
41 |
| -In addition, one can have a grid of all the same browser, type and version. For |
42 |
| -instance, one could have a grid of 4 machines each running 3 instances of |
43 |
| -Firefox 70, allowing for a ‘server-farm’ (in a sense) of available Firefox |
44 |
| -instances. When the suite runs, each test is passed to Grid which |
45 |
| -assigns the test to the next available Firefox instance. In this manner one |
46 |
| -gets test pass where conceivably 12 tests are all running at the same time in |
47 |
| -parallel, significantly reducing the time required to complete a test pass. |
48 |
| - |
49 |
| -Grid is very flexible. These two examples can be combined to allow |
50 |
| -multiple instances of each browser type and version. A configuration such as |
51 |
| -this would provide both, parallel execution for fast test pass completion and |
52 |
| -support for multiple browser types and versions simultaneously. |
| 6 | +Generalmente hablando, hay dos razones por las cuales podrías querer usar el Grid. |
| 7 | + |
| 8 | + |
| 9 | +* Para ejecutar tus tests contra múltiples navegadores, múltiples versiones de |
| 10 | +navegadores y múltiples navegadores bajo diferentes sistemas operativos. |
| 11 | +* Para reducir el tiempo que tarda en completarse la ejecución de tu suite de test. |
| 12 | + |
| 13 | +El Grid se usa para acelerar la ejecución de los test usando múltiples maquinas |
| 14 | +para ejecutarlos en paralelo. Por ejemplo, si tienes una suite con 100 |
| 15 | +tests, pero configuras el Grid para soportar cuatro maquinas diferentes (ya sean |
| 16 | +maquinas virtuales o maquinas separadas físicamente) para ejecutar los tests, tu |
| 17 | +suite completará la ejecución en aproximadamente una cuarta parte del tiempo que |
| 18 | +habría tardado si se hubiesen ejecutado de manera secuencial en una sola maquina. |
| 19 | +Para suites de test grandes y suites de larga duración, como aquellas que realizan |
| 20 | +gran cantidad de validaciones de datos, puede suponer un gran ahorro de tiempo. |
| 21 | +Algunas suites de test pueden llegar tardar horas en ejecutarse. Otra razón puede |
| 22 | +ser acortar el tiempo de espera para recibir los resultados de los tests cuando los |
| 23 | +desarrolladores suben el código de su aplicación a los entornos de pruebas . Cada |
| 24 | +vez mas equipos de software practican metodologías de desarrollo software Agile |
| 25 | + en las cuales es necesario tener feedback tan rápido como sea posible en lugar |
| 26 | +de esperar durante toda la noche para que los tests finalicen su ejecución. |
| 27 | + |
| 28 | +El Grid también es usado para soportar múltiples ejecuciones de test contra |
| 29 | +múltiples entornos, especialmente, contra diferentes navegadores al mismo tiempo. |
| 30 | +Por ejemplo, un Grid de maquinas virtuales puede ser configurado con cada una |
| 31 | +soportando un navegador diferente, estos navegadores pueden ser aquellos que |
| 32 | +la aplicación deba soportar. Así, la maquina uno tiene Internet Explorer 8, la |
| 33 | +maquina dos Internet Explorer 9, la maquina tres la ultima versión de Chrome |
| 34 | +y la maquina cuatro la ultima versión de Firefox. Cuando la suite de test es |
| 35 | +ejecutada, el Grid de Selenium recibe cada combinación de test-navegador y |
| 36 | +asigna la ejecución al navegador requerido. |
| 37 | + |
| 38 | +Adicionalmente, uno puede tener en el Grid los mismos navegadores, tipos y |
| 39 | +versiones. Por ejemplo podría tener en el Grid cuatro maquinas cada una ejecutando |
| 40 | +tres instancias de Firefox 70, permitiendo así tener una granja de servidores |
| 41 | +(en cierto sentido) de instancias de Firefox. De esta manera cuando se ejecute |
| 42 | +la suite, cada test es pasado al Grid el cual lo asignará a la siguiente instancia |
| 43 | +de Firefox disponible. De esta forma se obtendrían los resultados en los cuales |
| 44 | +doce tests se habrán estado ejecutando todos a mismo tiempo en paralelo, |
| 45 | +reduciendo así significativamente el tiempo que se requiere en completar la |
| 46 | +ejecución de la suite. |
| 47 | + |
| 48 | +El Grid es muy flexible. Estos dos ejemplos pueden ser combinados para permitir |
| 49 | +múltiples instancias de cada tipo de navegador y versión. Configuraciones de este |
| 50 | +tipo permiten proveer una paralelización para completar las ejecuciones mas |
| 51 | +rápidamente y soportar múltiples tipos de navegadores y versiones simultáneamente. |
0 commit comments