## e2e测试框架 * 官网:https://www.cypress.io/ * github:https://github.com/cypress-io/cypress * vue-cli - 脚手架创建选择安装e2e即可 - 在已创建的项目中安装:`vue add e2e-cypress` * vue-cli中使用cypress:https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-cypress * 参考文章:https://www.jianshu.com/p/459612488233 * 目录结构 ![](https://img.kancloud.cn/36/ff/36ff1a8e5e10777a1729e9b6f51cfaa6_1019x815.png) * 测试页面 ![](https://img.kancloud.cn/ab/ac/abacca244a95df404fed46de8cce926b_1280x720.png) ## 测试登录页面 * npm run test:e2e ![](https://img.kancloud.cn/2a/3d/2a3dc671f755ef7439ac83c66722f652_1102x868.png)