我们能否单元测试查看​​的MVC('V')? [英] Can we unit test View ('V') of MVC?

查看:70
本文介绍了我们能否单元测试查看​​的MVC('V')?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

复制:单元测试的景观

有什么办法进行单元测试查看​​?
我相信,我们可以测试模型与放大器;控制器,但不知道如何进行单元测试查看​​?

Is there any way to unit test View? I am sure that we can test Model & Controller but don't know how to unit test View?

是值得测试查看?

推荐答案

有没有意见抛弃$ C $现在落后C吗?那么,你要测试?如果要测试控制器,那么你只需要一个成功的视图结果表明观点的作品。而不要去的pre编译观点或任何麻烦,这将启动拖动任何大规模的项目倒在持续集成方面,并建立

Haven't views abandoned code behind now? So what are you going to test? If you are testing the controller, then you just need a succesful view result to show that the view works. Rather than going to the trouble of pre compiling views or whatever, this will start to drag any sizeable project down in terms of continuous integration, and build.

这篇关于我们能否单元测试查看​​的MVC('V')?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆