综合技术

Cypress.io + Slack healthcheck tool

微信扫一扫,分享到朋友圈

Cypress.io + Slack healthcheck tool
0

cypress-healthcheck

The "just add water" Cypress + Slack healthcheck reporting tools for your app.

Why Cypress.io + Slack?

Cypress.io
is an amazing and easy to use E2E, integration and service testing tool which lives inside your codebase. Writing tests with Cypress is a breeze, and you can get started really quick.

However, sometimes you just want to check if your production app is alive and kicking, that is, if a user clicks on a certain element does something happen, is the app responsive, are certain critical elements or components present etc.

This is a perfect use case for Cypress and Slack, to help notify you if any production issues occur. Cypress does not have integration with Slack (just yet!), but until their great team builds this for us, you can use this framework to test anything from a simple SPA to a more complex project.

Installation

Simply clone the repo and run:

npm install

Then, create a .env
file in your project root, with the Slack Incoming Webhook key:

SLACK_WEBHOOK_KEY="YOUR_SLACK_INCOMING_WEBHOOK_KEY"

How to setup incoming slack webhooks

This demo uses the Vue.js HN clone
and mocha-spec-json-output-reporter
to output the test results. Feel free to use any other reporter
you like.

Usage

You can run this either locally or on your server with a cronjob to automate the tests. To run locally, just do a simple:

npm run healthcheck

Make sure to customize cypress.json
to your own needs, and write some more tests in cypress/integration
.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

阅读原文...


Github

警惕节后版骗术 快钱为消费者资金安全支招

上一篇

Submit or delete a sqlite table as quickly as possible on an Android device

下一篇

您也可能喜欢

评论已经被关闭。

插入图片
Cypress.io + Slack healthcheck tool

长按储存图像,分享给朋友