Add ChromeDriver installation instructions for Linux

This commit is contained in:
Angel Perez
2018-03-28 07:57:21 -04:00
parent d2caa85780
commit 20cfaf9c95
2 changed files with 118 additions and 0 deletions

View File

@@ -100,4 +100,63 @@ apt-get update
apt-get install postgresql-9.4
```
## ChromeDriver
To run E2E integration tests, we use Selenium along with Headless Chrome.
On Debian-based distros, the process to get ChromeDriver up and running is not as straightforward as on Mac OS.
To get it working, first install the following packages:
```bash
sudo apt-get update && sudo apt-get install libxss1 libappindicator1 libindicator7 unzip
```
Then you need either Google Chrome or Chromium installed, both are valid.
You can download the former from [here](https://www.google.com/chrome/index.html), while the latter can be installed with the following command:
```bash
sudo apt-get install chromium
```
You can now proceed to install ChromeDriver. First, check out its latest version [here](https://sites.google.com/a/chromium.org/chromedriver/)
Download it the following way:
```bash
wget -N http://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip
```
Unzip it and make it executable like this:
```bash
unzip chromedriver_linux64.zip
chmod +x chromedriver
```
Finally, add the binary to your `$PATH`:
```bash
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
```
Make sure everything's working as expected by running the following command:
```bash
chromedriver --version
```
You should receive an output with the latest version of ChromeDriver. If that's the case, you're good to go!
If you happen to be on an Arch-based distro, installing `chromium` from the `extra` repo will do.
There's also the option to only install ChromeDriver from AUR. If you're using `pacaur`, this will do:
```bash
pacaur -S chromedriver
```
> Now you're ready to go get Consul [installed](../installation.html)!!

View File

@@ -154,4 +154,63 @@ Y por último para comprobar que todo esta bien, lanza los tests:
bundle exec rspec
```
## ChromeDriver
Para realizar pruebas de integración, usamos Selenium junto a Headless Chrome.
En distribuciones basadas en Debian, el proceso de instalar ChromeDriver no es tan sencillo como en Mac OS.
Para ello, primero instala los siguientes paquetes:
```bash
sudo apt-get update && sudo apt-get install libxss1 libappindicator1 libindicator7 unzip
```
Ahora necesitarás Google Chrome o Chromium. Ambas opciones son válidas.
Puedes instalar el primero haciendo click [acá](https://www.google.com/chrome/index.html), mientras que el segundo puede ser instalado de la siguiente manera:
```bash
sudo apt-get install chromium
```
Ahora puedes instalar ChromeDriver. Primero, comprueba su última versión haciendo click [acá](https://sites.google.com/a/chromium.org/chromedriver/)
Descárgalo ejecutando el siguiente comando:
```bash
wget -N http://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip
```
Descomprimelo y hazlo ejecutable:
```bash
unzip chromedriver_linux64.zip
chmod +x chromedriver
```
Finalmente, añade el binario a tu `$PATH`:
```bash
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
```
Asegúrate de que todo funciona como es debido ejecutando el siguiente comando:
```bash
chromedriver --version
```
Deberías recibir un mensaje indicando la última versión de ChromeDriver. Si ese es el caso, está todo listo
Si te encuentras usando una distro basada en Arch, instalando `chromium` desde el repositorio `extra` debería ser suficiente
También tienes la opción de solo instalar ChromeDriver desde AUR. Si usas `pacaur`, ejecuta el siguiente comando:
```bash
pacaur -S chromedriver
```
> Ya estás listo para [instalar Consul](../installation.html)!!