当前位置:网站首页>Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
2022-07-07 04:24:00 【Technology feast】
problem :
I realize this is a duplicate of about 20 different posts, but none of them are specific to MVC4, and none that I've seen really answer all of my questions. I realized it was about 20 Repetition of different posts , But none of them MVC4 Peculiar , All the posts I have seen have not answered all my questions .So far my first foray into the world of TDD has been frustrating to say the least. up to now , My first foray TDD The world is at least depressing .Most of what I've tried to do seems incompatible with MVC 4 or next to impossible without using poorly documented third party libraries I don't quite understand yet. Most of what I try to do seems to be related to MVC 4 Are not compatible , Or if a third-party library with incomplete records is not used , I don't quite understand .
What I want to be able to do, is write a tests that will test my Controller Actions, The Model they're passing and The View the action is sending the model to. What I hope to do is write a test to test my controller action , They pass on models and see Action is sending model .I want to test if the view exists, I want to test if the model being passed is the right type for the view, I'd like some way to test if it will process properly. I want to test whether the view exists , I want to test whether the passed model is the correct type of view , I want some ways to test whether it will handle properly .I also want to be able to test my routes. I also hope to test my route .And testing Authentication filters? And test and verify the filter ?
I want a way to unit test ASP.Net MVC that will leave very little to chance. I want a way to ASP.Net MVC Unit test , This method has little chance .
Testing the Model output of an Action seems easy enough, but testing the views has been next to impossible. test Action Of Model Output seems easy , But testing the view is almost impossible .
So here's my list of questions: So this is my list of questions :
- Once I test the action and get the action result, how do I test to see if the view it wants exists? Once I test the action and get the result , How can I test to see if the view it wants exists ?
- How do I test my routes? How do I test my route ?
- How can I test to be sure my views are being processed properly? How do I test to ensure that my point of view is handled correctly ?
- What is really "best practice" for THOROUGH unit testing of ASP.Net MVC 4? What is? ASP.Net MVC 4 Of THOROUGH Unit testing is really “ Best practices ”?
- How do I unit test forms authentication? How to perform unit test form authentication ?
- How do I unit test Action Filters? How to unit test the action filter ?
I'd prefer to use the built in Visual Studio test projects, but if I must use NUnit, I must. I prefer to use built-in Visual Studio Test project , But if I have to use NUnit, I have to do this .I just need to make sure it gets done properly. I just need to make sure it's done correctly .
Thank you in advance for your responses. Thank you in advance for your reply .
EDIT: I also couldn't get NUnit working with my MVC4 app because of some incompatibly with the version of .NET one of the assemblies was compiled in. edit : I can't let NUnit Use my MVC4 Applications , Because some software is related to .NET Version incompatible .
Solution :
Reference resources : https://stackoom.com/en/question/cgne边栏推荐
- Antd comment recursive loop comment
- POJ training plan 2253_ Frogger (shortest /floyd)
- Ssm+jsp realizes enterprise management system (OA management system source code + database + document +ppt)
- In cooperation with the research team of the clinical trial center of the University of Hong Kong and Hong Kong Gangyi hospital, Kexing launched the clinical trial of Omicron specific inactivated vacc
- Mongo shell, the most complete mongodb in history
- 史上最全MongoDB之Mongo Shell使用
- The first introduction of the most complete mongodb in history
- Implementation of binary search tree
- [written to the person who first published the paper] common problems in writing comprehensive scientific and Technological Papers
- JetBrain Pycharm的一系列快捷键
猜你喜欢
接口自动化测试实践指导(中):接口测试场景有哪些
图灵诞辰110周年,智能机器预言成真了吗?
数学分析_笔记_第10章:含参变量积分
Why does WordPress open so slowly?
【OA】Excel 文档生成器: Openpyxl 模块
Video fusion cloud platform easycvr video Plaza left column list style optimization
EasyCVR无法使用WebRTC进行播放,该如何解决?
[multi threading exercise] write a multi threading example of the producer consumer model.
测试/开发程序员怎么升职?从无到有,从薄变厚.......
[OA] excel document generator: openpyxl module
随机推荐
视频融合云平台EasyCVR视频广场左侧栏列表样式优化
用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30
golang 压缩和解压zip文件
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法
超越Postman,新一代国产调试工具Apifox,用起来够优雅
Web service performance monitoring scheme
Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
Food Chem | in depth learning accurately predicts food categories and nutritional components based on ingredient statements
Unity3d can change colors and display samples in a building GL material
idea gradle lombok 报错集锦
Practice Guide for interface automation testing (middle): what are the interface testing scenarios
2022中青杯C题城市交通思路分析
Formation continue en robotique (automatisation) - 2022 -
EasyCVR集群版本添加RTSP设备提示服务器ID错误,该如何解决?
[record of question brushing] 2 Add two numbers
POJ training plan 2253_ Frogger (shortest /floyd)
Redis source code learning (30), dictionary learning, dict.h
【刷题记录】2. 两数相加
各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
EasyCVR视频广场点击播放时,主菜单高亮效果消失问题的修复