How to incorporate your ears to check log files

Today my irritation level was high enough to act. What happened?

While working on some Capybara tests, I was switching forth and back between the editor, the browser and the logfile terminal on the 2nd monitor to investigate if errors showed up in the log file.

If you ever tailed a file on a Linux system, you might have seen, that the log file is moving quite fast in your terminal window. Even on font size 6 its not easy to catch a certain ERROR label.

Opening a huge file and searching within is also not a pleasure and tedious, so that was also not an option for me.

Log-Watch

I remembered the Log-Watch tool from James Bach, which plays a sound file everytime a customizable word/phrase is found in a log file.

Alas, my work computer was not Windows based.

Would it not be nice, if there was such a tool for Macintosh?

A quick question into Slacks testers.io tool channel and Richard Bradshaw (@friendlyTester) had a solution at hand.

It basically combines the feature of the “tail” command to continously display the last entries of a given file on the screen with the “grep” command, which searches the input files for lines containing a match to a given pattern list and finally plays a sound file via afplay, if the pattern is found.

Command

tail -f <path-to-log-file> | grep --line-buffered ‘<Pattern to listen to>' | while read line; do afplay <path-to-local-sound-file>/test.wav; done

 

Richard also has a blog post up, which contains also a link into his Github repository.

Next level

That command is working locally. But the log files I use daily are on a remote server, a sandbox in my case. There are no sound files, no audio player and even it there were, its of no use, if it beeps in the server room. Might scare some admins, if it randomly beeps though.

Plus I also don’t want to install stuff on the sandbox. We delete them on a regular base and make new ones. Installing stuff would be another preparation step, which costs time.

I was wondering, if it was possible to use my local Macintosh files and hardware and started to adjust the above solution.

Command for remote files

ssh <user@remoteserver> 'tail -f <path-to-log-file>' | grep --line-buffered ‘<Pattern to listen to>' | while read line; do afplay <path-to-local-sound-file>/test.wav; done

This combined the command with the feature to log into remote machines via ssh.

 

The Benny Hill theme

Thanks to @simonk the tool channel probably had an earworm for the rest of the day, cause he brought up the Benny Hill theme.

Anyone not familiar, click on play here.

 

Lessons Learned for me

First, we are a global, intensively knowledgable community. As so often in development, someone somewhere might had the same obstacle and can help you out. Or s/he has the right skills to solve your problem. This was an exercise in tester pairing btw.

So reach out and connect. It can only be a win win situation.

 

Second, if something troubles / irritates you enough, it might be worth to investigate and automate it.

Yes, it can be called automation. We created a small line of code to help us in our testing work.

 

Third, remember that we have more senses in our portfolio than “just” our eyes, to watch what the software is doing.

The blink heuristic relies on your visual sense as well.

While smell has become a little out of fashion, even that was used before (Smoke Test anyone?).

If you are in mobile testing, the tactile sense is useful, e.g. when your battery becomes warmer, than you expect.

 

Conclusion

I used this command the whole afternoon, while testing and listening to music.

Believe me, the sound file you choose will be heard, even with music on, cause it is also a kind of blink heuristic for your ears. It sticks out.

This will give you an additional layer of information in your testing, because you can now make use of two senses instead of one.

The whole “development” might have taken maybe like 30 minutes and I am quite sure, it already has paid off.

 

STWC – Software Testing World Cup – Changes for 2015/2016

The official STWC website has gone public with the new information about the next STWC.

There are some changes and one of the obvious ones is the team registration fee of 40 Euro per Team (10 Euro per team member).

While the reasoning can also be found on that site, I want to explain some more about it.

As stated there are basically two major reasons, why we decided for that.

1. No Shows

Anyone who has ever organized an event, a user group or even a dinner table booking for people, who are not direct friends, might have experienced it.

There is most often a quota of “no shows”. Meaning people who said, they would come, but then don’t.

And I mean, without informing the organizer upfront; they just don’t show up.

Btw. that might be a reason, why sometimes e.g. airlines or hotels are overbooked. They expect, that a certain percentage of people are not showing up.

 

Why is this a problem for STWC?

Since each STWC continental round has a limit how many teams can participate, the teams who register, but then don’t show up, are blocking slots for teams, who are really interested and would love to play.

Why do we have limits on how many can particpate, its online anyway?

Well, one main concept of STWC is the evaluation of the teams deliverables by (as we call them) judges.

Each team is evaluated at least by two judges to get two opinions.If they are close to each other, fine. If not we bring in 1-2 more judges.

This takes a lot of time and commitment of the judges.

Most (if not all) are doing this as a voluntary, unpaid task next to their main jobs and private life.

With a round limit of 250 teams one can do the maths….

Often a judge has to evaluate around 20 teams in a period of one month.

Depending of course, that we get that many volunteers who want to participate as judges.

 

2. Raising money to realize the unique points of STWC

A lot of people invest their own, unpaid time for STWC. Be it the players, the volunteering judges from all over the world and also the organizers.

One of the awesome aspects of STWC is, that we want to fly in the winner team from each continent and pay their flight and accomodation. And also the professional live recording and video streaming.

I personally think, that is a great incentive to participate, cause a) it gives the event something unique and elevates it from a pure online event and b) it gives the team members a chance to participate in a good conference, make contacts with other testers from around the world and exchange with other known, public names.

This of course comes with a price tag.

While we were lucky to ask at the right time and place and could convince HP to be the global tool sponsor, it is not running so smoothly every time.

So we decided to take some money from the teams.

We could not realize the intial idea which we had, which was to charge each member 10 units of their local currency (peso, euro, dollar, yuan, rupees, etc.) to balance out the conversion differences and we thought to mirror the Big Mac Index .

Sadly it was too complicated, cause Diaz & Hilterscheid would collect the money (since they paid the tickets, etc.) and the tax issues involved were too much a headache and complicated, that we scrapped that idea.

This team fee will pay forward to the costs involved.

And, on a personal note, I think, some investment intoa testers learning should be worth to each of us. For some, 10 Euro is still something, but for a lot of folks that money is equivalent to 2-3 beer or other beverages of choice.