Giter VIP home page Giter VIP logo

flick's Introduction

FLICK

A CLI to capture screenshots, video, logs, device info and device vitals(memory, cpu) for Android (Devices & Emulators) and iOS (Devices).

Features

  • Easily capture screenshots for Android and iOS.
  • Video record real android devices. (OS > 4.4)
    • Extend recording past the 180 seconds SDK limit.
  • Save video formats in mp4 or gif.
  • Flick auto detects if a device is recordable.
    • Falls back to screenshot recording if video record is not available.
  • Video record android emulators and real iOS devices.
    • Takes a screenshot every 0.5 seconds (default), then combines the screenshots into a single mp4 or gif.
    • Android pulls only unique (default) screenshots from devices/emulators. e.g. A 1 minute test run might convert to only 30 seconds of video based on unique images. You can change this by passing -q false to pull all images instead.
    • iOS example here
    • Android Emulator example here
  • Flick auto selects device when only one device is connected, per platform.
  • Save log output for Android or iOS.
  • Display device information or save it to a file.
  • Install or Uninstall applications from devices.
  • Checkout the latest release notes here.

Reason

I wanted an easy way to video record my automation tests for mobile, and I didn't need the video quality to be perfect. Unfortunately, you cannot video record on android emulators, but you can take screenshots! You also cannot video record iOS without using QuickTime, or doing what this did, but it's not maintained anymore.

So I created Flick to work for my needs, and included a couple other tools I use frequently. Hopefully this will be as helpful for others too. It's also a CLI and language-agnostic, it can be used with any framework where you can make a system call. See examples here and here. I suppose there are use cases for this outside of test automation. I'd love to hear them if so.

If you're looking for high-quality video, then this wouldn't be the tool for you. Take a look at this great tool androidtool-mac instead.

Prerequisites

System Tools

  • Install ffmpeg. OSX
    • $ brew install ffmpeg
  • Install mp4box. OSX
    • $ brew install mp4box

Android

iOS

Installation

$ gem install flick

Usage:

$ flick --help

DESCRIPTION:

A CLI to capture screenshots, video, logs, and device info for Android (Devices & Emulators) and iOS (Devices).

COMMANDS:

help       Display global or [command] help documentation
info       Get device information
log        Get device log output
screenshot Take a screenshot
video      Record video

GLOBAL OPTIONS:

-h, --help
  Display help documentation

-v, --version
  Display version information

-t, --trace
  Display backtrace when an error occurs

`$ flick info --help`

	$ flick info -p (ios or android)
	$ flick info -p (ios or android) -s true -o $HOME


`$ flick log --help`

	$ flick log -a start -p (ios or android) -o $HOME -n iosLog
	$ flick log -a stop -p (ios or android)

`$ flick screenshot --help`

	$ flick screenshot -p (ios or android) -o $HOME -n myImage

`$ flick video --help`

	$ flick video -a start -p (ios or android)
	$ flick video -a stop -p (ios or android) -o /output -n myVideo -f gif
	$ flick video -a start -p android -u emulator-5554 -c 1000
	$ flick video -a stop -p android -u emulator-5554

`$ flick manager --help`
	$ flick manager -a install -p (ios or android) -f ~/myApp/my-awesome-app.apk or .app
	$ flick maanger -a uninstall -p (ios or android) -n com.package.name

`$ flick vitals --help`
	$ flick vitals -n com.package.name

##Demo

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/isonic1/flick. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

TODO

  • Dry the code a bit.
  • Setup Flick android for cross platform os's (windows & linux)
  • Add screenshot capture for iOS Simulators.
  • Multithread the screenshot and pull process.
  • Look into capturing video for iOS similar to this

License

The gem is available as open source under the terms of the MIT License.

flick's People

Contributors

isonic1 avatar hillfields avatar

Watchers

James Cloos avatar 恒温 avatar seveniruby avatar

Forkers

jackleitao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.