Why Perl is Ideal for All of Your Automated Testing (1 of 4)

Okay, so I know some jive-turkeys have been talking some serious smack about Perl, and you may even be one of them (if so, you’re a jive-turkey). Here I will attempt to show you how Perl could meet your needs in testing ANY application, in ANY language, in ANY environment, regardless whether or not your program is written for command-line interaction, GUI interaction, or web interaction. That’s quite a claim, no? Well I can totally prove it!
This will be a four-part series on manchicken’s automated testing theory, using Perl. This first installment defines what automated testing should and should not be. Next we will break down into three different posts on how Perl is ideal for unit-level testing, then integration-level testing, finishing up with user-interface-level testing. As always, feel free to link, comment, complain, etc. Try to stay on topic though. Thanks.


What is automated testing?Quick rant on automated testing

Okay, so a lot of you know that I like automated testing. I just wanted to get a few things across before I start making points beyond this. Here are my stances on automated testing:

  • Automated testing should be done before code is written, and updated during the whole life of the code.
  • Automated testing should run quickly, and be safe to run on both development and production environments.
  • Automated testing should not require human interaction beyond the preparation for a run and then firing off test run… until it is done of course.
  • Automated testing does not eliminate quality assurance personnel or the job they do. It merely changes them to finding new problems and designing tests rather than spending oodles of time regression-testing.
  • Automated testing should be controlled experiments. This means it should be done the same way every time. No random data patterns, no assumptions, no pulling from external databases. Fixtures help here.
  • Automated testing should be at various levels: code-unit (object or function level), library functionality integration level, and user-interface level.
  • Automated testing should make the developer’s life easier as well as the QA engineer’s life.
  • When reading automated tests, the test plan should be obvious.
  • In automated testing, hard-coding data is not a bad thing.

Getting Ready for the Move…

Wow, so tomorrow the movers will load the truck, and we’ll be moving down to Champaign from Chicago. What a bitter-sweet move…
There are a few things I’m going to miss about Chicago. One of those things is the fantastic church that I’ve been a part of for years. Another is the community of Hyde Park. This tiny oasis in the south side of Chicago has been such a fantastic home for me, I will sorely miss it. The GameCrazy on 53rd street where I’ve spent many hours and made so many friends, I’m going to miss it.
There are some things I won’t miss. CTA comes to the top of that list. I love being able to get around, but CTA is disgustingly filthy and over-crowded. I understand this is just what happens with public transit in a big city, but it’s still unpleasant. I won’t miss the traffic, I won’t miss the tax rates, I won’t miss the corrupt politics (thanks a lot Stroger, ya jerk), and I won’t miss not being able to drive places. I also won’t miss the corruption that ran all non-union grocery stores out of town (thanks a lot AFL-CIO, ya jerks).
It’ll be a bitter-sweet move, but I think it’s for the better. My plans for going to Champaign include participating in the Perl mongers group down there, introducing a Free Software advocacy group, and opening manchicken’s house of hacking. This will be a fun time for transitions.
Check y’all later. Have fun kiddies.

Registration for Sun's "Open Source"

Okay, so this is going to be a short tirade. Sun Microsystems, here’s a question… if you’re so interested in releasing free and “open source” software, then why the heck do you require registration to access it? I understand asking for address information and checking for automated bots on the disc request form, but just to download anything (solaris or otherwise) you require a user name and password. That’s far from open.
Most online users will tell you that you need to be careful what information you give to who. Spam is a real problem and nobody likes having their name and address sold to third parties.
It would seem as though Sun Microsystems is doing a bang-up job of only paying lipservice to Free Software. I restate that I’d be more than happy to say Sun is now releasing Solaris as Free Software–I like the idea of trying alternative kernels–but their actions display a less-than-transparent and quite hesitant support for Free Software. I can’t help but harbor reservations.

FSF Appeals to Hardware Vendors for Fun and Profit!

Wow, it’s not very often that you see FSF really try to make a business case like they did yesterday. Man was I really impressed with the case laid out, and I really think it will help.
The purpose of this appeal it seems is to persuade hardware vendors to serve our Free Software community with hardware that will suit our specific needs. Wouldn’t that be nice? I don’t know about the rest of you, but I would do backflips for hardware that was FSF certified to work out of the box with my Free Software operating system.
What I found most interesting about this article is that FSF was considerably more permissive than we’re used to seeing them here. Yes, we see the call for free BIOS, and the call for hardware without the need for non-free drivers, but there’s one thing you didn’t see that I expected to see.
There’s a part of this article where FSF asks hardware vendors to consider using a GNU/Linux operating system as the default bundled OS for the hardware. Note they didn’t specify which one. They left that open to interpretation. Does that mean they want you to install the non-free ones that tap-dance all over the non-free stuff? Probably not.
I think this really speaks to what FSF thinks is the biggest threat to those of us who wish to decide what our computers run without anybody else dictating for us: non-free dependencies. Having devices that are crippled without proprietary drivers and hardware that enforce digital restrictions management are an obvious threat to how I–and I suspect many of you–do your computing. Wouldn’t it be awesome if we could take some of these neat alternative kernels and make our own OS’ without having to even use the same kernel? If specs for hardware are available for out-of-the-box machines then it’s much more possible for us to have that.
This means that true freedom is possible. While non-free stuff like Flash and Opera is still a problem, there are multiple browsers available, and only three viable 3D graphics chipsets available… only one of which works well with free software drivers and it isn’t the world’s best.
Hardware compatibility is going to be where the fight goes next it seems. If you’re a hardware vendor and you’re releasing free software packages–particularly FSF-certified ones–let me know and I’ll make a page with links for your hardware on this blog.
Thanks for reading my rant. Good night kiddos.
Check out the full appeal from FSF here!

Expect Windows Genuine Advantage to Suck More Soon.

So I just read an article about how Steve Ballmer and Microsoft are blaming lacking Vista sales on people who are sharing and selling copies they’ve made. As someone who’s seen Vista in action, I think it may have more to do with Vista being a poor product, and the licensing of Vista being so restrictive and cost prohibitive instead. Microsoft likes to blame everything on “pirates” who they insist are stealing something that is truly impossible to steal.
So what’s their solution? Why it’s obvious: make the software enforce rules that Microsoft wants enforced at the expense of user functionality and usability. The only way for Microsoft to enforce their ridiculously restrictive licensing is for them to stick programs into their operating system that monitor user activity and restrict them from accessing certain functionality if these software programs–prooven to be quite buggy in XP SP2–determine that the copy of Windows running is not “Genuine.” This is, of course, Microsoft writing software that meets Microsoft’s needs, and ignores the user’s needs.
Your privacy and your system performance mean nothing to Microsoft if they cannot also restrict you to using the software for only what they want you to do with it, and they’re not afraid to make it known. They call it the “Windows Genuine Advantage” and claim that copies of Windows that Microsoft did not directly profit from can result in systems that are more buggy and virus-prone. I’m sorry Microsoft, but one copy of Windows is just as vulnerable as the next. If you can protect one copy you can protect them all… but I haven’t seen one that you really could protect.
I suggest you read the article and decide for yourself.
Check out this article from theinquirer.net

Sun, do you REALLY care about Free Software?

I don’t know about you all, but I’m starting to get really excited and concerned all at the same time about all of this Sun going for Free Software talk. I’m excited because it would be the first time a major corporation moved its flagship products into Free Software and still managed to make money (thus proving that there are ways to keep the accountants happy without restricting people). I’m concerned because I find it difficult to believe that Sun really intends to make this giant leap.
For the longest time now Sun has been one of the kings of proprietary unix flavors, and its Java libraries and runtimes have been proprietary since day one as well. Sun is without a doubt one of the biggest players in proprietary software. We were all quite pleasantly surprised when we discovered that Java will now start moving to GPLv2 with the classpath exception.
It still seems like they’re holding back. I see a lot of the use of the term “open” still, even though I do see Sun using the word “free” a lot… which is very good. Sun definitely seems to be going in the right direction, and I hope that they succeed–even financially (business isn’t bad)–with their endeavors in Free Software. I really hope that they sincerely intend to free their collection of software, and don’t stop until they’ve got a library of completely Free Software. The CDDL isn’t as strong a copyleft as I like, but it certainly gets the job done.
If Sun really does move towards Free Software, I’ll definitely welcome them to the family and even consider buying some of their hardware. Mmm… freedom!

Okay, Everybody's Talking About Non-Free Bundles…

Wow. So GNU/Linux is just another product to some people. I find that concerning. Torvalds didn’t write it to be a product, Stallman didn’t write the compiler to be a product, and I don’t think the KDE or GNOME folks did it for that reason either. I know I certainly don’t hack to make a product that others can sell while they marginalize my motives. I don’t mind if folks make money, but the very idea that they feel okay with bundling proprietary software with what was supposed to be a system with complete freedom does bother me greatly.
You can marginalize me by pointing out practicalities and hypocrisies, and that’s all fine and dandy. People are monetizing something that they didn’t even participate in making–short of packaging it–and they’re not even paying lipservice to the freedom that it is supposed to represent. It’s not that they ignore it even, it’s that they actively suppress the ideas that founded GNU/Linux and made it great. The concept of Open Source is one with origins in businesses trying to do just this. They wanted to distance themselves from the political and social motivation behind free software, so they couldn’t very well call it free software… so they focused on source code and call it Open Source. It’s not a development methodology, it’s a means of viewpoint discrimination and suppression of ideas that they don’t agree with.
To Redhat and Novell, there is something wrong with you. Your ethics are questionable and you need to seriously reconsider how you’re using software written for social benefit for your personal financial gain. Stop enabling the subjugation of users.
To Canonical, thank you for your mission statement but be very careful with this Linspire deal. Linspire is a proprietary software company that just happens to distribute Free software. They think nothing of distributing proprietary software that exploits users and restricts freedom. I know there’s a lot of money in those revenue shares, but is it worth subjugating Ubuntu users to these proprietary software vendors?
To the open source people, quit taking the work of those who are making software for the purposes of freedom and ignoring their opinions. As much as people like to marginalize Stallman, the guy did coordinate and write the vast majority of the GNU/Linux system. cp, ls, mv, less, emacs, gcc, ld, ar, tar, gzip, grep, gawk, ed, all of these things are GNU programs. Stallman wrote many of them himself. This isn’t open source, this is free software, and it’s worth mentioning the difference.
It is possible to have a company sell Free software responsibly. We need to make sure that in our efforts of commerce that we continue to respect freedom. Thanks for reading my rant. Feel free to flame.

Let it Snow… Please, don't Let it Snow…

Normally I would be thrilled about these weather conditions, but today I’ve gotta drive downstate. This is no good. I’m looking out my window now, and there’s still snow coming down. There was a healthy break, and the radar looks like it’ll break again shortly, but man, I’m hoping that the interstates are clear. I really need to get downstate today, and I pray the weather will let me. It would be very nice if it did.

Beaucoup de Stallman en les Langues Etranges!

Okay, so if you like Stallman, and you like… foreign languages… this is the post for you. YouTube and manchicken proudly present, beaucoup de Stallman en les langues etrages!
(no, I don’t speak french, but like many arrogant people I pretend like I do; if you’d like to translate in the comments, please feel free)

I love YouTube. I encourage you to learn now to rip flash into AVI for tthe purposes of using Free Software with your YouTube. Someone should write a KIO slave for that (hint hint).
I’ll be announcing a Free software bounty here soon. If you’re interested, pay attention to my next post for specs and amount!!!

Remember the Ubuntu Wiki!

Hello all you happy people. I’ve been noticing that people–myself included–are asking many questions without checking available resources first. This is my way of chastising myself and reminding others of this wonderful thing that Ubuntu did. It’s called a Wiki, and it is of near-infinite use. Almost anything that you want about your Ubuntu system you can learn from that Wiki. This includes things like tutorials on how to install codecs, setting up MythTV, setting up Xen, and many other useful things.
Just look how useful they are. Here’s how you can install some codecs…
Just visit http://wiki.ubuntu.com and search. I am always amazed at how simple it is to find information there.