Skip to main content
Version: 1.5

Install

The Element Command Line Interface (CLI) is a powerful tool that makes it fast and easy to get started with browser level performance testing with Flood Element. It helps you scaffold a new project, then generate, write, validate, and run your scripts on your local machine. When you're ready, you can upload your test scripts to Flood and be confident they’ll run exactly as expected, just like they did on your local machine.

Choosing Yarn or NPM

We suggest using the Yarn package manager for better performance, however, each command has a compatible NPM equivelant.

Global installation#

First, make sure you have installed the latest version of NodeJS for your platform (MacOS, Windows or Linux).

1.5 release#

yarn
# Install latest version of Element v1
yarn global add element-cli@v1
# Verify installation
element --version

This will install the latest stable version of Element CLI, together with other Element dependencies, globally on your machine.

Local versioning#

If you want to install a specific version of Element to use in a local project, just cd to the project folder, then install by adding a @version-tag, and removing the global (or -g on NPM) keyword.

yarn
# Install Element version 1.5.1
yarn add element-cli@1.5.1
# Verify installation
element --version

For full list of Element versions, visit here. To view the release notes of each version, visit here

Element is smart enough to detect whether you're using a custom version of Element locally or using the global install.

If you add element-cli to your local project package.json, Element will use that version, otherwise, it will default to your global version.

Getting help#

The Element CLI comes with built in help that details the commands and options available. Run:

element help

to see a list of commands and global the Element CLI supports. To get more detailed information about a specific command, and the options it accepts, pass it the --help flag.

For example, to learn more about the run command and the options you can pass in, run:

element run --help

In the next section, we'll talk about how to create your first Element project.