isonic1 / flick

A CLI with helpful QA tools for Android (Devices & Emulators) and iOS (Devices).
MIT License
101 stars 26 forks source link

FLICK

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

Features

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

Android

iOS

Known Issues

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            
manager    Manage apps on devices           
screenshot Take a screenshot                
video      Record video             
vitals     Android Only! Get apps and device vitals - App Memory Used, App CPU %. System Stats: (User, System, IQW, IRQ)
applitools Validate images with Applitools 

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 -p android -n com.awsome-package.name

$ flick applitools --help
  $ flick applitools -p android --appName Twitter --testName Messages 

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

License

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