Unit Testing for C# Developers

所在平台: Udemy

课程主页: https://www.udemy.com/course/unit-testing-csharp/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:C#开发者的单元测试 课程概述: 想象一下:您对代码进行了简单的修改,结果却发现自己引入了十几个意想不到的错误。这种情况很常见,但有一个好消息:单元测试能让这种情况成为过去。无论您是听说过自动化测试或单元测试并希望进一步了解,还是曾尝试学习但感到迷茫,终究可能是测试变得肥大和脆弱,影响了进度。无论如何,您需要的是一门能教授您这种重要技能的课程,从基础知识到高级水平应有尽有。 单元测试的定义: 简单来说,单元测试是编写代码来测试您所编写的代码,并以自动化的方式运行这些测试的实践。 学习单元测试的原因: 很多人会疑惑:为什么要编写额外的代码?这不是会浪费时间吗?为什么不直接像最终用户一样运行应用程序进行测试呢?这种思维方式是很多人都会犯的错误。手动测试复杂应用程序或遗留应用程序的各项功能既乏味又耗时,随着应用程序的增长,手动测试的成本呈指数增长。您永远无法百分之百确定是否完全测试了所有的边界情况,因此在发布软件的那一刻,您对代码是否真正有效毫无信心! 研究显示,软件开发生命周期中越晚发现问题,企业的成本就越高。自动化测试能帮助您在编码时尽早发现错误,测试是可重复的,您只需编写一次,便可反复运行。 使用单元测试的好处包括: - 提前捕捉并修复错误,避免在生产环境中发布应用程序 - 编写更好、错误更少的代码 - 生产设计更优的软件,具备扩展性和低耦合性 - 提供快速反馈,让您知道代码是否“真正”有效 - 强迫您考虑存在的边界情况 - 更快速地测试代码 - 在编写新代码时了解是否破坏了任何功能 - 有信心地重构代码 - 充当代码功能的文档 - 节省时间和金钱 这是一项对高级开发者来说非常宝贵的技能。越来越多的公司认识到自动化测试的优势,因此这对于高级开发者来说是必备的。如果您希望在编码职业中达到更高层次,这门课程可以帮助您。您不需要任何自动化测试的先前知识,仅需三个月的C#编程经验。 在本课程中,您将学习: - 高级编码人员的秘诀——编写优秀单元测试的最佳实践 - 保持测试清晰、可信和可维护的技巧与窍门 - 避免的陷阱——反模式 - 如何将遗留的不可测试代码重构为低耦合且可测试的代码 - 所有关于依赖注入的知识——每个编码者必须了解的内容 - 模拟的力量——使用模拟的时机和避免模拟的情形 您将获得: - 6小时的高清视频教程和具有15年以上经验的高级编码者的指导 - 逐步解决方案的练习 - 可下载的源代码 - 终身访问权限 - 可在任何设备上随时在线或离线访问 - 完成证书以展示给当前或未来的雇主

课程评论(0条)

课程详情

Picture this: you make a simple change to the code and suddenly realize that you created a dozen unexpected bugs. Sound familiar? You're not alone! Good news is, unit testing can make this a thing of the past. Maybe you've heard of automated or unit testing before and you're keen to learn more. Or perhaps you've tried to learn it and got a bit lost or ended up with fat and fragile tests that got in the way and slowed you down. Either way, what you need is a course that will teach you all you need to know about this essential skill - from the basics, right through to mastery level. What is unit testing? In a nutshell: it's the practice of writing code to test your code and then run those tests in an automated fashion. Why learn unit testing? Why write extra code? Wouldn't that take extra time to write? Would that slow you down? Why not just run the application and test it like an end user? Thinking like this is the mistake lots of people make. I used to make it myself. I've had to learn the hard way! I learned pretty fast that if you're building a complex application or working on a legacy app, manually testing all the various functions is tedious and takes a significant amount of time. As your application grows, the cost of manual testing grows exponentially. And you're never 100% sure if you've fully tested all the edge cases. You're never confident that your code really works until you release your software and get a call from your boss or an end user! Several studies have shown that the later a bug is caught in the software development lifecycle, the more costly it is to the business. Automated tests help you to catch bugs earlier in the software development lifecycle, right when you're coding. These tests are repeatable. Write them once and run them over and over. The benefits of using unit tests are: help you to catch and fix bugs earlier, before releasing your app into productionhelp you to write better code with less bugshelp you to produce software with better design - extensible and loosely-coupledgive you rapid feedback and tell you if your code *really* worksforce you to think of edge cases that you didn't realize existedtest your code much fastertell if you have broken any functionality as you write new codeallow you to refactor your code with confidenceact as documentation about what your code doessave you both time and money A valuable skill for senior developers More and more companies are recognizing the advantages of automated testing, that's why it's a must-have for senior coders. If you're looking to reach the higher levels in your coding career, this course can help. You don't need any prior knowledge of automated testing. You only need 3 months of experience programming in C#. With this course you'll learn: senior coder secrets - best practices to write great unit teststips and tricks to keep your tests clean, trustworthy and maintainablethe pitfalls to avoid - anti-patternshow to refactor legacy, untestable code into loosely-coupled and testable codeall about dependency injection - the one thing every coder needs to knowthe power of mocks - when and how to use them and when to avoid You'll get: 6 hours of HD videotutorials and guidance from a senior coder with 15+ years' experienceexercises with step-by-step solutiondownloadable source codelifetime accessaccess online or offline at any time on any devicecertificate of completion to present to your current or prospective employer

课程标签

0人关注该课程

主题相关的课程