Web Development Business

The Executable Code Review

Tim Broyles Programming, Testing Leave a Comment

Testing has a bad rap. The thought of writing unit tests to exercise code with the goal of 100% code coverage can be overwhelming for many projects. The number of man-hours to set up tests, create mocks when needed, test boundary conditions, contrive odd ball test cases can take some steam out of the project. If this is the definition of test, then yes, writing these types of tests can be tedious and feel meaningless.

I am a proponent of writing tests with a narrow focus. The tests I describe here show the completion of a story or the resolution of a bug. With this narrowness in mind, the task is much less daunting. My goal now is not about code coverage, but more about quality code. With this test, I want to be able to demonstrate to myself (and to whoever is reviewing my changes), that I have successfully resolved my task.

In this blog I will talk about my suggestions for writing meaningful tests in the context of a code review.



A JavaScript Unit Test Trap

Mark Adelsberger JavaScript, Technology Snapshot 3 Comments

You’re a few months into writing a shiny new web app, and the team just settled on some new standards for data structures used for communication with the server. You’ll need to refactor a few pages, but that’s not a big deal. Your team has been pushing good unit testing practices, and you’ve got great coverage for the affected code. …



Short on Time? Switch to Groovy for Unit Testing

Rik Scarborough Testing Leave a Comment

If you are a programming today, you have most likely heard of Unit Testing or of the Test-Driven Development process. I have yet to run into a programmer that has not heard of both, nor one that says Unit Testing isn’t important. In casual discussions, most programmers seem to feel that Unit Tests are very important and that Test-Driven Development …



Checking Sanity in TDD Testing

Rik Scarborough Testing Leave a Comment

Whether you’re in the process of fully adopting Test Driven Development (TDD), providing unit tests after you have written your code, or something in between, the question that you will soon ask is: “What should I be testing?” The simplest answer to me is: any place where you can isolate and test just your code. In my opinion, Test-Driven Development …