Run scenarios in parallel

Đang mở
#390 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
testing

Hướng nghiên cứu

Start from issue #384 to get per-scenario timings. Examine the composer prepare-tests script and the Behat runner that currently executes scenarios serially. Implement worker isolation (own DB, temp dir) and a scenario-level splitter, then verify behat-rerun and merged reports still work.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

scope:testing status:unconfirmed

Scenarios run strictly one after another, even though almost all of them are independent and the CI runners have several cores. In a local experiment with 213 entity-command scenarios, a serial run took 491 seconds. With 8 workers it took 164 seconds when split by feature file, where one large file set the floor. Split by scenario, it took 140 seconds (3.5×).

Steps:

  1. Give each worker its own state: temporary directory, HOME, WP-CLI cache and test database. composer prepare-tests needs to grant access to the additional databases.
  2. Keep scenarios that rely on fixed shared resources, such as port 8080 or the scaffold test database, from running at the same time.
  3. Split the work by scenario rather than by file, balanced by the per-scenario timings from #384.
  4. Merge the results into a single report and keep behat-rerun working.

Measuring: take the baseline from #384, then open a draft PR, run the same CI jobs against it with the parallel runner enabled and record both results here before we decide. CI runners have fewer cores than a development machine, so the gain there will be smaller than locally.

Ngôn ngữ chính
PHP
Star
42
Fork
29
Merge trung bình
21 giờ 6 phút
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wp-cli/wp-cli-tests

Tất cả issue của wp-cli/wp-cli-tests

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.