Our Thinking

Ben Lucas

Recent Posts

Effective Unit Testing – Part 4: Entity Framework (continued)

Posted by Ben Lucas on Jul 21, 2014 8:56:30 AM

In my last post, I showed how you could use mocking frameworks and dependency injection to create unit tests for methods that query a database using Entity Framework. In this post, I will show how you can use the same techniques to test data access code that will insert, update or delete a record from the database.

Read More

Topics: Agile Development, Methodologies, Test Driven Development

Effective Unit Testing – Part 3: Entity Framework

Posted by Ben Lucas on Jun 30, 2014 3:00:23 AM

Recently, the data access technology that we have relied on for most of our projects is Entity Framework. Entity Framework is an excellent tool that makes it easy to work with a database using the .NET code that we are most familiar with. However, out of the box, Entity Framework does little to help support automated unit testing. Specifically, the DbContext is not interface-based and does not provide a clean way to support mocks. This makes it difficult to write a unit test that doesn’t require database access, which would result in slow and error-prone tests.

Read More

Topics: Agile Development, Methodologies, Test Driven Development

Reflections on Microsoft Build 2014

Posted by Ben Lucas on Apr 28, 2014 3:14:09 PM

I’ve attended many Microsoft conferences in the past, but this is the first conference where I can honestly say I didn’t attend a single disappointing session. After attending the conference, I thought it would make sense to distill some of the highlights.

Read More

Topics: Microsoft, Professional Effectiveness

Effective Unit Testing – Part 2: Dependency Injection

Posted by Ben Lucas on Mar 3, 2014 2:00:02 AM

In my last post, I mentioned that one problem with my earlier unit tests was their dependency on database access. Having my tests directly dependent on the database created slow-running tests and tests that were prone to failure as the database changed. Over the course of this post, I’m going to demonstrate some of the techniques I have learned that provide the ability to decouple a set of code from using direct database access. Note that the examples are in C#; however, the principles apply to any object-oriented language with a unit testing framework.

Read More

Topics: Agile Development, Methodologies, Test Driven Development

Effective Unit Testing – A Developer’s Journey - Part 1

Posted by Ben Lucas on Nov 25, 2013 3:00:48 AM

For my entire career as a software developer, I have believed that unit testing is an essential activity that is part of delivering a quality product. However, what that means to me has gone through multiple revisions. This post is not intended to give a detailed overview of how to write unit tests or any specific unit testing practice. What I intend is to take you through my journey and a few things I’ve learned as I’ve incorporated automated unit testing into my developer’s tool belt.

Read More

Topics: Agile Development, Methodologies, Test Driven Development

Running Effective Sprint Retrospectives: or, How I Learned to Stop Being the Expert and Learn From my Team

Posted by Ben Lucas on Sep 30, 2013 9:54:09 AM

Most teams that I have had the chance to work with seem to go through the Group Formation Stages of “forming, storming, norming, and performing” identified by psychologist Bruce Tuckman. As a Scrum Master, it is necessary to help teams navigate through these stages so that they can become highly performing teams.

Read More

Topics: Agile Development, Application Lifecycle Management (ALM), Methodologies

Our Thinking - The Online Blog is a source for insights, resources, best practices, and other useful content from our multi-disciplinary team of Onliners.

Subscribe to Blog Updates

Recent Posts

Posts by Author

see all