All Projects â†’ mmcc007 â†’ Screenshots

mmcc007 / Screenshots

Licence: other
Screenshots: A command line utility and package for capturing screenshots for Flutter

Programming Languages

5743 projects

Projects that are alternatives of or similar to Screenshots

Terraform Automation and Orchestration Tool (Open Source)
Stars: ✭ 148 (-34.22%)
Mutual labels:  continuous-integration, continuous-delivery
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (-3.56%)
Mutual labels:  continuous-integration, continuous-delivery
Gitlab Ci Monitor
A simple dashboard for monitoring GitLab CI builds. Alpha version.
Stars: ✭ 152 (-32.44%)
Mutual labels:  continuous-integration, continuous-delivery
Terraform Aws Cicd
Terraform Module for CI/CD with AWS Code Pipeline and Code Build
Stars: ✭ 138 (-38.67%)
Mutual labels:  continuous-integration, continuous-delivery
Cirrus Ci Docs
Documentation for Cirrus CI 📚
Stars: ✭ 180 (-20%)
Mutual labels:  continuous-integration, continuous-delivery
Continuous Delivery made Easy ;)
Stars: ✭ 143 (-36.44%)
Mutual labels:  continuous-integration, continuous-delivery
In a world where everything is Terraform, teams use Terraform Cloud API to manage their workloads. TECLI increases teams productivity by facilitating such interaction and by providing easy commands that can be executed on a terminal or on CI/CD systems.
Stars: ✭ 158 (-29.78%)
Mutual labels:  continuous-integration, continuous-delivery
Pandoc Action Example
using the pandoc document converter on GitHub Actions
Stars: ✭ 131 (-41.78%)
Mutual labels:  continuous-integration, continuous-delivery
Xrm Ci Framework
xRM CI Framework provides you with the tools automate the build and deployment of your CRM Solution. Using the framework to implement a fully automated DevOps pipeline will allow you to deploy more frequently with added consistency and quality.
Stars: ✭ 172 (-23.56%)
Mutual labels:  continuous-integration, continuous-delivery
🐤 A build monitor with attitude
Stars: ✭ 170 (-24.44%)
Mutual labels:  continuous-integration, continuous-delivery
The CLI tool gluing Git, Docker, Helm, and Kubernetes with any CI system to implement CI/CD and Giterminism
Stars: ✭ 2,814 (+1150.67%)
Mutual labels:  continuous-integration, continuous-delivery
Release engineering, life-cycle management and Continuous Delivery of software platforms and artefacts
Stars: ✭ 199 (-11.56%)
Mutual labels:  continuous-integration, continuous-delivery
Netlify Build runs the build command, Build Plugins and bundles Netlify Functions.
Stars: ✭ 135 (-40%)
Mutual labels:  continuous-integration, continuous-delivery
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (+692.44%)
Mutual labels:  continuous-integration, continuous-delivery
A command-line tool that enables quick build and run deployments over SSH.
Stars: ✭ 131 (-41.78%)
Mutual labels:  continuous-integration, continuous-delivery
Stars: ✭ 2,065 (+817.78%)
Mutual labels:  continuous-integration, continuous-delivery
Delivery Pipeline Plugin
Jenkins plugin for pipeline visualisation, perfect for Continuous Delivery
Stars: ✭ 122 (-45.78%)
Mutual labels:  continuous-integration, continuous-delivery
Run Bitbucket Pipelines locally
Stars: ✭ 127 (-43.56%)
Mutual labels:  continuous-integration, continuous-delivery
Deploy arbitrary static assets through GitHub Actions
Stars: ✭ 169 (-24.89%)
Mutual labels:  continuous-integration, continuous-delivery
Hands On Devops
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7...
Stars: ✭ 196 (-12.89%)
Mutual labels:  continuous-integration, continuous-delivery

pub package Build Status Build status codecov

alt text

A screenshot image with overlaid status bar placed in a device frame.

For an example of images generated with Screenshots on a live app in both stores see:
GitErDone GitErDone

See a demo of Screenshots in action: Screenshots demo

For introduction to Screenshots see


Screenshots is a standalone command line utility and package for capturing screenshot images for Flutter.

Screenshots will start the required android emulators and iOS simulators (or find attached devices), run tests, process the captured screenshots, and drop them off to Fastlane for delivery to both stores.

Screenshots is inspired by three tools from Fastlane:

  1. Snapshots
    This is used to capture screenshots on iOS using iOS UI Tests.
  2. Screengrab
    This captures screenshots on android using Android Espresso tests.
  3. FrameIt
    This is used to place captured iOS screenshots in a device frame.

Since all three of these Fastlane tools do not work with Flutter, Screenshots combines key features of these Fastlane tools into one tool.


Since Flutter integration testing is designed to work transparently across iOS and Android, capturing images using Screenshots is easy.

Features include:

  1. Works with existing tests
    Add a single line for each screenshot.
  2. Run tests on any device
    Select the devices to run on using a convenient config file. Screenshots will find the devices (real or emulated) and run tests.
  3. One run for both platforms
    Screenshots runs tests on both iOS and Android in one run.
    (as opposed to making separate Snapshots and Screengrab runs)
  4. One run for multiple locales
    If app supports multiple locales, Screenshots will optionally set the locales listed in the config file before running each test.
  5. One run for frames
    Optionally places images in device frames in same run.
    (as opposed to making separate FrameIt runs... which supports iOS only)
  6. One run for clean status bars
    Every image that Screenshots generates has a clean status bar.
    (no need to run a separate stage to clean-up status bars)
  7. Works with Fastlane
    Screenshots drops-off images where Fastlane expects to find them. Fastlane's deliver and supply can then be used to upload to respective stores.
  8. Works with FrameIt
    Works with Fastlane's FrameIt text and background feature to add text, etc... to a framed screenshot generated by screenshots.
  9. Works with any attached real devices
    Use any number of real devices to capture screenshots.

Additional automation features:

  1. Screenshots runs in the cloud.
    For live demo of Screenshots running with the internationalized example app on macOS, linux and windows in cloud, see below
  2. Screenshots works with any CI/CD tool.
    For live demo of uploading images, generated by Screenshots, to both store consoles, see demo of Fledge at


On macOS:

brew update && brew install imagemagick
pub global activate screenshots

On linux:

# Debian, Ubuntu or Linux Mint
sudo apt-get install imagemagick
# Fedora, CentOS or RHEL
sudo yum install ImageMagick
# OpenSUSE
sudo zypper install imagemagick

pub global activate screenshots

Note: on linux ImageMagick is often already installed.

On windows:

choco install
pub global activate screenshots

Note: ImageMagick v7 or later is recommended on windows.

If pub is not found, add to PATH using:

On macOS/Linux:

export PATH="<path to flutter installation directory>/bin/cache/dart-sdk/bin:$PATH"

On windows:

set PATH=<path to flutter installation directory>\flutter\bin\cache\dart-sdk\bin;%APPDATA%\Pub\Cache\bin;%PATH%

Note: if running on Windows or Linux, can only run android devices/emulators. To also run on macOS use a CI that supports macOS.



Or, if using a config file other than the default 'screenshots.yaml':

screenshots -c <path to config file>

Other options:

usage: screenshots [-h] [-c <config file>] [-m <normal|recording|comparison|archive>] [-f <flavor>] [-b <true|false>] [-v]

sample usage: screenshots

-c, --config=<screenshots.yaml>                     Path to config file.
                                                    (defaults to "screenshots.yaml")

-m, --mode=<normal|recording|comparison|archive>    If mode is recording, screenshots will be saved for later comparison.
                                                    If mode is comparison, screenshots will be compared with recorded.
                                                    If mode is archive, screenshots will be archived (and cannot be uploaded via fastlane).
                                                    [normal (default), recording, comparison, archive]

-f, --flavor=<flavor name>                          Flavor name.
-b, --build=<true|false>                            Force build and install of app for all devices.
                                                    Override settings in screenshots.yaml (if any).
                                                    [true, false]

-v, --verbose                                       Noisy logging, including all shell commands executed.
-h, --help                                          Display this help information.

Modifying tests for Screenshots

A special function is provided in the Screenshots package that is called by the test to capture a screenshot. Screenshots will then process the images appropriately during a Screenshots run.

To capture screenshots in tests:

  1. Add Screenshots package in app's pubspec.yaml's dev_dependencies section
      screenshots: ^<current version>
  2. In tests
    1. Import the dependency
      import 'package:screenshots/screenshots.dart';
    2. Create the config at start of test
           final config = Config();
    3. Throughout the test make calls to capture screenshots
          await screenshot(driver, config, 'myscreenshot1');

Note: make sure screenshot names are unique across all tests.

Note: to turn off the debug banner, in the integration test's main(), call:

  WidgetsApp.debugAllowBannerOverride = false; // remove debug banner for screenshots


Screenshots uses a configuration file to configure a run.
The default config filename is screenshots.yaml:

# A list of screen capture tests
# Note: flutter driver expects a pair of files eg, main1.dart and main1_test.dart
  - test_driver/main1.dart 
  - test_driver/main2.dart 

# Interim location of screenshots from tests
staging: /tmp/screenshots

# A list of locales supported by the app
  - en-US
  - de-DE

# A map of devices to emulate
    iPhone XS Max:
    iPhone 11 Pro:
      frame: false # no screen avail so frame must be false
    iPad Pro (12.9-inch) (3rd generation):
        - Portrait # default 
        - LandscapeRight
    Nexus 6P:
    SM G965F: # a real attached device (frame and orientation disabled)

# Frame screenshots
frame: true

Device Parameters

Individual devices can be configured in screenshots.yaml by specifying per device parameters.

Parameter Values Required Description
frame true/false optional Controls whether screenshots generated on the device should be placed in a frame. Overrides the global frame setting (see example screenshots.yaml above).
orientation Portrait | LandscapeRight | PortraitUpsideDown | LandscapeLeft optional Controls orientation of device during test. Disables framing resulting in a raw screenshot. Ignored for real devices.
build true(default)/false optional Builds and installs app. When set to false, can be used for pre-installed apps that need to be configured before running tests.

frame parameter notes:

  • images generated for devices where framing is disabled may not be suitable for upload.
  • set to false for devices unknown to screenshots.

orientation parameter notes:

  • multiple orientations can be specified. For example:
        iPhone XS Max:
            - Portrait
            - LandscapeRight
  • landscape orientation disables framing
    This is because status/navigation bars in landscape mode are currently not implemented.
  • orientation on iOS simulators is implemented using an AppleScript script which requires granting permission on first use.

Test Options

In addition to using the default flutter driver mode, tests can also be specified using flutter driver parameters. For example:

  - --target=test_driver/main1.dart --driver=test_driver/main1_test1.dart
  - --target=test_driver/main2.dart --driver=test_driver/main2_test1.dart

Record/Compare Mode

Screenshots can be used to monitor any unexpected changes to the UI by comparing the new screenshots to previously recorded screenshots. Any differences will be highlighted in a 'diff' image for review.

To use this feature:

  1. Add a recording directory to screenshots.yaml
    recording: /tmp/screenshots_record
  2. Run a recording to capture expected screenshots:
    screenshots -m recording
  3. Run subsequent Screenshots with:
    screenshots -m comparison
    Screenshots will compare the new screenshots with the recorded screenshots and generate a 'diff' image for each screenshot that does not compare. The diff image highlights the differences in red.

Archive Mode

To generate screenshots for local use, such as generating reports of changes to UI over time, etc... use 'archive' mode.

To enable this mode:

  1. Add an archive directory to screenshots.yaml:
    archive: /tmp/screenshots_archive
  2. Run Screenshots with:
    $ screenshots -m archive

Integration with Fastlane

Since Screenshots is intended to be used with Fastlane, after Screenshots completes, the images can be found in the project at:


Images are in a format suitable for upload via deliver and supply.

Tip: One way to use Screenshots with Fastlane is to call Screenshots before calling Fastlane (or optionally call from Fastlane). Fastlane (for either iOS or Android) will then find the images in the appropriate place.

(For a live demo of using Fastlane to upload screenshot images to both store consoles, see demo of Fledge at

Fastlane FrameIt

iOS images generated by Screenshots can also be further processed using FrameIt's text and background feature.

Adding a device

  1. Confirm device is present in screens.yaml.
  2. Add device to the list of devices in screenshots.yaml.
  3. Confirm a real device is attached, or install an emulator/simulator for device.

If screen is not available, disable framing by setting frame: false for the device.

Config validation

Screenshots will check configuration before running for errors and provide a guide on how to resolve.

Adding a screen

If device does not have a screen in screens.yaml please create an issue to request a new screen.

To submit a new screen please see related README.

Modifying tests based on screenshots environment

In some cases it is useful to know what device, device type, screen size, screen orientation and locale the test is currently running with. To obtain this information use:

final screenshotsEnv = config.screenshotsEnv;

See for related flutter driver issue.


To upgrade, simply re-issue the install command

$ pub global activate screenshots

Note: the Screenshots version should be the same for both the command line and in the pubspec.yaml.

  1. If upgrading the command line version of Screenshots, also upgrade the version of Screenshots in the pubspec.yaml.
  2. If upgrading the version of Screenshots in pubspec.yaml, also upgrade the command line version.

To check the version of Screenshots currently installed:

pub global list

Sample run on Travis and Appveyor

To view Screenshots running with the internationalized example app on macOS and linux in the cloud see:

To view the images generated by Screenshots during a run on travis see:

To view a similar run on windows see:

  • Running Screenshots in the cloud is useful for automating the generation of screenshots in a CI/CD environment.
  • Running Screenshots on macOS in the cloud can be used to generate screenshots when developing on Linux and/or Windows.

Related projects

To run integration tests on real devices in cloud:

To automate releases to both stores:

Issues and Pull Requests

Issues and pull requests are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].