In the past, within my team at Innoveo, we had several discussions about the best way to unit test async WPF ICommand. We value quality, so testing is essential to us. We decided to make the methods called by the command internal so that our tests could call those.

What is the problem with unit testing an Async WPF ICommand? The problem is that the command is an async void method! So, you have no way to await the end of the execution of your command. So, your test might assert on things that are still executing.

Continue reading

When you build automated WPF functional test using White in which you need to open a file through a Windows open file dialog, you will be confronted with the following issue. Windows open file dialog remember the last path with which you opened a file.

So you might have some unit tests that are green for a while which starts to be red for no apparent reasons.

Continue reading

If you do have Microsoft Source Analysis Tools for C# and JetBrains ReSharper 4.0 installed in you development environment than you might get issue when you run your unit tests through ReSharper Unit Test Explorer and Sessions. As you can read on my bug report feedback:

There is known problem in StyleCop, which prevents build system of VS to report any progress. Unit Testing waits for project to be built. You can switch building to “Never” on Session toolbar and build manually, or uninstall StyleCop

Comment and share

Author's picture

Laurent Kempé

I am an experienced Team Leader & Distinguished Solution Architect with a passion for shipping high-quality products by empowering development team and culture toward an agile mindset. I bring technical vision and strategy, leading engineering teams to move product, processes and architecture forward.


Team Leader, Distinguished Solutions Architect


Illzach, France