codeception / notifier
Codeception 通知扩展
0.1.0
2018-02-14 00:53 UTC
Requires
- namshi/notificator: 1.0.*
Requires (Dev)
- codeception/codeception: @dev
This package is auto-updated.
Last update: 2024-09-13 10:00:20 UTC
README
此存储库展示了如何使用 Codeception 扩展 API。检查其源代码以编写自己的扩展。
Codeception 通知扩展
此包中的扩展可以包含到 Codeception 中以接收测试结果的通知。
这些通知仅限于几个基本示例。建议将其分叉并修补以满足您的实际需求。
通知通过notificatior库(由NAMSHI提供)实现。
安装
安装此包
composer require codeception/notifier --dev
在codeception.yml
配置中启用扩展
示例
paths: tests: tests log: tests/_log data: tests/_data helpers: tests/_helpers extensions: enabled: # enable ubuntu notifications - Codeception\Extension\UbuntuNotifier # extension class name # enable email notifications - Codeception\Extension\EmailNotifier: email: tests@company.com
Ubuntu 通知
类: Codeception\Extension\UbuntuNotifier.
Notificator 的基本 notify-send
包装器可用于在 Ubuntu 中发送通知。通过 notificator 的 NotifySend 处理器实现。
可以通过提供--ext UbuntuNotifier
选项动态启动(无需添加到配置)
./vendor/bin/codecept run --ext UbuntuNotifier
邮件通知
类: Codeception\Extension\EmailNotifier
与 Ubuntu 通知不同,此扩展还从配置codeception.yml
中获取额外的参数
extensions: - Codeception\Extension\EmailNotifier: address: tests@company.com
此电子邮件将用于发送通知。