Feature Request: Tests filters in pipeline
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- testing
Hướng nghiên cứu
Bắt đầu bằng cách đọc OpenTabletDriver.Plugin/Output/OutputMode.cs quanh các dòng 62-90 để hiểu cách PipelinePosition điều khiển việc chèn bộ lọc. Trước tiên, xác định phương pháp kiểm thử cho 0.6.x, sau đó bao quát các IDeviceReports chưa được tiêu thụ và các giá trị PipelinePosition không hợp lệ mà không mở rộng đáng kể phạm vi bao phủ cho các API 0.5.x.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The OpenTabletDriver 0.6.x plugin pipeline has edge cases that can cause filter plugins to incorrectly drop reports.
For plugins with filters targeting the 0.6.x plugin API the following tests should be done.
Plugins targeting earlier API's like 0.5.x should preferably not be covered if it significantly increases the amount of code to maintain.
It is unclear how to implement these tests properly. I currently have 2 ideas:
- Have a separate repository that can be targeted as a GitHub action, that tests the filter in a virtual pipeline, which could be used to test pull requests on this repository in some way.
- Driver gets a "Plugin Developer" mode that would actively check active filters for these issues - this would help plugin developers from making these mistakes unintentionally.
While outside of the scope of this issue, future driver plugin API's should preferably be designed in a way that removes these necessary tests.
Minimum Test Coverage
At the very minimum, the tests should check for the following
Properly passes through IDeviceReports
Some filters incorrectly only pass through ITabletReports. Normal filters should ensure Consume(IDeviceReport) runs Emit?.Invoke(). Async filters should ensure ConsumeState() runs OnEmit() (or Emit?.Invoke()) on unconsumed reports.
Sets a PipelinePosition that isn't PreTransform or PostTransform (or an alias)
Currently, the driver only links filters that have a PipelinePosition with one of the above values as seen here:
https://github.com/OpenTabletDriver/OpenTabletDriver/blob/aa345e5b7365647f25c8651f3e35fb7dd4c13676/OpenTabletDriver.Plugin/Output/OutputMode.cs#L62-L90
This means that a PipelinePosition of e.g. 0 would result in the filter never being inserted into the pipeline.
If you think of anything else that would be worth testing for, please let us know here.
- Ngôn ngữ chính
- Shell
- Star
- 9
- Fork
- 39
- Merge trung bình
- 2 ngày 13 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 OpenTabletDriver/Plugin-Repository
-
Add simple PR testsĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
OpenTabletDriver/Plugin-Repository#77 · 4 bình luận ·
Tất cả issue của OpenTabletDriver/Plugin-Repository
Issue tương tự
-
Add missing Cloud Routes keysĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
influxdata/openapi#660 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 3 ngày
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
egoist/mygo#175 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày