Skip navigation

I believe that a white box approach to testing things is very significant. I believe in this especially since this can help you cost-effectively target ares of the application that you think are weak. Once you get some systems-thinking in place, white box testing can really replace what manual/ black box testing can do. If that statement sounds too open/radical, think again ;)

I think there is a lot of connection between the framework used to carry out development and the kind of bugs that crop up in the application. The reason for this extends beyond bugs that are introduced by the framework itself. Each framework has its own set of conventions and often some of these conventions are what really bring in the bugs. Most conventions/practices are meant to solve common problems, but misunderstanding them can mean that these coding conventions end up not just solving common problems, but raising common/similar defects as well.

A typical example I can sight with Rails Applications is with the use of helper methods.

As a common practice, I have noticed the following convention in the application_controller.

class ApplicationController < ActionController::Base
 helper :all
end

A convention that rails has to include all helpers, all the time. This is not really about how the encapsulation is broken. Its about how easy it is to break it. Its clearly a convenience that the framework provides. Needless to say, helper methods are allowed to have common names and introducing a convention like this into a mature code base can lead to unexpected behavior.

In Rails, view tests are uncommon and its really up to a tester to catch these bugs. The point I am trying to make is that there is a lot of connect between the conventions that frameworks force on programmers and the bugs that the application has. Its high time we had another bunch of conventions for Testing. Conventions that help testers focus on specific factors/parts of the application based on patterns of bugs that have been observed in the framework/conventions used for development. Optimization! Enterprise! Convention over Configuration!

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: