# Running tests using Docker

<a id="prerequisites">

## Prerequisites

In order to run tests, Docker should be installed.

> **Note**
>
> Running tests using the Docker image is possible for version 3.5.0 or newer.\
> For older versions we recommend using [this approach](nodejs.md).

<a id="running-tests">

## Running tests

These steps allow you to verify if the application works correctly after the first run or an application update:

1. Use instructions from the [Customer Portal](https://portal.ckeditor.com/) to log into the `Collaboration Server On-Premises` Docker Registry and pull the Docker image.

   ```bash
   docker login -u [user] -p [download_token] [registry]
   docker pull [registry]/cs-tests:[version]
   ```

2. Run tests:

   2.1. Normal mode.

   ```bash
   docker run \
    -e APPLICATION_ENDPOINT="[your_app_endpoint]" \
    -e ENVIRONMENTS_MANAGEMENT_SECRET_KEY="[your_env_management_secret_key]" \
    [registry]/cs-tests:[version]
   ```

   2.2. Parallel mode – A faster approach. In case of errors we recommend to run tests using the normal mode.

   ```bash
   docker run \
    -e PARALLEL=true \
    -e APPLICATION_ENDPOINT="[your_app_endpoint]" \
    -e ENVIRONMENTS_MANAGEMENT_SECRET_KEY="[your_env_management_secret_key]" \
    [registry]/cs-tests:[version] -- --max-parallel 6
   ```

3. If there are no errors after finishing the tests, the application is ready to use.

Notes:

* `APPLICATION_ENDPOINT` – An endpoint required to communicate with Collaboration Server On-Premises.
* `ENVIRONMENTS_MANAGEMENT_SECRET_KEY `– A variable set in the Collaboration Server On-Premises configuration.
* There is a possibility that some test will not pass. In this case please run the tests again.

---

Full index of the Cloud Services documentation: [llms.txt](../../../../llms.txt)
