Add App UI testing project
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
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- desktop, testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách so sánh project Tests.App hiện có với project Tests.App.UI được đề xuất, sau đó tái hiện thiết lập của DependencyObjectSelectorTest.cs được mô tả trong issue. Trước tiên, hãy đọc thiết lập của template WinUI 3 và các lỗi của Microsoft.NET.Test.Sdk và UITestMethodAttribute. Hoàn tất khi một project kiểm thử UI riêng biệt có thể chạy các kiểm thử trên UI thread bên trong DispatchQueue của một cửa sổ mà không gặp các lỗi entry-point hoặc lỗi tải XAML đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We need a separate project for testing UI-related code from the App project. We currently have Tests.App but we probably should add Tests.App.UI as a separate project.
Test code needs to be launched on a UI thread inside of a window's DispatchQueue.
I've tried doing the following in a new solution to see how feasible it is to do, but have run into issue after issue:
- create
Appproject from winui3 template - create
AppTestproject from winui3 unit testing template - add
DependencyObjectSelector.cstoApp(which doesn't depend on anything so it's just a simple copy/paste and change namespace) - add
DependencyObjectSelectorTest.cstoAppTest, and accept the suggestion to add a project reference toApp - click the greyed out test run icon beside the test method, accept the prompt to install
Microsoft.NET.Test.Sdk
click the green test run icon Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point.- add
<StartupObject>AppTest.Program</StartupObject>(which is the XAML generated main from winui 3) An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute 'Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer.UITestMethodAttribute'.
I've also tried using the entry point from Microsoft.NET.Test.Sdk (which is empty) and doing winui 3 startup in an AssemblyInitializer, and it gets a bit further but I run into XAML loading issues.
- Ngôn ngữ chính
- C#
- Star
- 29
- Fork
- 12
- Merge trung bình
- 4 giờ 15 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 coder/coder-desktop-windows
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
coder/coder-desktop-windows#166 ·
-
CoderVPN Unsigned Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
coder/coder-desktop-windows#179 · 3 bình luận ·
-
bug coder-desktop networking
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
coder/coder-desktop-windows#177 · 2 bình luận ·
-
bug coder-desktop
coder/coder-desktop-windows#171 · 1 bình luận · 1 người được giao ·
-
bug github-sync
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
coder/coder-desktop-windows#170 ·
Tất cả issue của coder/coder-desktop-windows
Issue tương tự
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1532 ·
-
core dependencies
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
C#/.NET Roslyn LSP Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Suspicious code fragments Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DotNetNext/SqlSugar#1458 ·