GithubHelp home page GithubHelp logo

isonic1 / flick Goto Github PK

View Code? Open in Web Editor NEW
103.0 11.0 26.0 115 KB

A CLI with helpful QA tools for Android (Devices & Emulators) and iOS (Devices).

License: MIT License

Ruby 99.74% Shell 0.26%

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.
  • Capture device vitals (Android Only) for app and system performance.
    • If anyone knows of a tool to capture performance for iOS please let me know and I'll add it to Flick.
  • 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

Known Issues

  • IOS:

    • Sometimes ideviceinstaller gets out of sync with your OS due to various reasons. When this happens, screenshots and video will not work for iOS.
      • Follow steps in here to uninstall and reinstall dependencies.
      • Make sure xcode and command line tools are up to date.
      • Make sure iOS device is up to date with latest iOS version.
      • Validate your device is paired to your machine. $ idevicepair -u <udid> validate
      • Additionally, try to unpair and pair again.
        • $ idevicepair -u <udid> unpair
        • $ idevicepair -u <udid> pair Accept the Trust popup on the device.
  • Android:

    • Some devices/emulators are read-only. Flick requires access to internal storage of the device/emulator to write files to. If the device is read-only it cannot do this so it will Abort. There is probably a solution to this but I, unfortunately, don't have a lot of time to figure it out. Pull Requests are highly encouragaged if you find this tool useful!

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

  • 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

hillfields avatar isonic1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flick's Issues

[v0.2.1][video][android] Flick can't record video from device.

After updating flick to v0.2.1 I couldn't record video from my Android.

Environment:
Android 4.4.2

Steps:

  1. Connect device to computer (uidd displayed in adb devices)
  2. code in bash: "flick video -a start -p android"

Result:
Message in my bash: "Device is NOT Recordable!!!"

Error "2 input names specified, please check usage" while saving video file in desired path

Dear @isonic1 ,

First of all thank you very much for this solution, this is extremely useful.

I am using Flick version: 0.4.4
I followed your examples example 1 and example 2 but while executing the stop command i am getting this error and it doesn't get copied into the target location.

mkdir: 'sdcard/flick': File exists
Stopping Recorder!!!
Error - 2 input names specified, please check usage
error: No such file or directory @ rb_file_s_rename - (/Users/navneet/.flick/ZX1G42BKJT/Login screen static text check - English.mp4, /path/to/target/location/Login screen static text check - English.mp4). Use --trace to view backtrace
Saving to /path/to/target/location/Login screen static text check - English.mp4

undefined method `split' for nil:NilClass

Hi everybody!
I am having the problem:

 var shell = require('shelljs');
 shell.exec('flick video -p ios -a start -u b540e68bbffcc1bb08bd518f7696a655acb9fc05');

/Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/user_interaction.rb:359:in method_missing': undefined method split' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/checker.rb:5:in which' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/checker.rb:15:in system_dependency'
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:36:in devices' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:41:in devices_connected?'
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:45:in check_for_devices' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:52:in get_device_udid'
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:6:in initialize' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/video.rb:13:in new'
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/video.rb:13:in initialize' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/bin/flick:34:in new'
from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/bin/flick:34:in block (2 levels) in <top (required)>' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/command.rb:182:in call'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/command.rb:153:in run' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/runner.rb:446:in run_active_command'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/runner.rb:68:in run!' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/delegates.rb:15:in run!'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/import.rb:5:in `block in <top (required)>'

Does anyone have a solution to this problem? I was really worried when it took 2 work days to find the answer to it.

Synchronizing the time on the video

Currently the video produced for iOS is displaying 1 photo per second, meaning if I set it to take a photo every 0.5 seconds, I would have a 2 seconds video per 1 second length of the actual recording. This would get even longer if I set it to take a photo every 0.2 seconds and a so on.

It would be great if I can have a video with the correct time length to the actual recording too. Is there any way I can do this?

Flick not working in IphoneX with iOS 11.4.1

Hi All,

I am facing issue with Flick on IphoneX. All generated videos are of 0bytes.

It was working fine on iphone 6.

Command used:
flick video -a start -p ios -u $udid -n test1 -o /Users/digitalhome/Documents/
flick video -a stop -p ios -u $udid -n test1 -o /Users/digitalhome/Documents/

Digitals-MacBook-Pro-2:digitalhome$ ls -lrt /Users/digitalhome/Documents/test1.mp4
-rw-r--r-- 1 digitalhome staff 0 Aug 21 16:41 /Users/digitalhome/Documents/test1.mp4

Can someone help me with this issue?

[Importer] Unknown input file type for "<home_directory>/.flick/emulator-5554/video-emulator-5554-single.mp4"

I am unable to record video on android emulator.

When I start recording using 'flick video -a start -p android -u emulator-5554' then it shows 'Starting Recoder!!!'. But when I stop recording using command 'flick video -a stop -p android -u emulator-5554' then it throws below error:

[Importer] Unknown input file type for "/Users/mymac/.flick/emulator-5554/video-emulator-5554-single.mp4"
Error appending /Users/mymac/.flick/emulator-5554/video-emulator-5554-single.mp4: End Of Stream / File
Saving to /Users/mymac/Project/mobile_automation/end_to_end_tests/emulator-5554.mp4
/Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/flick-0.4.2/lib/flick/video.rb:104:in `rename': No such file or directory @ rb_file_s_rename - (/Users/mymac/.flick/emulator-5554/emulator-5554.mp4, /Users/mymac/Project/mobile_automation/end_to_end_tests/emulator-5554.mp4) (Errno::ENOENT)
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/flick-0.4.2/lib/flick/video.rb:104:in `stop_record'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/flick-0.4.2/lib/flick/video.rb:57:in `stop'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/flick-0.4.2/lib/flick/video.rb:34:in `run'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/flick-0.4.2/bin/flick:33:in `block (2 levels) in <top (required)>'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/command.rb:178:in `call'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/command.rb:153:in `run'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/runner.rb:446:in `run_active_command'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/runner.rb:68:in `run!'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/delegates.rb:15:in `run!'
	from /Users/mymac/.rvm/gems/ruby-2.4.1@mobile/gems/commander-4.4.3/lib/commander/import.rb:5:in `block in <top (required)>'

After starting recorder, I can't see flicker process running in the background
ps -ax | grep flick
30338 ttys000 0:00.00 grep flick

Video Recording not worked fine.

hello,
I used your APIs for video Recoding in Apple devices, IOS 10 or 11 it's not worked fine. recorded video is black or some time video is stuck its not move to next screen

[Android O] flick crashing

Environment:

  • Pixel (Android O)
  • flick 0.4.0 (on 0.3.6 no crash, but working not correctly)
  • sierra 10.12.6

Steps:

  1. run flick on Android O (example flick log -p android -n test -a start)

Actual result:

  • crash:

mkdir: 'sdcard/flick': File exists
/usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/lib/flick/android.rb:30:in create_flick_dirs': undefined method strip' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/lib/flick/android.rb:20:in initialize' from /usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/lib/flick/video.rb:15:in new'
from /usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/lib/flick/video.rb:15:in initialize' from /usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/bin/flick:33:in new'
from /usr/local/lib/ruby/gems/2.4.0/gems/flick-0.4.0/bin/flick:33:in block (2 levels) in <top (required)>' from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/command.rb:178:in call'
from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/command.rb:153:in run' from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/runner.rb:446:in run_active_command'
from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/runner.rb:68:in run!' from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/delegates.rb:15:in run!'
from /usr/local/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/import.rb:5:in `block in <top (required)>'

Video recording on Android kills Appium node instance

Hi @isonic1

Just tried flick video recording feature on real devices.

It works good in the following cases:

  • video recording via cmd on both ios / android platforms;
  • video recording via selenium grid hub with appium node on ios device;

It doesn't work unexpectedly on real android device via selenium grid hub / appium node. When recording is started, it just kills appium node cmd window.

Surprisingly there's nothing special in hub / node logs. Node just stops working.

platform: "ANDROID",
version: "5.1.1",
manufacturer: "samsung",
model: "SM-J200G",
sdk: "22",
host OS: Mac OS X 10.11.6,
appium: 1.6.0

Any idea about the root cause?

flick log/video crash after updating ruby to 2.5

flick: 0.4.3
ruby 2.5.0
libmobiledevice: HEAD
osx: 10.12.6

stacktrace:
flick log -u 010baef62a49f0b -p android -n test -a start --trace /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/user_interaction.rb:334: warning: constant ::Data is deprecated mkdir: 'sdcard/flick': File exists Saving to /Users/jenkins/Desktop/test.log Traceback (most recent call last): 15: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/import.rb:5:in block in <top (required)>' 14: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/delegates.rb:15:in run!' 13: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/runner.rb:68:in run!' 12: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/runner.rb:446:in run_active_command' 11: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/command.rb:153:in run' 10: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/commander-4.4.3/lib/commander/command.rb:178:in call' 9: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/bin/flick:66:in block (2 levels) in <top (required)>' 8: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/log.rb:21:in run' 7: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/log.rb:26:in start' 6: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/log.rb:36:in log' 5: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/log.rb:30:in stop' 4: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/system.rb:37:in kill_process' 3: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/flick-0.4.3/lib/flick/system.rb:17:in find_pid' 2: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/sys-proctable-1.1.5-universal-aix-5/lib/aix/sys/proctable.rb:213:in ps' 1: from /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/sys-proctable-1.1.5-universal-aix-5/lib/aix/sys/proctable.rb:213:in foreach' /Users/jenkins/.rvm/gems/ruby-2.5.0/gems/sys-proctable-1.1.5-universal-aix-5/lib/aix/sys/proctable.rb:213:in open': No such file or directory @ dir_initialize - /proc (Errno::ENOENT)

Argument Error

I am getting below error , please help!

pavans-MacBook-Pro:screen_recording pavan$ flick -t video -a start -p android -u 192.168.56.101:5555 -c 3000
/Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/checker.rb:5: warning: Insecure world writable dir /usr/local in PATH, mode 040777

Starting Recoder!!!
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:128:in initialize': wrong number of arguments (0 for 1+) (ArgumentError) from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/simple_daemon.rb:85:innew'
from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/simple_daemon.rb:85:in daemonize!' from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/video.rb:69:instart_record'
from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/video.rb:45:in start' from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/lib/flick/video.rb:33:inrun'
from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.0/bin/flick:32:in block (2 levels) in <top (required)>' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:incall'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:in call' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:153:inrun'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in run_active_command' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/runner.rb:68:inrun!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in run!' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/import.rb:5:inblock in <top (required)>'

Videos not being renamed/moved correctly after recording.

I'm using the following commands

flick video -a start -p android
flick video -a stop -p android

I'm getting the following error when trying to stop the recording:

Stopping Recorder!!!
Saving to /home/heitor/a4a2d461.mp4
error: No such file or directory @ rb_file_s_rename - (/home/heitor/.flick/a4a2d461/a4a2d461.mp4, /home/heitor/a4a2d461.mp4). Use --trace to view backtrace

Indeed, the file name left on ~/.flick/a4a2d461 is video-a4a2d461-single.mp4, and not a4a2d461.mp4, as the program seems to expect. The video is perfectly fine, but won't be moved to the directory I chose with --output (or even the default one) because of this.

Am I doing something wrong?

I have ffmpeg and MP4Box installed. I'm on Ubuntu 16.04 and on flick version 0.4.4.

Also, thank you for building this tool.

Unable to record > 3 minutes video with android device

I am having issue with recording video of android real devices and simulators > 3 min.
After running command "flick video -a start -p android -e true" the recording starts and in console I see that it is in extended mode but after stopping video recording "flick video stop -p android -o /Descktop/record" I see that video file is saved but duration of video 3 minutes.
Please suggest a solution.

Micromax AQ4501 + 6.0.1 video recording is not working

Recording on this particular device doesn't work

adb shell
shell@AQ4501_sprout:/ $ cd sdcard/flick                                        
/system/bin/sh: cd: /sdcard/flick: No such file or directory
2|shell@AQ4501_sprout:/ $ cd sdcard
/system/bin/sh: cd: /sdcard: No such file or directory

flick video -a stop -p android

shows message Stopping Recorder!!!

It will nice to throw error couldn't perform recording on this device.

Please review

Recorded Video Frame Rate is wrong

%x(ffmpeg -loglevel quiet -framerate 1 -pattern_type glob -i '#{driver.flick_dir}/screenshot-#{udid}*.png' -c:v libx264 -pix_fmt yuv420p #{driver.flick_dir}/#{driver.name}.mp4)

Even if we change the duration of the screen capture interval, the fps is always 1. So the time actually spent in the recorded video will never be the same.

Not able to Stop the service

@isonic1 can you please help me on this, when i stop the service it throws the below error

flick video -a stop -p android -u FA66VBN01980 -n testing --trace

Stopping Recorder!!!
[iso file] Incomplete box mdat
[iso file] Incomplete MDAT while file is not read-only
No suitable media tracks to cat in /Users/saikrisv/.flick/FA66VBN01980/video-single.mp4 - skipping
Saving to /Users/saikrisv/git/new_appium_parallel/AppiumTestDistribution/testing.mp4
/usr/local/lib/ruby/gems/2.3.0/gems/flick-0.3.1/lib/flick/video.rb:107:in `rename': No such file or directory @ rb_file_s_rename - (/Users/saikrisv/.flick/FA66VBN01980/testing.mp4, /Users/saikrisv/git/new_appium_parallel/AppiumTestDistribution/testing.mp4) (Errno::ENOENT)
        from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.3.1/lib/flick/video.rb:107:in `stop_record'
        from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.3.1/lib/flick/video.rb:49:in `stop'
        from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.3.1/lib/flick/video.rb:25:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.3.1/bin/flick:32:in `block (2 levels) in <top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:68:in `run!'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
        from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/import.rb:5:in `block in <top (required)>'

Feature request: device CPU / memory info

@isonic1 hi,

Would be great, if flick could retrieve CPU / memory usage info from plugged devices.
Some adb examples:

adb -s [udid] shell cat /proc/meminfo
adb -s [udid] shell vmstat
adb -s [udid] shell top -m 10

iPhoneX video recording results in empty file

Hi! Thank you so much for your product! Video recording is working great on all our iphone and ipad devices, except the iPhoneX, which always results in a file of size 0.

Steps to recreate:

  1. Attach iPhoneX
  2. flick video -a start -p ios
  3. --> Notice it says Starting recording!!!
  4. flick video -a stop -p ios
  5. --> Notice it says Stopping recording!!!
  6. Inspect the file created.
  7. --> Notice it is of size zero.

Note:
Quicktime successfully records video on the iPhoneX.
Screenshots with flick on iPhoneX, work as expected.

Facing conflict while using Flick start video

Hi,

After successful installation of Flick when I place this "flick video -a start -p ios" command, I'm getting the below statements.
"Starting Screenshot Recorder...
Process will start after 500 screenshots."

Here, I'm not getting any video recorded under "/Users/myUserName/.flick". Could you please let me know whether this command is enough or it needs additional setup.

Thanks & Regards,
Vijay Bhaskar.

Paired device not working

I'm trying to use your program to capture screen/device log etc. But i can seem to get it running. Maybe missing something

Real device
iOS 10.2
iPhone 5c
El Capitan 10.11.5

Last login: Tue Jan 31 10:01:22 on ttys000
$ idevicepair -u 0d6503b781436c1ffe74629881f31700ce467c6a pair
ERROR: Please accept the trust dialog on the screen of device 0d6503b781436c1ffe74629881f31700ce467c6a, then attempt to pair again.
$ idevicepair -u 0d6503b781436c1ffe74629881f31700ce467c6a pair
SUCCESS: Paired with device 0d6503b781436c1ffe74629881f31700ce467c6a
$ flick log -a start -p ios -o $HOME -n iosLog

UDID: 0d6503b781436c1ffe74629881f31700ce467c6a - Is not paired with your machine!
Run: idevicepair -u pair

Info command appends new lines to existing file

Execute the following command twice:
flick info -u [udid] -p [platform] -s true -o $HOME

Expected: file is overwritten.
Actual: file is appended.

There's no need to append file with the same info.

recording not happening

Getting the below error:
/Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/flick-0.4.6/lib/flick/video.rb:104:in rename': No such file or directory @ rb_file_s_rename - (/Users/jenkins-lab/.flick/1594934708002C0/jitu.mp4, /Users/jenkins-lab/jitu.mp4) (Errno::ENOENT) from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/flick-0.4.6/lib/flick/video.rb:104:in stop_record'
from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/flick-0.4.6/lib/flick/video.rb:57:in stop' from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/flick-0.4.6/lib/flick/video.rb:34:in run'
from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/flick-0.4.6/bin/flick:34:in block (2 levels) in <top (required)>' from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:58:in run!' from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
from /Users/jenkins-lab/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/import.rb:7:in `block in <top (required)>'

Error running the command

flick video -a start -p android

/usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/system.rb:7:in mkdir': No such file or directory @ dir_s_mkdir - /Users/saikrisv/.flick/192.168.68.101:5555 (Errno::ENOENT) from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/system.rb:7:insetup_system_dir'
from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/android.rb:23:in create_flick_dirs' from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/android.rb:15:ininitialize'
from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/video.rb:15:in new' from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/lib/flick/video.rb:15:ininitialize'
from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/bin/flick:32:in new' from /usr/local/lib/ruby/gems/2.3.0/gems/flick-0.2.3/bin/flick:32:inblock (2 levels) in <top (required)>'
from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:178:in call' from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:153:inrun'
from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in run_active_command' from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:68:inrun!'
from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in run!' from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/import.rb:5:inblock in <top (required)>'

Unable to record video on IOS 12.3.1

Hi i have trouble in generating the videos for ios and here is the stacktrace
Flick version: 0.4.6

flick video -a stop -p ios -n my-videoios

Stopping Recorder!!!
Saving to /Users/punitgupta/my-videoios.mp4
error: No such file or directory @ rb_file_s_rename - (/Users/punitgupta/.flick/6a6786291d771283cf26b35c5ac26f5976f24803/my-videoios.mp4, /Users/punitgupta/my-videoios.mp4). Use --trace to view backtrace

After doing a back trace

lick video -a stop -p ios -n my-videoios --trace

Stopping Recorder!!!
Saving to /Users/punitgupta/my-videoios.mp4
/Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/lib/flick/video.rb:142:in `rename': No such file or directory @ rb_file_s_rename - (/Users/punitgupta/.flick/6a6786291d771283cf26b35c5ac26f5976f24803/my-videoios.mp4, /Users/punitgupta/my-videoios.mp4) (Errno::ENOENT)
	from /Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/lib/flick/video.rb:142:in `mp4'
	from /Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/lib/flick/video.rb:132:in `stop_screenshot_recording'
	from /Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/lib/flick/video.rb:59:in `stop'
	from /Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/lib/flick/video.rb:34:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/flick-0.4.6/bin/flick:34:in `block (2 levels) in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/command.rb:182:in `call'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/command.rb:153:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/runner.rb:446:in `run_active_command'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/runner.rb:68:in `run!'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/delegates.rb:15:in `run!'
	from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.7/lib/commander/import.rb:5:in `block in <top (required)>'

flick not working with iOS 10 Xcode 8

Not able to get any video using the command "flick video -a start -p ios -s 0.5 -c 6000" followed by "flick video -a stop -p ios -s 0.5 -c 6000" on Xcode 8, iOS 10.

No file was created, and "error: No such file or directory - (<temporary_file_path>, <current_working_directory>), User --trace to view backtrace." was observed.

same error message with --trace:
note: username, directory and UDID is removed from log for privacy.

/Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/lib/flick/video.rb:142:in rename': No such file or directory - (/Users/<user_name>/.flick/<UDID>.mp4, /Users/<user_name>/<UDID>.mp4) (Errno::ENOENT) from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/lib/flick/video.rb:142:in mp4'
from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/lib/flick/video.rb:130:in stop_screenshot_recording' from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/lib/flick/video.rb:51:in stop'
from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/lib/flick/video.rb:25:in run' from /Library/Ruby/Gems/2.0.0/gems/flick-0.2.4/bin/flick:32:in block (2 levels) in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:in call' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:in call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:153:in run' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in run_active_command'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/runner.rb:68:in run!' from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/import.rb:5:in `block in <top (required)>'

Flick not working for iOS 10 via Jenkins

Environment:

  • iOS 10.0 and higher
  • Jenkins 2.12
  • Mac OSX 10.11.6
  • libimobiledevice --HEAD

Steps:
In Jenkins job:

  • flick log -p ios -a start -n test --trace
  • flick log -p ios -a stop --trace

Actual result:

  • no errors in console
  • no logs in file

PS:

  • flick video and screenshot not working via jenkins too
  • idevicesyslog printed log good via Jenkins on iOS 10.0
  • flick printed log good via Jenkins on iOS 9.3
  • flick working on iOS 10.0 without Jenkins

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.