Headline: The only real way to be Agile is if you have healthy automated testing. (See Unicorn Series Overview for other topics.) Results Let’s start with some results of the practices described here: Quality: Customer reported bugs range from 1 to 10 per year, despite thousands of users Cost: There is no dedicated testing team … Read more
Posts Tagged ‘Unit Testing’
Unicorn Series–Automated Testing
Filed under: Technology | Tags: Agile, Azure, Unit Testing, Visual Studio
Unicorn Series Overview
Filed under: Technology, Work | Tags: Agile, ASP.NET, Best Practices, Cloud, Quality, TDD, Unit Testing, VIsual Studio 2017
Headline: All the modern software development practices really do make significant business impact. Contents Automated Testing Disclaimer: As usual, there is not information in this series that would be considered proprietary information for C&C Reservoirs. This is the overview and index for a series on software development practices the team I’m leading has been using … Read more
How can I unit test unsubscribing from an event? (C#)
I’ve seen some strange bugs that occur when you don’t properly unsubscribe from events. But it seems I’m always stuck when it comes to unit testing that. Well, I use Moq for most of my mocking and there are some techniques you can use for testing that your subscribed, namely by Raise(ing) the event in … Read more
How to Write Bad C# Code
Filed under: Technology | Tags: Code Analysis, Unit Testing, Visual Studio 2013
In case you’re afraid Microsoft might help you write some good C# code, here’s a list of the top tips to make sure you still write bad C# code. Now I’m sure that’s not the objective, but when you read this post you’ll frankly wonder why it is that we still see so much bad … Read more
Visual Studio 2012 testmc Code Snippet
Filed under: Technology | Tags: TDD, Unit Testing, Visual Studio 2012
Headline: This contains the code for the first code snippet I install when I have a new installation of Visual Studio along with the steps to get it into the right location. The Result The first time I saw this format for unit tests was in some work the Microsoft ASP.NET MVC (Model View Controller) … Read more
Where is TestContext.BeginTimer()?
Filed under: Technology | Tags: Unit Testing, Visual Studio 2012
This post outlines my (with help of others) solution to keeping my unit tests working in the absence of TestContext.BeginTimer() and TestContext.EndTimer(). These seem to be missing in Visual Studio 2012 and I can’t find any posts… so I assume no one else uses this pattern. What’s Broken? Here is a sample unit test that … Read more
TDD Saves Time When You Need It Most
Filed under: Popular, Technology | Tags: Popular, TDD, Unit Testing
In the life of a project when is time most precious? The first day? Or the last day? Writing unit tests makes sense, but are you disciplined enough to write them? I understood the value of writing unit tests and had used them on numerous projects. I knew you should write them but I had … Read more
A Strategic Case for Unit Testing
Filed under: Popular, Technology | Tags: Popular, Strategy, Unit Testing
There is a certain level of velocity and quality that you will never reach without effective unit testing. I’ve had an unusual number of queries about unit testing during the past few days. As a result I thought I would put a more complete description together. Definition I’m not going to spend a great deal … Read more
Did I Ever Mention I Like TDD?
I’m working to change an older application to one that uses the MVVM (Model-View-ViewModel) pattern. I’m trying to change it one piece at a time, and what a hassle it’s become. I’ve come to the conclusion that a complete re-write is in order. And when I re-write I’ll be using TDD (Test Driven Development). Singe … Read more
MVC 3 Breaks Error Tracking in CodeSmith Insight
Filed under: Technology | Tags: CodeSmith, Insight, Unit Testing
I finally have the Crash Reports working again with CodeSmith’s Insight. The release of MVC 3 provided a new way to deal with errors using the HandleErrorAttribute. The changes to the Global.asax.cs file look something like this: Application_Start protected void Application_Start() { AreaRegistration.RegisterAllAreas(); // Added this when converting to MVC 3 RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); … Read more