Home Manual Reference Source
Manual » Installation

Getting Started

Setup

I want to start now!

  1. Setup Docker and Zalenium as per the steps below.
  2. Run npm install to install dependencies.
  3. Copy the contents of the .env_sample file into a new .env file. Obtain the user/pass for the missing fields.
  4. Run FILE=test/specs/single_browser/login.test.js HOST=localhost npm test (runs a single login test file).

ESLint and Prettier

This repo uses ESLint and Prettier. It should run them pre-commit, but I also recommend to have both of these tools installed/integrated in your editor of choice. For example, with VS Code I have prettier set to run after save so whenever I save a file it will automatically get formatted and I shouldn't have to worry about it anymore.

.env

We use dotenv to pull in environment variable to configure our tests and framework.

In the root there is a file named .env_sample, simply copy the contents to a new file named .env. Ask one of the maintainers about any missing fields or credentials. Without them, MMS API calls will more than likely fail.

.y4m Files (DEPRECATED)

DEPRECATED: WE DON'T NEED .Y4M FILES AT THE MOMENT

We use some chrome options to be able to send local media in place of your webcam. .y4m files are required for this. Download these files:

These are stored in this bucket: https://s3.amazonaws.com/y4mfiles.lifesizecloudbeta.com/.

Place them in the tmp/mounted directory named as they are and the framework will use them.

TODO: Need to link ./tmp/mounted to /tmp/mounted.

Docker Selenium

NOTE: Zalenium is best suited for a *nix platform. It's not fully tested on Windows yet.

To test locally, we are using Docker Selenium, in particular, Zalenium.

To setup, follow these steps:

  1. Install Docker https://docs.docker.com/docker-for-mac/install/
  2. On the command line, verify Docker is running. docker version should suffice.
  3. docker pull elgalu/selenium
  4. docker pull dosel/zalenium
  5. Make sure you are in this directory and run docker-compose up --force-recreate (it reads the docker-compose.yaml file in this directory)
  6. The above command will consume a tab/window of your terminal, so in another one run docker ps to show the VMs. You should see a handful of VMs listed.

From here you effectivily have you local selenium grid up and running. By default, which we set in the docker-compose.yaml, it will run a max of 2 Chrome containers. If box can handle more, or if you don't mind the performance hit, feel free to increase the amount of containers.

With the grid and running, you can view the selenium dashboard at http://localhost:4444/grid/console

For live video of the containers running, see http://localhost:4444/grid/admin/live

You can now run tests against your own local Zalenium/Selenium grid! When running your tests just make sure to set the HOST environment variable to ``localhost.

After your tests run, see http://localhost:4444/dashboard for the video archive of your tests.