问题描述
如何单元测试ASP.NET MVC的意见,你知道吗?
Any idea on how to unit test the views in ASP.NET MVC?
我讨厌遇到死亡的黄色画面,当我启动我的MVC项目只是因为我忘记更新的意见时我控制器改变动作
方法之一名称。
I am sick of encountering the yellow screen of death when I launch my MVC project just because I forget to update the views when one of the Action
methods of my controller changes name.
推荐答案
您使用可以写集成测试但如果你只需要一个快速检查,看看是否你已经在你的意见的任何错误,你也可以尝试在这篇文章中提到的解决办法:How与网络服务器加载它们之前,我可以编译ASP.NET页面。 prebuild你的aspx页面,你是好去!
You could write integration tests using Watin, but if you just need a quick check to see if you've any errors in your views, you could also try the solution mentioned in this post: How can I compile ASP.NET pages before loading them with a webserver. Prebuild your aspx pages and you're good to go!
这篇关于单元测试的看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!