Hi,
We've got a WPF app we'd like to run automated smoke tests on it. Simple tests like load document, save document, etc, etc. I was wondering if anyone could suggest existing frame works or applications that would help with that.
Thanks!
Hi,
We've got a WPF app we'd like to run automated smoke tests on it. Simple tests like load document, save document, etc, etc. I was wondering if anyone could suggest existing frame works or applications that would help with that.
Thanks!
For testing frameworks both NUnit and MSTest are good. MSTest does have the advantage that it integrates very will with visual studio, so that makes things a bit easier. (There are nunit addins available for vs, but they are quite as fully integrated as mstest).
In terms of how you write the test, if you have written you app according to the MVVM pattern it's pretty simple to have your tests create and run your app using the view models and the commands without actually creating a view.
Even if you haven't used MVVM, hopefully you've still abstracted your logic layers away from your gui, so your tests can call into them without too much difficulty.
In terms of actual GUI testing, you can take a look at the MS UI Automation framework which should allow you to automate parts of your UI to run tests against it. There's a blog post here about how to get going with that, and an article here. There are also some commercial frameworks that overlay the UI automation stuff to make it a bit easier. One example is testautomationfx.