Best way to test a Microsoft Surface application

早过忘川 提交于 2019-12-03 20:15:56

Here's how it's done on the Surface team: The Simulator APIs included in the Surface SDK will let you automate sending fake touch input to your app. Combine that with WPF's "Automation Peers" in order to automate validation that your UI is doing the right thing. For Surface controls that are derived from standard WPF controls, you can use the AutomationPeer classes that come with WPF. For Surface-specific controls like ScatterView, the Surface SDK includes it's own set of AutomationPeer classes.

If you're unfamiliar with automation peers (and most people are), here's a good introductory blog post on the topic: http://miketwo.blogspot.com/2007/03/unit-testing-wpf-controls-with.html

The best way to test a Surface application is to install it on a real table and use it. Even better, let other people use it and watch them. Test the applications behavior when it is re-opened from the menu, from a tag, when several people use it, when the internet connection goes down, etc. Some interactions are easier when you're the only user using mice and keyboard...

Of course this is complementary to unit testing and the simulator API, and probably more important in the early stages of application development, while prototyping, than later on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!