ASP.NET MVC 路由测试被视为单元测试还是集成测试?
因此,我将向我的项目添加一些测试来测试我的 ASP.NET MVC 路由。它们是单元测试还是集成测试?
我觉得它们是一个单元测试,其中集成测试是针对数据库、第 3 方服务(例如 Twitter、文件上传等).. 我通常会在单元测试中模拟的东西。
我问的原因是我正在查看 Ayende 的 Raccon 博客 并注意到他们列出了路线测试作为集成测试。
So i'm going to add some tests to my project to test my ASP.NET MVC routes. Are they a unit test or an integration test?
I feel like they are a unit test, where integration tests are against db's, 3rd party services (eg. twitter, file upload, etc) .. something I would normally mock out in a unit test.
The reason I'm asking is that I was looking at Ayende's Raccon Blog and noticed they have their route tests listed as Integration Tests.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为它们是单元测试。您只是测试端点是否达到特定的控制器操作。我认为这是一组非常孤立的功能。
I would consider them to be unit tests. Your just testing that an endpoint reaches a particular controller action. I think that's a pretty isolated set of functionality.