Skip to content

Web automation and testing on BalenaCloud + WebdriverIO now available on high-performance ARM devices! 🚀

License

Notifications You must be signed in to change notification settings

balena-io-experimental/balena-webdriverio

Repository files navigation

balenaCloud + WebdriverIO using Chromium on ARM Devices

Superior web automation now becomes portable, with high-performance ARM-based devices.

This repository contains code of Getting Started with Webdriverio compatible to run as a service on balenaCloud with any balenaOS ARM device such as BalenaFin, Raspberrypi3 and more. Tested on balenaFin running balenaOS 2.48.0+rev1

Illustration Source: WebdriverIO docs

Chromedriver and Selenium not being available for the ARM architecture. Lead us to work with WebDriverIO for our web automation and testing needs, which uses Chrome DevTools protocol by default. Using Chrome Devtools protocol natively and replacing legacy Webdriver Protocol comes with many benefits. Some being:

  • Lesser dependencies to manage
  • Works natively with major browsers without the need for a driver (even Firefox)
  • Faster, more efficient performance (The communication happens without any proxy, directly to the browser using WebSockets)
  • Be able to test browser performance and much more.

It has cons too which are better explained on WebdriverIO Automation protocols page. Mainly, it can't be used remotely which works out for us as we run everything in containers. Let's get started.

Running WebdriverIO on balenaCloud

  1. Grab a balenaFin, flash with the configuration for the application you just deployed, connect it, and wait for the magic to happen.
  2. Head over to the balenaCloud application to see if your device is online (It take at most 2-5 minutes)
  3. When done, the device would automatically start downloading the latest docker image and when done will run the tests.
  4. You can check the output in the logs on your balenaCloud dashboard

Webdriverio Testrunner running on BalenaFin over on Balena Cloud

The tests will run, open Chromium browser with the arguments provided in the wdio.conf.js file, connect puppeteer with the browser, and execute the tests. In the end, you would see test results over on the terminal. That's about it, now you can modify your tests from the tests folder (Written using Mocha) and explore more into Web automation and Webdriverio. If you are new to balenaCloud as well, we got you covered.

Support & Credits

For any queries or bug reports, feel free to open an issue. Thanks to Christian Bromann for his help!

License

All source code under this repository is MIT licensed.

About

Web automation and testing on BalenaCloud + WebdriverIO now available on high-performance ARM devices! 🚀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published