GithubHelp home page GithubHelp logo

zhangqi4mvp / lyrebird Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meituan-dianping/lyrebird

0.0 1.0 0.0 56.2 MB

基于网络协议的移动应用插件化测试工作台

Home Page: https://meituan-dianping.github.io/lyrebird/

License: MIT License

HTML 2.67% Python 10.31% Shell 0.05% CSS 23.44% JavaScript 56.57% Vue 6.91% Dockerfile 0.04%

lyrebird's Introduction

Lyrebird

Build Status PyPI PyPI GitHub PyPI - Downloads Backers on Open Collective Sponsors on Open Collective Doc


目录

简介

Lyrebird 是一个基于拦截以及模拟HTTP/HTTPS网络请求的面向移动应用的插件式测试平台。

Lyrebird 不只提供UI操作,也可以通过API控制所有功能。

Lyrebird 也可作为服务端接口测试mock工具使用。

Lyrebird 可以通过插件扩展能力,实现埋点自动测试、API覆盖率统计、移动设备及APP控制和信息记录、自定义检查脚本等一系列功能。

Lyrebird (琴鸟) 不但美丽壮观,且能歌善舞。它不但能模仿各种鸟类的鸣叫声,还能学人间的各种声音。如汽车喇叭声、火车喷气声、斧头伐木声、修路碎石机声及领号人的喊叫声等。歌声婉转动听,舞姿轻盈合拍,是澳洲鸟类中最受人喜爱的珍禽之一。


快速开始

环境要求

  • macOS

  • Python >= 3.6

# 推荐使用Homebrew(https://brew.sh/#install)安装Python3
brew install python3

安装

# 安装lyrebird
pip3 install lyrebird

启动

lyrebird

连接移动设备

  • 启动Lyrebird后,移动设备需要通过代理的方式将请求数据接入。

  • 将移动设备的代理地址设为当前电脑地址,默认端口为4272(IP地址可查看Lyrebird启动时输出的日志)

  • 被测设备上用浏览器打开 http://mitm.it, 选择对应操作系统安装证书

Lyrebird接入有两种方式:

a. 设置代理

b. 直连

查看及录制数据

现在,可以开始操作移动设备了。Lyrebird将显示捕获到的HTTP/HTTPS请求。

选中请求后,可以将它保存到已激活的mock数据组中。

使用Mock数据

激活mock数据选择器,选择mock数据后。经过Lyrebird的请求会被mock,如果mock数据中没有匹配的数据,则会代理该请求。

可以在DataManager界面管理mock数据。

Mock数据管理

mock数据可由左边导航栏切换到DataManager界面进行编辑管理


插件


基本命令

  • lyrebird

    以缺省参数启动lyrebird

  • lyrebird -v

    以输出详细日志模式启动lyrebird

  • lyrebird -b

    启动lyrebird不默认打开浏览器

  • lyrebird --mock 9090 --proxy 4272 --data . --config your/config/file

    指定参数启动lyrebird

    参数:

      --mock 默认9090 , mock服务及前端端口
    
      --proxy 默认4272, 代理服务端口
    
      --data 默认./data, mock数据根目录
      
      --config 默认~/.lyrebird/conf.json, lyrebird启动配置
    

感谢

本工具中的代理功能使用mitmproxy实现。

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

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.