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

print tags in gherkin-terminal-reporter

Đang mở
#476 4 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
68/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ệ
python
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu với entry point --gherkin-terminal-reporter và so sánh output của nó với các tag đã có trong cucumber JSON. Theo dõi cách output scenario.py được hiển thị được ghép lại, sau đó thêm các tag dễ đọc cho con người vào output của terminal và xác minh rằng pytest -vv hiển thị chúng cho các scenario có tag.

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

Mô tả

feature good first issue

Hello, I am using the Gherkin tags in the feature specification to refer scenarios to different software requirements and it would be really convenient to be able to get those tags printed when I run pytest with the --gherkin-terminal-reporter option. I know they are generated into the cucumber JSON but that's less human readable as of right now.

The feature looks like this:

@R1.1 @R1.2
  Scenario: Send packages to socket
    Given a service listening on a random socket
    When tool sends "2" packages to socket
    Then "2" packages are received in the service

So it would be great to get the tags formatted in some way in the output of the test:

$ pytest --gherkin-terminal-reporter -vv
===================================================================================== test session starts =====================================================================================                                                                          

tests/pacsio_test.py::test_send_packages_to_socket <- utilities/pacs_io/.venv/lib/python3.8/site-packages/pytest_bdd/scenario.py 
Feature: Tool for network testing
    Scenario: Send packages to socket
    Given a service listening on a random socket
    When tool sends "2" packages to socket
    Then "2" packages are received in the service
    PASSED
    (tags: R1.1, R1.2)
Ngôn ngữ chính
Python
Star
1.5k
Fork
251
Merge trung bình
1 giờ 44 phút
Pull request đã merge (30 ngày)
3

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 pytest-dev/pytest-bdd

Tất cả issue của pytest-dev/pytest-bdd

Issue tương tự

Thêm issue về Python

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.