搜索插件、代码仓与 APP 分类

插件详情v7.0.0

conduit_test

用于编写 Conduit 应用程序自动化测试的工具

macOSWindowsLinux
近 30 天下载
1470
喜欢数
2
Pub 分数
150

安装插件

flutter pub add conduit_test

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

conduit_test 提供了一套实用工具,以简化为 Conduit 应用程序编写自动化测试的过程。它提供了设置测试服务器、管理数据库连接以及模拟 HTTP 请求和响应的辅助功能。专为 Conduit 框架设计,使开发者能够轻松验证应用逻辑、认证流程和 API 端点。该包可无缝集成到 Flutter 和 Dart 项目中,支持在 macOS、Windows 和 Linux 上进行跨平台测试。它提高了测试的可靠性,并减少了测试套件中的样板代码。

适合场景

  • 测试 API 端点
  • 验证身份验证工作流
  • 模拟 HTTP 请求
  • 数据库集成测试
  • 验证服务器行为
  • 自动化回归测试

主要特点

  • 测试服务器设置工具
  • HTTP 请求模拟
  • 数据库连接管理
  • 跨平台支持
  • 最小化样板代码
  • 与 Conduit 框架集成

适合对象

  • Conduit 后端开发人员
  • API 测试专家
  • CI/CD 流水线集成商
  • 全栈 Dart 开发人员
  • 测试自动化工程师

使用建议

  • 需要导管框架
  • 仅限服务器端测试
  • 需要正确的测试环境设置
  • 不适用于UI测试
  • 取决于导管的架构
  • 最好在专用测试环境中使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Linux Windows Macos melos

Conduit is a fork of Stablekernel's Aqueduct, a modern Dart HTTP server framework.

Getting Started

  1. Install Dart.
  2. Activate Conduit.
dart pub global activate conduit
  1. Create a new project.
conduit create my_project
  1. Serve the project.
cd my_project
conduit serve

Building from Source

If you want to contribute to Conduit or build it from source, you will need Melos.

  1. Install Melos:
dart pub global activate melos
  1. Bootstrap the project:
melos bootstrap
  1. Run tests:

[!IMPORTANT] Tests require a running PostgreSQL instance and specific environment variables. You can start the database using Docker: docker-compose -f ci/docker-compose.yaml up -d

export POSTGRES_USER=conduit_test_user
export POSTGRES_PASSWORD=conduit!
export POSTGRES_DB=conduit_test_db
export POSTGRES_PORT=15432
export POSTGRES_HOST=localhost

melos run test-unit

Tutorials, Documentation and Examples

We are currently in the process of collating helpful resources for your edification. Our main docs live here.

Conduit is a close fork to Aqueduct, so Aqueduct examples can be tweaked to work with Conduit here. The major concern is updating the code to use null-safety.

Contributors

j4qfrost
j4qfrost

💻
neterror
neterror

💻
Luis
Luis

💻
Artem Semirenko
Artem Semirenko

🐛 💻
Dmytro Prylutskyi
Dmytro Prylutskyi

💻

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。