- What is a Werbdriver.IO
- How to write our first Webdriver.IO test script
- How to deploy into Kubernetes
Canarytrace is a dockerized stack for testing and monitoring vitality of web applications. Use a test frameworks mocha and Webdriver.IO and if you have some test cases for Webdriver.IO, you can run them in Canarytrace. Canarytrace does not change the Webdriver.IO code in any way.
Canarytrace adds features for non-invasive / agent-less monitoring of performance and high availability of web applications, equipment for undistorted and accurate measurements from cloud and without vendor-lock e.g. Kubernetes deployments, live reporting a lot of data from a browser for investigation of performance issues, implements tools such as Lighthouse for performance audit, settings for Elasticsearch and Kibana for the operators, testers or managers.
For user-journey Canarytrace use Webdriver.io
WDIO for start
goog:chromeOptions use these flags, which help faster start the browser.
Canarytrace can run in modes
user-journey and only user-jourey mode use Webdriver.io monitor script. Monitor script is useful for monitoring user flow, e.g. buying process.
- Write your first monitor script for test framework Webdriver.io
- Push your test case in your Git repository
- Setup Git environment variables in your
- Run Canarytrace in Kubernetes and your Git repository will be pulled automatically into Docker container with Canarytrace. In the next step will switch onto your monitor script by Git revision and will be run.
If you want monitoring user journey, you must prepare test case / monitoring script based on testing framework Webdriver.io.
1). Install node.js
- Please use LTS (recommended version) of Node.js
2). Install Webdriver.IO
- Prepare package.json
npm init --yes
- Install Webdriver.IO
npm install @wdio/cli --save
- For more info: Getting Started with Webdriver.IO
3). Configuration of Webdriver.IO
- run configuration
npx wdio config
4). Configuration steps
Where is your automation backend located?= select
On my local machineand confirm
Which framework do you want to use?= select
Do you want to use a compiler?= select
Where are your test specs located?only confirm
Do you want WebdriverIO to autogenerate some test files?type
Do you want to use page objectstype
Which reporter do you want to use?= select
Do you want to add a service to your test setup?= select
What is the base url?= only confirm
Do you want me to run npm install?= yes
🎉 Great, Webdriver.IO is ready with including a demo test.
What is installed?
node_modulesdependencies and packages
package.jsonversion of dependencies
testcontains our first demo test case
- In this same directory run your test
npx wdio run wdio.conf.js
More info on Webdriver.IO documentation
Canarytrace is designed for running in a Kubernetes and we have ready deployment objects.
1). Create namespace
kubectl create namespace canarytrace
2). Deploy your private ssh key to Kubernetes
- Create ssh key withtout passphrase via
- Upload public key
/Users/rdp/.ssh/id_ed25519.pubto your Github
- Create secret, which will contains your private ssh key
- Download and edit
user-journey.yamlfrom Canarytrace Docker image.
- Create deployment
kubectl -n canarytrace create -f canarytrace.yaml
This ENV are useful for setup Canarytrace behavior, switch edition, setup credentials to repository or elasticsearch etc. Some ENV have a default value, there's no need to set them.
USER- username used in your test case via
PASS- password used in your test case via
BASE_URL- start URL and in test use only
and in your test case use only
/ in browser.url() method
Do you find mistake or have any questions? Please create issue, thanks 👍