![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cypress
王黛黛黛黛黛
软件测试小白冲冲冲!!
展开
-
Cypress学习笔记(二)——钩子函数before,after,beforeEach,afterEach
cypress的hooks :before会在第一个用例之前运行,afeter会在跑完所有的用例之后运行。 beforeEach会在每一个用例前运行,afterEach会在每一个用例结束后运行。官网说明:https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Hooks以下代码摘自官网。beforeEach(() => { // root-level hook // runs原创 2020-11-27 17:57:10 · 2642 阅读 · 0 评论 -
cypress报错this.skip is not a function
cypress学习this.skip时,发现报错:“this.skip is not a function”。搜了一下原来是Mocha不鼓励使用箭头功能const flag =1;describe('third level1', function (){ it('firth level1', () => { if (flag === 1) this.skip();原创 2020-11-26 11:35:29 · 492 阅读 · 0 评论 -
Cypress学习笔记(一):登陆自动化(不完整的)
最近要学习一下cypress进行自动化测试,先从最基础的登陆来吧。首先,找到cypress安装目录,找到cypress文件夹,进入到cypress下的cypress文件夹,(后面需要在该目录下启动cypress)。会发现4个目录,在integration目录下创建了一个first.js的文件,编写我们的代码。【ps:一开始由于目录不对,我创建的first.js文件cypress找不到,切换到正确的目录下就能看到了】describe('My first Test Suite',.原创 2020-11-24 17:33:50 · 1051 阅读 · 1 评论