百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

stubby4j

> DevOps
开源

用于在 Docker 和非容器化环境中为分布式 Web 服务创建代理的 HTTP/1.1、HTTP/2 和 WebSockets 代理服务器,用于集成和合约测试

366 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于在 Docker 和非容器化环境中为分布式 Web 服务创建代理的 HTTP/1.1、HTTP/2 和 WebSockets 代理服务器,用于集成和合约测试

HTTP/1.1, HTTP/2 and WebSockets stub server for stubbing distributed web services in Docker and non-containerized environments for contract testing

CircleCI build master branch DockerHub GitHubStars GitHubForks codecov Maven Central Stackoverflow stubby4j

stubb4j

It is a highly flexible and configurable tool for testing interactions of service-oriented (SoA) or/and micro-services architectures (REST, SOAP, WSDL, etc.) over HTTP/1.1, HTTP/2 and WebSockets protocols.

Full documentation

pages-build-deployment

Full documentation hosted at https://stubby4j.com, which includes a comprehensive user guide, various HOWTOs and usage examples.

Key features

There are a number of use cases where you'd want to use WebSockets, HTTP/1.1, HTTP/2 stub server in your development/QA environment. If you are a Software Engineer/Test Engneer/QA, then it should hit close to home with you. As an example, some of these use cases are outlined below (this is by no means an exhaustive list). Use stubby4j when you want to:

  • Dockerzied. Stub out external services in a Docker based micro-service architecture (ARM64 Docker images are also available!)
  • Support for TLS protocol versions 1.0, 1.1, 1.2 and 1.3
  • Support for HTTP/2 over TCP (h2c) and HTTP/2 over TLS (h2) on TLS v1.2 or newer using ALPN extension
  • Verify that your code makes HTTP/1.1 or HTTP/2 (over TLS) requests with all the required parameters and/or headers
  • Support for WebSocket protocol over HTTP/1.1 (with TLS and without) for request verification, response stubbing, server push, and more
  • Fault injection, where after X good responses on the same URI you get a bad one
  • Dynamic flows. Multiple stubbed responses on the same stubbed URI to test multiple application flows
  • Request proxying. Ability to configure a proxy/intercept where requests are proxied to another service
  • Record & Replay. The HTTP response recorded on the first call, having the subsequent calls play back the recorded HTTP response, without actually connecting to the external server
  • Regex support for dynamic matching on URI, query params, headers, POST payload (ie:. mod_rewrite in Apache)
  • Dynamic token replacement in stubbed response, by leveraging regex capturing groups as token values during HTTP request verification
  • Serve binary files as stubbed response content (images, PDFs. etc.)
  • Support for delayed responses for performance and stability testing
  • Support for HTTP 30x redirects verification
  • Support for different types of HTTP Authorizations: Basic, Bearer Token & others
  • Embed stubby4j to create a web service SANDBOX for your integration test suite
  • Verify that your code correctly handles HTTP response error codes

Full documentation hosted at https://stubby4j.com, which includes a comprehensive user guide, various HOWTOs and usage examples.

Minimal system requirements

Running stubby4j as a standalone JAR

See https://stubby4j.com/#minimal-system-requirements for more information.

Running stubby4j as a pre-built Docker container

See https://stubby4j.com/#running-in-docker for more information.

Docker Compose

See https://stubby4j.com/#docker-compose for more information.

Full documentation hosted at https://stubby4j.com, which includes a comprehensive user guide, various HOWTOs and usage examples.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaapi-mockingapi-testingarm64consumer-driven-contracts

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理