Fix e2e interferences, and establish robust parallelism
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, playwright
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Start with playwright.config.js and compare the state-changing scenarios in e2e/security.spec.js with the setup in e2e/about.spec.js. Verify how the referenced grouping and worker configuration affect execution, then ensure state-changing tests are isolated and cleaned up while read-only tests can run in parallel. Done means the e2e suite is reliable both locally and on CI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Merging over the grouped e2e tests uncovered an interference problem in our e2e test setup.
Update: we disabled concurrent tests locally to alleviate the problem for local development for the time being. The topic in itself is still valid, however.
Problem
Our Playwright setup is this:
- On CI, we only use a single Playwright worker. Therefore, Playwright will run each spec file one after the other, in alphabetic order.
- Locally, however, we
runhad been running the files in parallel, which is the default behaviour, in caseworkerswasn’t set (i.e.,undefined).
Due to the new grouping and our usage of the beforeEach mechanism, the timing behaviour of the tests happened to change, compared to before:
When the security-dialog tests are running, they alter the server state and toggle on the auth requirement. The about-dialog tests are executed in parallel, and can now randomly fail, since Playwright happens to attempt to open the about dialog during a time when the auth requirement is active (caused by one of the concurrently ran security tests). Therefore, Playwright fails to open the about dialog in the first place, as it’s stuck on the login page.
This problem isn’t new, but so far the timing was in our favour, so we were lucky enough to not run into this. Now, with the different timing behaviour, the e2e tests can fail locally.
Again: due to us only using a single worker on CI, this problem only manifests was only manifesting itself locally, not on CI.
Solution
As we continue to add more and more e2e tests (which I think is terrific), I suggest we fix our e2e test setup, and make it robust against these kinds of issues. Specifically, I think we should establish a deliberate mechanism for parallelism:
- If we perform sequential scenarios that alter server state (such as the security tests), we should make sure that no other test can run in parallel. That is because server state acts like a singleton, and is shared across all tests.
- These kinds of test also must clean up the server state afterwards, otherwise we might see erratic failures in subsequent tests.
- For all other, “read-only” tests (i.e., ones that don’t alter server state), we should embrace parallelism as much as possible, to take advantage of lower execution times. I think we should be able to do that on CI and locally likewise, so I’d suspect we don’t need to differentiate here like we do now.
- Ngôn ngữ chính
- Python
- Star
- 3.5k
- Fork
- 292
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tiny-pilot/tinypilot
-
bug medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
tiny-pilot/tinypilot#1419 ·
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
tiny-pilot/tinypilot#1961 ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tiny-pilot/tinypilot#1929 · 3 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
tiny-pilot/tinypilot#1899 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tiny-pilot/tinypilot#1896 ·
Tất cả issue của tiny-pilot/tinypilot
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
infrastructure qa
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
khuisman/mcp-gee-sweet#1068 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The book has a Nix install section that chelis.ch lacks, and it names two of the three systemsĐang mởarea:ecosystem documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Chelis-Lang/chelis#3866 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`lvm_compact` has no self-hosted twin, and `docs/158` §5 says every language-face component mustĐang mởbug sev-3 vm
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
issue: Picking a prompt from the / menu in a channel inserts a command chip instead of the promptĐang mởbug confirmed issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
open-webui/open-webui#32712 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày