简体   繁体   中英

Debugging WPF a little bit easier in Visual Studio

Simple question:

I'm building a WPF application in which the user is able to input some data (eg: path to specific files). However, I would like to test my application with my own data and this data never moves so each time I want to test my application I have to enter the same data into my application.

I know I can change this data programmaticaly(in xaml or in cs-files) when starting up the application. I was wondering, however, if there is a good way to do this in visual studio without altering my code.

Thanks

You are obviously looking for automated testing.

You can check out Coded UI Tests: http://msdn.microsoft.com/en-us/library/ff977233.aspx

Or simply write unit tests on your UI code (you have separated your logic in a controller class, haven't you?).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM