Open Discussion Thread: "Test Smarter, Not Harder," by Scott Sehlhorst
This is the comments and discussion page for the developer.* article, "Test Smarter, Not Harder," by Scott Sehlhorst.
Sehlhorst writes, "When we’re testing any software, we are faced with the tradeoff of cost and benefit of testing. With complex software, the costs of testing can grow faster than the benefits of testing. If we apply techniques like the ones in this article, we can dramatically reduce the cost of testing our software. This is what we mean when we say test smarter, not harder."
If you have not read the article yet, you can read it here. Then click on the Discussion link to return to this page.
Thank you. I found this a
Thank you. I found this a concise, lucid summary of some important points. It helps to put into concrete description what some testers may already intuit but which they are unable to formalize, particularly in the face of the (perhaps poorly defined) complexity and pressure of a current project.
Great, but Incomplete
Great thoughts, but in my world failure often comes from (far) outside what had been originally considered/tested. Networks fail, machines fail, everything the software depends on can, and does fail—often in new and unique ways.
For example, the other day some application running on a user's box conflicted with a required component install during the application install. There was no feasible way this problem could have been detected in test, and definitely no way to fix it. The only option left was to simply manage the risk I'd retained by using the .Net 2.0 CLR. (i.e. fix the user’s computer)
In short, the two biggest problems I face in testing are:
1. Figuring out what to test (often not in the traditional "testing" domain)
2. Developing a strategy for managing the retained risks. (i.e. component support, network/system failure support, etc.)
I'd be interested if any of ya'll have thoughts, or better yet would write articles on either of these topics.
Non-Code-Related Software Failures
Along the lines described by Jeff Staddon, I think an article describing software failures that can happen (especially during deployment) that have nothing or little to do with the quality of the code would be very interesting. Over the years I have observed that a huge percentage of bugs, especially bugs that come up during deployment or shortly after a deployment, are configuration-related bugs, not code related bugs--someone forgot to add an index to a table, or to set a permission, or to update a config file. What usually happens is that the programmer(s) take the blame for the "buggy deployment." One configuration management problem in a critical deployment can negate thousands of line of great code in the minds of managers who do not make the distinction between the different kinds of problems.
I've developed some techniques that alleviate these kinds of issues, including the practice that the developer writes deployment instructions as he or she is coding the solution. This works especially well in an environment with a lot of task switching; it's easy to forget configuration details between the time you write the code and the time you deploy it.
I've been contemplating a blog post on this topic for awhile, but it would be even better with a full article treatment. If someone with the relevant experience is interested in writing the article, I'd love to publish it in developer.*.
Best,
Dan
Liquid Modernity
Interesting comments. Upper level managers nail ya for things that happen beyond the edges.
I found that a List box in the test form for my scanner is unnaturally short versus its size when I developed it. I haven't investigated the problem, but if it is Microsoft's "fault", if the size of the listbox is not truly controllable, part of me wants to say to the user, it is not my "fault".
But this wars with another part of me that has in the past overcome the limitations of crap software, and managers pay programmers to do this.
In this connection, there's a very interesting book by Zygmunt Bauman, Liquid Modernity, in which he contends that because industry as a whole has moved from hardware (the fearsome great whacking machines of my youth, from my Mom's Hoover vacuum cleaner which made baby sister cry, to the steel mills of Gary) to software, in which not only computers but countless industrial machines are more a Visual Basic GUI attached to underlying hardware, completely configurable...to the extent that Chicago factories, today, usually require a college degree for their "hands".
Software isn't fully testable because it's in a "liquid" state, where there are so many particles that it's impossible to control all installation collisions.
Having said this, however, it should be noted that some OS and environments encourage this unwanted flow by providing uncontrolled featuritis and a lack of distinction between levels, Windows being a major offender in this regard.
I like your idea of having an installation plan on day one. How about the daily build, from day one?
Open source does appear to install and run better, and the claim is that this is because there are more people to "test" it. This isn't the only reason. It's also because open source coders don't have to listen to demands for crap features AND can add good features without having to go through layers of review and aren't under pressure to deliver crap solutions in order to get market share.
Ain't My Fault
I get asked to fix things that aren't my fault all the time. This is especially common with webapps. I also get asked to make magical things happens that are nigh-on impossible given the toolset we're using.
For example, I've seen numerous bugs reported because of how WebLogic and IE coordinate to manage the user's session. I can't patch IE, unfortunately. Also, I've been asked (in a bug report) to not allow copy/paste in the "confirm your email address" field in a web form.
When these kinds of things happen, (and of course the QA testers are not malicious--only ignorant of the technical design of the app) I try to approach the subject by saying that, while it seems like this should be an easy thing for us to do, it's not. We could throw a whole bunch of man hours at the issue to see if we could make something happen, but that will cost money and time. Let's let the business people decide if we should do this or not.
That approach usually works pretty well, once the dust settles.
PS: Edward's comments on open-source software are right on target. As long as you've got a dedicated team (or single developer), open source projects can be very nimble and very smart about what features to include. And also very sophisticated at delivering (relatively) bug-free software.


Complex, but worth knowing
I will have to read this at least once or twice more to make sure I grasp the math, but I get the gist of it. Very good information.