Add App UI testing project
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- desktop, testing-qa
Direzione di ricerca
Inizia confrontando il progetto esistente Tests.App con il progetto proposto Tests.App.UI, quindi riproduci la configurazione di DependencyObjectSelectorTest.cs descritta nell’issue. Leggi prima la configurazione del template WinUI 3 e gli errori di Microsoft.NET.Test.Sdk e UITestMethodAttribute. Il lavoro è completo quando un progetto di test UI separato può avviare i test sul thread UI all’interno di una DispatchQueue della finestra senza gli errori di entry-point o di caricamento XAML segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 29
- Fork
- 12
- Merge medio
- 4h 15m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/coder-desktop-windows
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
coder/coder-desktop-windows#166 ·
-
CoderVPN Unsigned Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
coder/coder-desktop-windows#179 · 3 commenti ·
-
bug coder-desktop networking
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
coder/coder-desktop-windows#177 · 2 commenti ·
-
bug coder-desktop
coder/coder-desktop-windows#171 · 1 commento · 1 assegnatario ·
-
bug github-sync
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
coder/coder-desktop-windows#170 ·
Tutte le issue di coder/coder-desktop-windows
Issue simili
-
effort:S P3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nightscout/nocturne#1532 ·
-
core dependencies
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
C#/.NET Roslyn LSP Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Suspicious code fragments Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DotNetNext/SqlSugar#1458 ·