npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

yapi-plugin-automated-test

v1.0.1

Published

Yapi 自动化测试插件,支持在Yapi设置测试计划,查看历史测试结果,钉钉通知。

Readme

yapi-plugin-automated-test

Yapi插件-自动化测试插件

定时自动测试插件旨在提供更方便的接口测试功能,更高效的接口健康监测。

充分释放人力、物力,节省接口回归时间,减少其他资源投入。

简介

Github:yapi-plugin-automated-test

效果

插件安装后,在分组的项目导航栏中加入自动化测试标签,配置非常简单。使用过程中如果碰到任何bug或有任何好的的建议欢迎issue。

功能

  • 支持多计划配置,可以基于测试集合配置不同的测试计划,定制化程度高
  • 支持定时自动测试,开启后会定时执行,并推送钉钉群机器人消息
  • 支持多情况消息推送,主要控制钉钉机器人推送消息方式
  • 服务端自动化测试URL直接使用Yapi自带的测试集合自动化测试
  • 时间轴风格的测试结果列表,支持直接查看历史测试结果。
  • 钉钉机器人配置钉钉自定义机器人的webhook,注意钉钉机器人安全控制-需要配置钉钉机器人安全秘钥
  • cron表达式,用于自动测试的频率,自动测试后会发送钉消息,参考

image-20201210143214765

安装插件

正常安装

  1. 在config.json这层目录下运行 yapi plugin --name yapi-plugin-automated-test安装插件
  2. 重启yapi

本地安装

  1. 下载插件clone到本地,拷贝到Yapi目录的项目目录/vendors/node_modules/下面
  2. 修改配置文件,Yapi目录下项目目录/config.json,添加插件
  3. 打包后重启服务,ykit的打包命令ykit pack -m

更新插件

通过yapi-cli更新插件还是比较麻烦的,直接再执行一次命令并不会更新。因为yapi-cli安装插件实际上就是在vendors目录下执行npm install --registry https://registry.npm.taobao.org yapi-plugin-automated-test ,所以最后会在package.json文件中记录下开始安装的版本号,再次执行安装的还是同一个版本。

执行如下操作可以进行更新:

  1. 需要先清除ykit的缓存,删除./vendors/node_modules/.ykit_cache文件夹
  2. 修改package.json里面yapi-plugin-automated-test的版本或者直接npm i yapi-plugin-automated-test@version
  3. ./vendors/目录中执行命令NODE_ENV=production ykit pack -m
  4. 在config.json这层目录下执行命令yapi plugin --name yapi-plugin-automated-test后再重启服务器就完成安装指定版本的插件

如何使用

1、如何维护测试集合

官方中文教程比较详细,并且有动图,官方教程

2、如何配置插件

  1. 配置入口在项目的导航栏中。 配置
  2. 服务端自动化测试URL获取,通过测试集合-》服务端测试获取URL,直接使用。 自动化测试URL
  3. 配置钉钉群机器人webhook。 webhook

3、如何查看结果

  1. 通过Yapi项目-》动态,项目动态 动态

  2. 钉钉群聊里的钉钉机器人 钉钉机器人

  3. 测试结果 查看测试结果

注意事项

  1. 钉钉每个机器人每分钟最多发送20条,参考消息发送频率限制