Skip to main content

Windows 10Pro example

If you have Windows with Docker Desktop installed, skip the first and second step

Prepare Windows on Azure#

Create and sign in to virtual machine on Azure Cloud

In this first step we create a virtual machine with Windows 10 Pro and install Docker.

  • Start on and sign up
  • Create a virtual machine
  • Click on + Add button
  • Select or create a new subscription and select this options
    • Virtual machine name canarytrace
    • Region Germany West Central
    • Image Windows 10 Pro
    • Size 2 vcpus, 8GiB memory
    • Username AzureUser
    • Password AzureUser123
    • Select inbount port RDP
  • Click on Review + create button and next click on Create button

Wait for validation passed message

  • Click on Create button and wait on Your deployment is complete message

  • Show detail of deploy and click on Connect button.

  • Select RDP and download configuration file. Use the configuration file for your favorite RDP client application.

  • To login form username AzureUser and password AzureUser123

  • Your Windows 10 Pro is ready 👏🏻

Azure Windows

Azure Virtual Machine

Install Docker CE Desktop for Windows#

Docker is launched

Docker is launched

Work with Docker#

  • Open Windows PowerShell as admin (not Windows PowerShell ISE)
  • or install git and open program Git Bash
  • check if Docker is ready
# run this command
docker run hello-world
# this is how the output should look like
Hello from Docker!
This message shows that your installation appears to be working correctly.
  • In case you get AH0058: apache2: Could not reliably determine the server’s fully …… do not care about that.

Create docker network#

User-defined bridges provide automatic DNS resolution between containers

docker network create canary

Canarytrace and selenium will be created in the same network and they will recognize each other by their container name.

Run Selenium Standalone#

docker run --name selen --net canary -d -p 5902:5900 -p 4444:4444 -p -v /dev/shm:/dev/shm selenium/standalone-chrome-debug:3.141.59-20200730
  • Open documentation for more information.
  • Open url localhost:4444 in your browser, for example http://localhost:4444 and you should see message Selenium Standalone v.3.141.59

Create your first easy test case#

Go to your home directory and create directory with name demo

  • Create a new file smoke.js and open it.
  • Paste text bellow into file smoke.js and save it.
describe('Smoke monitoring on', () => {
describe('HomePage', () => {
it('open', () => {
const title = 'Electric Cars, Solar & Clean Energy | Tesla'
const titleElm = $(`//title[contains(text(),"${title}")]`)
expect(titleElm.waitForExist({timeoutMsg: "Element title not found. The page couldn't be loaded in time."}))
  • this test script is based on v6 and you can extend the test script.

Create bash script runner#

  • This file simplifies startup of Canarytrace runner.
  • Create a new file and open it.
  • Paste text bellow into file and save it.
# Save this script to
docker run --name canary --rm -i \
-e SPEC=smoke.js \
--net canary \
-v C:/Users/AzureUser/demo:/tmp/canary-tests \
  • In some cases when you are not using TTY replace -i to ti in first line like docker run --name canary --rm -ti \

Your directory now looks like

Docker is launched


  • docker run --name canary --rm -ti run a docker container with the name canary, output will be printed to stdout and the container will be deleted at the end of the test.
  • -e SPEC=smoke.js define your test case.
  • -e AT_DRIVER_HOST_NAME=selen name container with selenium standalone
  • --net canary network name
  • -v C:/Users/AzureUser/demo:/tmp/canary-tests mount place when I have the test case (=smoke.js) and the runner ( to the path in the docker container
  • container image in format maintainer/name_docker_image:version. Check out repository for latest docker image

Run your first test case#

Run Canarytrace with test case

either via built-in PowerShell as admin (preferred way):

PS C:\Users\AzureUser\demo> .\

or via Git Bash

$ ./

allow sharing of C:\Users\AzureUser\demo directory when asked for

Output from Canarytrace ends as follows

[chrome 76.0.3809.87 linux #0-0] Spec: /tmp/canary-tests/
[chrome 76.0.3809.87 linux #0-0] Running: chrome (v76.0.3809.87) on linux
[chrome 76.0.3809.87 linux #0-0] Session ID: 3d6139ff33294d71664603e6613c3a05
[chrome 76.0.3809.87 linux #0-0]
[chrome 76.0.3809.87 linux #0-0] Smoke monitoring on
[chrome 76.0.3809.87 linux #0-0] HomePage
[chrome 76.0.3809.87 linux #0-0] ✓ open
[chrome 76.0.3809.87 linux #0-0]
[chrome 76.0.3809.87 linux #0-0] 1 passing (2.2s)
Spec Files: 1 passed, 1 total (100% completed) in 00:00:04

When you are done using Canarytrace

# stop selen container
$ docker container stop selen
# remove docker network
$ docker network rm canary