Angular E2E测试 - 量角核框架创建数百个奇怪的缓存文件

发布于 2025-01-30 06:55:25 字数 489 浏览 2 评论 0原文

Angular项目中,我们使用protractor-Cucumber-Framework我们的e2e tests。运行了所有E2E测试后,它不仅会更新results.json and results.xml file(对我来说这似乎是正常的),而且还会生成数百个隐秘,在新的null文件夹下的不可启用的缓存文件(请参阅附件屏幕快照)。这些新文件实际上有近1000个。这是正常的吗?有人可以告诉我这些是用来的以及如何防止这种情况吗?

In an Angular project, we're using the Protractor-Cucumber-Framework for our E2E tests. After running all my E2E tests, not only does it update a results.json and results.xml file (this seems normal to me), but it also generates hundreds of cryptic, un-openable cache files under a new null folder (see attached screenshot). There are literally almost 1000 of these new files. Is this normal, and can anyone tell me what these are for and how to prevent this?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏大泽ㄣ 2025-02-06 06:55:25

我通过评论一行' - disk-cache-dir = null',chromeoptions属性protractor.conf.js :

chromeOptions: {
  prefs: {
    'plugins.always_open_pdf_externally': true,
    download: {
      directory_upgrade: true,
      prompt_for_download: false,
      default_directory: downloadsPath,
    },
  },
  args: [
    '--no-sandbox',
    '--test-type=browser',
    '--disable-gpu',
    '--log-level=1',
    '--disable-dev-shm-usage',
    // '--disk-cache-dir=null',
  ],
},

I've disabled these files being created on every test run by commenting out a line '--disk-cache-dir=null', in the chromeOptions property of protractor.conf.js:

chromeOptions: {
  prefs: {
    'plugins.always_open_pdf_externally': true,
    download: {
      directory_upgrade: true,
      prompt_for_download: false,
      default_directory: downloadsPath,
    },
  },
  args: [
    '--no-sandbox',
    '--test-type=browser',
    '--disable-gpu',
    '--log-level=1',
    '--disable-dev-shm-usage',
    // '--disk-cache-dir=null',
  ],
},
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文