All Projects → tonyruiyu → dubbo-mock

tonyruiyu / dubbo-mock

Licence: Apache-2.0 license
dubbo mock web server

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to dubbo-mock

Ava Playback
📼 🚀 Record and playback http requests from your ava tests
Stars: ✭ 124 (+100%)
Mutual labels:  mock, testing-tools
Mocktopus
Mocking framework for Rust
Stars: ✭ 179 (+188.71%)
Mutual labels:  mock, testing-tools
Superagent Mocker
Pretty simple in-browser mocks for CRUD and REST API
Stars: ✭ 127 (+104.84%)
Mutual labels:  mock, testing-tools
Mongodb Memory Server
Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config).
Stars: ✭ 1,376 (+2119.35%)
Mutual labels:  mock, testing-tools
mocat
🐈 Mocat is a mocking toolbar that allows you to interactively develop and test network requests.
Stars: ✭ 27 (-56.45%)
Mutual labels:  mock, testing-tools
Prig
Prig is a lightweight framework for test indirections in .NET Framework.
Stars: ✭ 106 (+70.97%)
Mutual labels:  mock, testing-tools
Mockito
Most popular Mocking framework for unit tests written in Java
Stars: ✭ 12,453 (+19985.48%)
Mutual labels:  mock, testing-tools
DeepfakeHTTP
DeepfakeHTTP is a web server that uses HTTP dumps as a source for responses.
Stars: ✭ 373 (+501.61%)
Mutual labels:  mock, testing-tools
ruby-dns-mock
DNS mock server written on 💎 Ruby. Mimic any DNS records for your test environment with fake DNS server.
Stars: ✭ 50 (-19.35%)
Mutual labels:  mock, testing-tools
Mockito Scala
Mockito for Scala language
Stars: ✭ 231 (+272.58%)
Mutual labels:  mock, testing-tools
Webmockr
R library for stubbing and setting expectations on HTTP requests
Stars: ✭ 37 (-40.32%)
Mutual labels:  mock, testing-tools
main
Mocks Server monorepo
Stars: ✭ 109 (+75.81%)
Mutual labels:  mock, testing-tools
Lyrebird
移动应用插件化测试工作台
Stars: ✭ 663 (+969.35%)
Mutual labels:  mock, testing-tools
Nsubstitute
A friendly substitute for .NET mocking libraries.
Stars: ✭ 1,646 (+2554.84%)
Mutual labels:  mock, testing-tools
Miragejs
A client-side server to build, test and share your JavaScript app
Stars: ✭ 4,384 (+6970.97%)
Mutual labels:  mock, testing-tools
Httpretty
Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Stars: ✭ 1,930 (+3012.9%)
Mutual labels:  mock, testing-tools
mockafka
A testing DSL for kafka-streams
Stars: ✭ 14 (-77.42%)
Mutual labels:  mock, testing-tools
Retromock
Java library for mocking responses in a Retrofit service.
Stars: ✭ 48 (-22.58%)
Mutual labels:  mock, testing-tools
Charlatan
Go Interface Mocking Tool
Stars: ✭ 195 (+214.52%)
Mutual labels:  mock, testing-tools
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (+66.13%)
Mutual labels:  mock, testing-tools

DUBBO MOCK SERVER 使用说明

DUBBO MOCK SERVER 是一个基于web的dubbo服务的mock平台,可以通过可视化界面,采用groovy脚本语言动态配置mock规则,并且提供了对groovy脚本配置是否正确的自我检查测试的功能。

选择数据库数据库按照路径(如果有需要)

更新mock_web模块resources中db-connection.properties

mysql.url=jdbc:sqlite:sql.db

发布文件

执行mvn命令

mvn package -DskipTests=true

发布mock_web.war

配置注册中心

协议 地址 超时时间(毫秒)
zookeeper 127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183 500000

配置协议

协议 端口
dubbo 8835

配置DUBBO服务

配置服务基础信息

配置项
服务名称 com.tony.stock.facade.StockCoreAPiService
注册中心id 1
协议id 1
应用名称 库存系统
Group online
Version 1.0
服务状态 running
超时时间 5000
重试次数 0

服务Mock规则

服务方法规则配置

服务ID 方法名称 条件脚本 返回报文
1 pushOnlineStock any json
1 testMethod arg.warehId=='HQ01W500' json
  • 条件脚本 any void true 匹配任意参数
  • 条件脚本 args 为入参数组的对象,可以同步args[0] args[1]这种方式获取参数对象,并且可以通过.来调用符合JAVABEAN规范的属性
  • 条件脚本arg对象是args数组累的第一个对象
  • 返回报文json格式
{'message':'messagezry','par':[{'name':'zxc','age':11, class:'com.tony.test.protocol.Par'}]}

配置图解

服务清单

服务清单

服务详情

服务详情

添加注册中心

服务详情

添加协议

服务详情

添加方法mock规则

服务详情

选择规则进行测试

服务详情

测试详情

服务详情

测试保存测试数据

服务详情

感谢

特别感谢彬少([email protected])对本项目的大力支持

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