Replies: 2 comments 1 reply
-
For what its worth, there already was some discussion around this topic in #1108 and in #6258. I don't think there is a clear answer to this question yet. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Usually, UI is not really unit testable, the backend is. What some people do is use the MVVM pattern to keep the UI frontend code as small as possible to then be able to cover more code. You can also try to put some stuff unrelated to the frontend in a separate "Library" assembly, which can be then referenced by the unit tests project AND the app itself. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I followed this guide https://devblogs.microsoft.com/ifdef-windows/winui-desktop-unit-tests/ but can't get this to work from the moment I add my app as a dependency to the test project which makes this flow hard to use.
So wondering what the best setup is to unit test code in a package WinUI3.0 desktop app? I only have an app & packaging project, so no library projects. All the code is in my app project since the total amount of code is still small.
Are there any samples available? Should I go for MsTest or nunit? And in which setup could I easily mock WinUI3.0 classes, methods to get some unit tests running?
Beta Was this translation helpful? Give feedback.
All reactions