Add App UI testing project
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- csharp
- 领域
- desktop, testing-qa
调研方向
首先比较现有的 Tests.App 项目与提议的 Tests.App.UI 项目,然后复现 issue 中描述的 DependencyObjectSelectorTest.cs 设置。先阅读 WinUI 3 模板设置以及 Microsoft.NET.Test.Sdk 和 UITestMethodAttribute 错误。当一个独立的 UI 测试项目能够在窗口的 DispatchQueue 内的 UI 线程上启动测试,且不再出现所报告的 entry-point 或 XAML 加载失败时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C#
- 星标
- 29
- 派生
- 12
- 平均合并
- 4 小时 15 分钟
- 30 天内合并 PR
- 2
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/coder-desktop-windows 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
coder/coder-desktop-windows#166 ·
-
bug
难度 3/5 1-2 天 新手友好度 52/100
coder/coder-desktop-windows#179 · 3 条评论 ·
-
bug coder-desktop networking
难度 4/5 3-5 天 新手友好度 48/100
coder/coder-desktop-windows#177 · 2 条评论 ·
-
Tray reports Coder Connect as healthy while tunnel/DNS is broken; stale NRPT rule causes downstream tooling to hang or fail可能重新可做 @aslilac 于 36 天前认领,目前没有进行中的 PR。 未关闭bug coder-desktop
coder/coder-desktop-windows#171 · 1 条评论 · 已指派 1 人 ·
-
bug github-sync
难度 4/5 3-5 天 新手友好度 38/100
coder/coder-desktop-windows#170 ·
查看 coder/coder-desktop-windows 的全部 Issue
相似的 Issue
-
ci-failure-cause test-failure
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
area:frontend bug FE hotspot:css mvp P3
难度 1/5 1 小时以内 新手友好度 90/100
klasolsson81/jobbliggaren#1856 ·
维护者通常 1 天内回复
-
Area: App+Library Build
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Aaronontheweb/freshdesk-cli#148 ·