Posts in Software Testing
Two more testing movies
In an interesting discussion today (can't really remember how we got there) I remembered one of the best illustrations of context-driven analysis I've seen in a movie. It was in The Messenger where Dustin Hoffman challenges Joan of Arc in how she found a sword in a field. Every time I watch it, I think of how easy it is to fall into the same trap Joan falls into when we see a problem.

My wife and I also watched a movie more directly related to testing tonight, Man of the Year. Even though the software and software testing shown in the movie certainly leave you wanting more (what do you expect, it's Hollywood) the movie does a great job of showing an ethical problem for a tester. I really enjoyed that aspect of the movie.
What's your credit score?
Every tester has a credit score. You use it every day. Each time you ask a programmer or analyst a question, when you talk to a project manager about your status, when you write up a defect, or when you deliver some other artifact, you are potentially impacting your credit rating.

This week in our online Rapid Software Testing class the topic came up, and it reminded me to relate a recent experience where I upped my street cred. It's worth relating because I think it's an often overlooked aspect of testing. As a tester, many times your effectiveness is relative to your current credit rating. Much like buying a house, even if you have the right information at the right time, you may be overlooked or have to go through a difficult process because of past mistakes or oversights.

In a recent meeting, we had an odd mix of people in the room. We were researching a high profile issue. We had executive management, middle management, project management, architects, technologists, performance testers, key programmers, infrastructure, operational monitoring, and me. I was lucky enough to get called in the night before. This was the status meeting.

At the meeting, several topics were bounced around, many of them works in progress. One of them involved pulling transaction times from a production log. Someone in the room had just pulled down the production log before the meeting. As we discussed the work in front of us, the issue of who would parse the log came up. The super smart Java programmer in the room and I, the tester, were sitting across from each other. We gave each other the "I have it" stare. I threw down the gauntlet and said I would do it.

(I might be exaggerating a bit here, but hey, it's my blog and this is how I want to remember it! We did look at each other, and I did say I would do it. The tumbleweed and high-pitched whistle may or may not have been there.)

Once I had the task, I popped open SciTE and got to work. Here is where the cool part comes in. Standing behind me was one of the more respected architects within the company. A smart, likeable guy, who everyone respects and looks up to. He was looking at my screen.

During the meeting, while the conversation continued, I coded. I filtered most of the conversation, listening/responding only when I absolutely needed to. When I wasn't focused on the conversation, I wrote a Ruby script. Because the architect was looking over my shoulder, I refused to spend a lot of time looking up methods online (pride dictated I had to do it without seeking help), so the code was a bit more complicated then it probably needed to be. In about 10 minutes, I had the finished script and ran it.
@sourceFile = 'C:\\file.log'@

@infile = File.open(sourceFile, "r")@
@responseTimes = []@
@thread9Begin = 0@
@thread9End = 0@
@thread10Begin = 0@
@thread10End = 0@

@#Log file entries look like this...@
@#12:28:29.494 COL D 10 (java_extensions.cxx:1442): ****** BEGIN@
@#12:28:32.914 COL D 10 (java_extensions.cxx:1442): ****** END@

@#0 - 12:28:29.494@
@#1 - COL@
@#2 - D@
@#3 - 10@
@#4 - (java_extensions.cxx:1442):@
@#5 - ******@
@#6 - BEGIN@

@infile.each { | line |@
@currentLine = line.split(' ')@
@if currentLine[6] == 'BEGIN' then@
@if currentLine[3] == '9' then thread9Begin = currentLine[0] end@
@if currentLine[3] == '10' then thread10Begin = currentLine[0] end@
@end@

@if currentLine[6] == 'END' then@
@if currentLine[3] == '9' then thread9End = currentLine[0] end@
@if currentLine[3] == '10' then thread10End = currentLine[0] end@
@end@

@if (thread10Begin != 0) and (thread10End != 0) then@
@responseTimes.push(thread10Begin.split(':')[0] + ", " +@
@(((thread10End.split(':')[0].to_i - thread10Begin.split(':')[0].to_i)*60*60*1000) +@
@((thread10End.split(':')[1].to_i - thread10Begin.split(':')[1].to_i)*60*1000) +@
@((thread10End.split(':')[2].to_i - thread10Begin.split(':')[2].to_i)*1000) +@
@(thread10End.split(':')[3].to_i - thread10Begin.split(':')[3].to_i)).to_s)@
@thread10Begin = 0@
@thread10End = 0@
@end@

@if (thread9Begin != 0) and (thread9End != 0) then@
@responseTimes.push(thread9Begin.split(':')[0] + ", " +@
@(((thread9End.split(':')[0].to_i - thread9Begin.split(':')[0].to_i)*60*60*1000) +@
@((thread9End.split(':')[1].to_i - thread9Begin.split(':')[1].to_i)*60*1000) +@
@((thread9End.split(':')[2].to_i - thread9Begin.split(':')[2].to_i)*1000) +@
@(thread9End.split(':')[3].to_i - thread9Begin.split(':')[3].to_i)).to_s)@
@thread9Begin = 0@
@thread9End = 0@
@end@
@} #infile.each@

@infile.close@

@puts responseTimes@

The best part, it worked the first time I ran it. I copied the results over to Excel, turned my laptop, and presented my results. The meeting wasn't even over and we could talk about the actual data. I got a small verbal pat on the back by the person asking for the information, and we moved on.

Fast forward a day or two...

At another meeting, on a completely unrelated topic, with a room full of different people (except for the architect), we were talking about implementing a new process for an automation issue. As part of that issue, we would need to write some Ruby code to populate some data via a web service.

At one point, I volunteered to write the code to populate the data. That drew some looks from the programmers in the room (I'm just a tester you know). It was at this point that the architect stopped the meeting for a minute to relate what he saw me do in the meeting, writing the code in a hostile environment and it working the first time.

That's the best feeling in the world. Someone else, not even a close friend, stopping a meeting to give you a vote of confidence. And because he has high street cred in the programmer community, I now have higher street cred in that community. It's was more influential then if I had found ten super obscure technical bugs. Probably more influential then if the developers had actually seen me write the simple script (I included it so you could see how simple it is - and I'm sure it could be simpler).

So what's your street cred? How do you build it? How do you cash it in?