赛普拉斯是否在每次测试之前清除浏览器缓存? [英] Does Cypress clear the browser cache before each test?

查看:92
本文介绍了赛普拉斯是否在每次测试之前清除浏览器缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cypress 清除所有cookie

Cypress clears all cookies and local storage before each test. Does it also clear the browser's file cache?

推荐答案

编辑:在浏览器在

Cypress automatically clears browser cache before the browser launches in Version 0.20.0. So, the cache will be cleared between each spec file is run.

否,赛普拉斯不会在每次测试之前清除浏览器缓存.赛普拉斯会尊重您服务器的缓存头.因此,如果设置了它们,浏览器将缓存这些文件.确实没有任何地方对此进行真正的记录,但是我是赛普拉斯的一名开发人员,所以知道这是如何工作的.

No, Cypress does not clear browser cache before each test. Cypress respects the cache headers of your server. So if they are set, the browser will cache those files. This isn't really documented anywhere exactly, but I'm a developer at Cypress so know this is how it works.

如果您希望看到一些不同的行为,我建议打开问题在OS Cypress项目上.

If you want to see some different behavior, I suggest opening an issue on the OS Cypress project.

这篇关于赛普拉斯是否在每次测试之前清除浏览器缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆