question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[contribution] Docker + Nightwatch + Chromedriver + Screen recording support

See original GitHub issue

Hi, first, thanks to @beatfactor and all the Nightwatch.js contributors. This is an excellent software that makes writing reliable e2e tests easy and maintainable.

I’d like to share a collection of Docker images and one NodeJs library, that we use to integrate Nightwatch.js in our dockerized Continuous Integration environment:

The setup is as easy as this docker-compose.yml file, this nightwatch.json file and this Nightwatch.js globals file.

Running tests has Docker (+ Docker Compose) as the only requirement (no Java, NodeJS or any other runtime environment required on the test machine) and is done with a simple Docker Compose command:

docker-compose run --rm nightwatch

This runs the specified Nightwatch.js tests against the current version of Chromium. Chromium runs in a separate Docker container with Chromedriver, (optional) VNC debugging support and an exposed Xfvb server.

The setup automatically creates screen recordings (MP4 video files via FFMPEG x11grab) of individual test modules and keeps those with failing test cases.

The whole setup doesn’t require any Java Runtime Environment in the Docker containers and therefore has much smaller (< 50%) Docker image sizes than the official Docker Selenium setup.
image. More than half the image size is due to the inclusion of ffmpeg, which is required for the screen recording capabilities:

REPOSITORY                         TAG      IMAGE ID       CREATED        SIZE
blueimp/nightwatch                 latest   98e69f595621   13 hours ago   76.4 MB
blueimp/chromedriver               latest   868ca3dc1f7e   17 hours ago   391.5 MB
selenium/standalone-chrome-debug   latest   df941c594b0a   3 weeks ago    865.3 MB

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:39
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
beatfactorcommented, Nov 16, 2016

Thanks for this, but the Mailing List is the appropriate place for discussions and will benefit more from having this posted there. The GitHub Issues list is only meant for submitting bugs and feature requests.

1reaction
blueimpcommented, Jan 13, 2020

@brendantschuy I can’t provide any support, but you can check out the latest version of my NightwatchJS Docker setup before the deprecation via the previous commit ID: https://github.com/blueimp/nightwatch/tree/8572509f6dbc7ae0cc378f490a60cfdb2c606313

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome Driver | Developer Guide - Nightwatch.js
Run your Nightwatch.js tests in Chrome using ChromeDriver. In this guide, you will learn about: Downloading ChromeDriver; Supported Chrome capabilities ...
Read more >
Nightwatch tests fail when running in docker using selenium ...
When running the tests with the test-selenium command I am using the nightwatch.conf below: const chromedriver = require("chromedriver"); ...
Read more >
Take a screenshot or record your screen - Chromebook Help
You can take a screenshot or record a video of your Chromebook's screen. After you capture your screen, you can view, edit, delete,...
Read more >
Setting up your own test automation environment
See Platforms Supported by Selenium for more information on where to ... If you want different options, webdriver.io and nightwatch.js are ...
Read more >
Record, replay, and measure user flows - Chrome Developers
Record, replay, measure user flows, and edit their steps with the Recorder panel.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found