All Projects → appetizerio → Insights.py

appetizerio / Insights.py

Licence: apache-2.0
AppetizerIO CLI for Mobile DevOps Development

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Insights.py

Morphing Material Dialogs
Material dialog ❤️ morphing animation. An android kotlin UI library for building beautiful animations for converting a floating action button into a material dialog.
Stars: ✭ 806 (+3000%)
Mutual labels:  android-application
Kotlin Android Examples
💪 [Examples] Isolated applications purely on Kotlin, for all android devs out there
Stars: ✭ 902 (+3369.23%)
Mutual labels:  android-application
Youtubedownloader
Android App for searching for videos on Youtube by keywords using YouTube Data API and download videos from YouTube in different formats.
Stars: ✭ 25 (-3.85%)
Mutual labels:  android-application
Nogifeed
nogizaka46 blog rss reader
Stars: ✭ 6 (-76.92%)
Mutual labels:  android-application
Eyewarning
Android Based Drowsy Driver Detection Application
Stars: ✭ 18 (-30.77%)
Mutual labels:  android-application
Sign Android
Mongolian sign language
Stars: ✭ 22 (-15.38%)
Mutual labels:  android-application
Nhentai Android
NHentai Android Client with Material Design
Stars: ✭ 774 (+2876.92%)
Mutual labels:  android-application
Kodein Mvvm
Example app using Kodein for dependency injection with MVVM and Architecture Components
Stars: ✭ 26 (+0%)
Mutual labels:  android-application
Conquermobile3.2
Android应用 统计手机各个APP的使用时间及次数,并添加应用使用限制功能及惩罚操作
Stars: ✭ 18 (-30.77%)
Mutual labels:  android-application
Dbweather
Android weather application with news feed and live tv
Stars: ✭ 24 (-7.69%)
Mutual labels:  android-application
Marvel App
Android application made with Kotlin and RxJava
Stars: ✭ 16 (-38.46%)
Mutual labels:  android-application
Instabiosquotes
Completely FREE Instagram Bio and Quotes Android App with latest collection of Instagram Bio and Instagram quotes for setting as your status.
Stars: ✭ 17 (-34.62%)
Mutual labels:  android-application
Microservices Observability
This project is a demonstration on how to instrument, monitor and trace applications using java frameworks and open-source tools like prometheus, grafana and jaeger.
Stars: ✭ 23 (-11.54%)
Mutual labels:  instrumentation
Glutenvrijapp
Gluten vrije producten app voor android
Stars: ✭ 5 (-80.77%)
Mutual labels:  android-application
Androidpn Client
Android Push Notification cilent
Stars: ✭ 25 (-3.85%)
Mutual labels:  android-application
Qbdi
A Dynamic Binary Instrumentation framework based on LLVM.
Stars: ✭ 801 (+2980.77%)
Mutual labels:  instrumentation
Android Data Binding Examples
A collection of samples using Android Data Binding
Stars: ✭ 20 (-23.08%)
Mutual labels:  android-application
Traute
Enhances java sources compilation in a way to insert null-checks into generated *.class files
Stars: ✭ 26 (+0%)
Mutual labels:  instrumentation
Chatapp
Chat App with all functionality private chat, contacts, friends request, find friends,for profile settings image cropper functionality, settings, logout also send text, image and all type of files, delete your files for you and everyone , login with email and mobile number and real time database firebase and for notification purpose Node Js used.
Stars: ✭ 25 (-3.85%)
Mutual labels:  android-application
Wanderlust The Travellers App
👟 An android application for travellers which allows them to save their journey experiences at one place in an organizable way. For detailed description, read the README.md file. Moreover, the application's design follows the latest HCI and UI/UX design guidelines.
Stars: ✭ 23 (-11.54%)
Mutual labels:  android-application

insights.py Build Status

AppetizerIO 命令行工具(Python)

使用流程

  • 将待测试的 apk 上传到服务端进行插桩
  • 下载插桩后的 apk
  • 安装插桩后的应用,进行测试流程(自动化测试,人工测试都可以),log会存在手机本地
  • 上传 log 至服务端进行分析,获取报告
    • 可以通过APP端浮动功能框进行上传
    • 可以通过PC端上传USB连接的设备的log
    • 可以通过本脚本控制上传
  • 通过Appetizer Desktop >= 1.4.3进行可视化查看报告

插桩和分析包括

  • 应用崩溃(Crash)的原因和崩溃时的状态
  • 所有线程抛出的异常(即使不会造成崩溃)
  • 应用未响应(ANR)的状态
  • HTTP 请求以及回复的详细信息,包含以下库的API (更多库支持正在添加)    - okhttp >=2.2 或 okhttp3
  • 主线程卡顿(图片问题,回调问题等)
  • 界面切换耗时
  • CPU 占用率和 heap 占用大小
  • FPS
  • 内存指标PSS等

环境要求

  • Python 2.7.x 3.3+
  • node >= 0.10.4
  • adb已经安装并已经添加到环境变量PATH中
  • 支持Windows, MacOS, Linux
  • APK文件名尽量用英文,APP本身状态、字符串等可以有中文

用法

安装依赖

python -m pip install -r requirements.txt

帮助

python insights.py -h

确认不会有错误即依赖安装正确

login: 登录账号

python insights.py login username password

所有客户端操作均需要登录认证,执行登录后登录用token保存在当前 .access_token 文件。token默认60天有效,使用任意操作会自动续期。60天后token过期需要重新登录。

账号可在 Appetizer.io 注册。

如果非账号密码登录,可使用如下命令直接设置 apikeyapikey可以从Appetizer桌面客户端的用户界面获取:

python insights.py apikey <apikey>

插桩 apk

python insights.py process apk processed_apk

例如

python insights.py process my.apk my_processed.apk 

插桩需要上传、处理、下载,需要一定时间,依据网络情况与APK大小不同大致在1分钟-3分钟内,期间会有输出表示进展情况。 命令行插桩的App主要面向自动化遍历技术,为避免自动化误点,默认会关闭浮动框,需要打开可在命令行插桩时增加 --enable-inapp-menu 选项

安装插桩后的APK并授权

python insights.py install my_processed.apk -s serialno1 -s serialno2
  • my_processed.apk 是插桩后的apk
  • -s是可选参数, serialno1 serialno2 之类的是设备的串号,通过 adb devices 获得,需要安装到多个设备可以用多个-s命令指定设备; 不提供任何-s命令时,默认认为只有一个设备并对该设备进行安装
  • 安装后会自动授权log (小米无法自动化授权,建议在安装完成后授权读写SDCARD)

测试

Appetizer 质量监控客户端对测试没有特别限制,可以是简单的人工测试,也可以是复杂的回归测试,测试长度不限。插桩后的APK会自动log

上传log获取分析报告

python insights.py analyze my_processed.apk -s serialno1 -s serialno2 --clear
  • -s是可选参数, serialno1 serialno2 之类的是设备的串号,通过 adb devices 获得,需要分析多个设备上的log可以用多个-s命令指定设备; 不提供任何-s命令时,默认认为只有一个设备并对该设备进行分析
  • --clear是可选参数,用于从设备下载log后将设备上log清空
  • 分析成功后可以通过Appetizer Desktop >= 1.3.0 查看
  • 分析成功后,服务器会返回相应的报告和导出格式的下载路径,例如:
waiting...... server is uploading the report
server has generated and uploaded the report
download report data at:
http://cache.appetizer.io/xxxxx.report.gz
exported reports available at (deprecated, use Appetizer Desktop instead):
{
    "csv": "http://cache.appetizer.io/xxxxx.csv.zip",
    "json": "http://cache.appetizer.io/xxxxx.json.zip",
    "html": "http://cache.appetizer.io/xxxxx.html.zip",
}

下载的报告格式为gzip,解压后是一个json,详细报告格式参考:http://doc.appetizer.io/advanced/under-the-hood-analysis.html

使用报告可视化工具

  • 首先安装可视化工具所需要的依赖:
pip install -r requirements.report.txt
  • 可视化报告
python report.py sample-report.json.gz

可以传入gz文件或者json文件,可视化效果如下(底部有matplotlib标准工具栏可以对区域进行缩放等):

私有化部署

使用私有化部署的用户,以如下命令配置:

python insights.py deployment --private <私有化部署URL>

然后直接设置 apikey (绝大多数私有化部署不支持账号密码登录)

python insights.py apikey <apikey>

之后即可正常使用其他功能,如果需要切换回公有云部署,执行:

python insights.py deployment

注意,每次切换需要重新设置apikey/登录

其他功能

python insights.py clearlog my_processed.apk -s serialno1 -s serialno2 --clear

将设备上有指定插桩后的APK的log清除

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].