Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Resolve cucumber's scenario outline template parameters

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, node.js
Lĩnh vực
testing

Hướng nghiên cứu

Issue không nêu tên tệp nguồn hay test nào. Hãy bắt đầu bằng cách xác định phần render tên scenario-outline và cách xử lý hiện có đối với các tham số template, sau đó so sánh với các tên mong đợi được hiển thị ở đây. Hoàn thành nghĩa là tên scenario được tạo ra thay thế mỗi tham số outline bằng giá trị Examples tương ứng, với độ bao phủ cho nhiều hàng ví dụ.

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

Mô tả

What are you trying to achieve?

When using cucumber's scenario outlines, it's much easier to review your tests results when they don't all have the same name.
So cucumber supports converting the following

Scenario Outline: eating
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |

to instead look like

Scenario Outline: Having <start> cucumbers, and eating <eat> leaves <left>
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |

It was done here https://github.com/cucumber/cucumber-js/issues/267
The 2nd version of this test would produce scenarios with the following names:

  • Having 12 cucumbers, and eating 5 leaves 7
  • Having 20 cucumbers, and eating 5 leaves 15
What do you get instead?

Instead, it appears the template parameters are not resolved when printing the scenario name when the feature is run

Provide console output if related. Use --verbose mode for more details.
In my case my scenario name is User <userType> <id> should have correct credentails.
and I get
User <userType> <id> should have correct credentails. {"userType":"\"issuer_rep\"","id":"10","homePage":"\"landing/info\""}

Details
  • CodeceptJS version: CodeceptJS v3.0.4
  • NodeJS Version: v14.2.0
  • Operating System: Windows/Mac/Ubuntu
  • webdriverio
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
756
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 codeceptjs/CodeceptJS

Tất cả issue của codeceptjs/CodeceptJS

Issue tương tự

Thêm issue về JavaScript

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.