[Feature]: let bunch of tests run serial and not while other tests are running

未关闭
#1,866 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
testing-qa

调研方向

首先检查 issue 中显示的项目配置和 serial.spec.ts 的命名模式,然后跟踪项目依赖关系、UI 模式运行和 worker 是如何调度的。完成的标准是:serial tests 应避免与修改数据库的并发 tests 同时运行,而不强制无关的 parallel tests 先运行;即使在 UI 中运行一个 serial test 时也应如此。

由索引模型根据 Issue 内容生成。

描述

🚀 Feature Request

Most tests can run in parallel. But I have some test (*serial.spec.ts) which should not run parallel to any other test as they modify the database in a way that other tests get confused

Example

The only way I found is to configure two projects with dependencies

  projects: [
    {
      name: 'parallel',
      testIgnore: [/.*.serial.spec.ts/],
      use: {
        ...devices['Desktop Chrome'],
        launchOptions: {
          args: ['--ignore-certificate-errors']
        }
      }
    },
   {
      name: 'serial',
      testMatch: /.*.serial.spec.ts/,
      dependencies: ['parallel'],
      use: {
        ...devices['Desktop Chrome'],
        launchOptions: {
          args: ['--ignore-certificate-errors']
        }
      },
      retries: 0,
      workers: 1
    }]
Motivation

This works, but when i run one serial test in the UI, all parallel tests get executed before. Or I missed something.

主要语言
Java
星标
1.6k
派生
298
平均合并
3 天 2 小时
30 天内合并 PR
14

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/playwright-java 的其他 Issue

查看 microsoft/playwright-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。