Testing Suites for .Net / WPF based Applications
aI am interested in automating some application / system level tests on an existing product range. Our product range consists of several distinct applications, written in .Net 3.5 and using WPF for the presentation layer.
开发者_运维知识库Ultimately, I am interested in finding an application testing suite that is capable of executing scenarios and reporting results. I would like some way to define/record the scenarios, and see which scenarios passed/failed testing.
I do not have any experience in the area of automated application testing. Is anyone able to recommend a testing suite?
Some other frameworks -
White UI Test framework:
http://www.codeplex.com/white
https://web.archive.org/web/20160204042701/http://blogs.msdn.com/b/john_daddamio/archive/2008/04/04/testing-wpf-applications-with-the-white-ui-test-framework.aspx
TestApi - a library of Test APIs:
http://testapi.codeplex.com/
XAML Compliance Suite V1:
https://web.archive.org/web/20160213183047/http://blogs.msdn.com/b/llobo/archive/2010/07/07/xaml-compliance-suite-v1.aspx
Also have a look at these articles -
Automating UI Tests In WPF Applications:
http://msdn.microsoft.com/en-us/magazine/dd483216.aspx
and WPF Application Quality Guide:
http://windowsclient.net/wpf/white-papers/wpf-app-quality-guide.aspx
and a similar question on stackoverflow also have some more links -
How to test a WPF user interface?
How to test a WPF user interface?
Please try Test Complete http://www.automatedqa.com/products/testcomplete/top-reasons-to-try/
I use QTP. It's nice, but expensive. Selecting a tool depends on amount of money that you can spend.
I would avoid the record and playback systems because they produce fragile tests. These systems seem ok until you change the app, and you're forced to recode your tests.
A newer and more agile friendly approach is in tools like IcuTest (http://www.IcuTest.com/).
Visual Studio 2010 includes a new product for doing GUI testing. Test Manager 2010 is included in Visual Studio 2010 Test Professional and Visual Studio 2010 Ultimate and enables recording and playback of actions in GUI applications as well as rich reporting.
The tools integrate with Team Foundation Server 2010 to store test cases, test runs and log bugs that are found during testing.
This blog post (eventually!) includes an overview of the testing process and tools in Visual Studio. Focus on the Testing Workflow and have a look at the included videos for more information.
If you're willing to put in the work, I have found the White Framework, which is built on the Microsoft UI Automation API (supports WinForms, WPF & Win32), to be the most flexible and customizable approach. I have used to develop a GUI automation test suite of over 2500 tests (>12 hours run time).
The White Framework can also be integrated into either NUnit or MSTest.
NUnit is the generally accepted best .NET unit tester. In terms of integration testing etc, not sure about that.
If you want to test your WPF applications, pretty much the only way is to use MVVM. Separating out the view data from everything else allows you to unit test dummy view's. If you haven't done this already it's probably not worth it, since it's such a large architectural change.
精彩评论