Software QA FYI - SQAFYI

SQA Lab Essentials

By: Mitch Allen

You've been told that you have to test a product on Windows ME, Windows XP Pro, XP Home, XP Media Center, Windows 2000 Professional, 2000 Server and Windows 2003 Server. To make matters worse, the product uses Word or Excel functionality. So you also need to test all those operating systems using Microsoft Office 2000, Office XP and Office 2003. Fortunately no one has mentioned any foreign language versions - yet. To make matters even worse, you only have two electrical outlets in your cube and a limited budget.

The thought of buying seven PC's is out of the question. So what can you do? You need to plan your SQA lab strategy, even if your "lab" is just a few PC's in your cube. You need to consider the following:

  • Product Requirements
  • Software
  • Network Requirements
  • Hardware
  • Electrical Requirements
  • Space

Product Requirements

Narrow down the product requirements

The first thing that you need to do is narrow down the product requirements. Explain to management that this is a large task and you need to determine what configuration target customers will really be using.

Then you need to come up with a list of software that you will need, hardware to run it on and plan your network, electrical and space requirements.

Software

Ghost Server

No self-respecting SQA professional would try to get through their testing without a copy of Nortons (Symantec) Ghost (alternatively you could use Drive Image, or if you work in GNU/Linux, Mondo Rescue). Ghost allows you to reset a PC's hard-drive to a stored image which makes clean machine testing a breeze.

Hard-drive images take up a lot of space, so you should consider dedicating a machine or large hard-drive as a "Ghost Server" to store all those images.

You will find that it's easier to restore Ghost images if you have your own SQA domain that you administer, separate from the corporate network. Otherwise you'll have to chase down your IS department everytime you want to put a restored image back on the network.

When using Ghost, we've had a problem with stored images containing viruses. Everytime someone restored an image, viruses would reinfect our network. Always make sure to do a complete virus scan before recording images.

Viruses wouldn't have managed to jump around so quickly if it weren't for the obvious or non-existant passwords on shares in our network. Because the SQA domain was just for testing, password policies were relaxed. Unfortunately, viruses like to probe machines for open shares. They especially like when Drive C has public read-write access and there is either no password, or the password is the same as the user name.

PC Anywhere

Another product you should have is PC Anywhere. It allows you to open a window to the desktop on a remote machine. Just yesterday an internal client was having a problem with our application in another state. Within 5 minutes I accessed their machine from my office and could not only see the problem but also fix it. Using PCA's file transfer ability I could even upload some batch files to help solve their problem.

I also use PCA over our VPN so I can work at home. I can kick off my test automation in my office 25 miles away and find the results waiting for me when I arrive or just review the results from home.

PCA is also handy when chairs and rackspace are limited in your SQA lab. I find it eaiser to access the servers from my office instead of elbowing someone in the lab and wrestling with the KVM switch (see Hardware).

Open Source Programming Tools

As part of my SQA work, I build internal tools and Web applications. I do a lot of work in Visual Studio, but I also like the cost and simplicity of open source tools like PHP. Because I currently test Web client applications, I use JavaScript, instead of spending a fortune on expensive automation tools like I used to (see my article on Extreme Testing).

Open source tools and operating systems, such as Linux are here to stay and growing in popularity. At home, I use the Debian flavor of Linux. I didn't have the patience to download and burn several CD images, so I spent about $14 to have About Debian send me the CD's.

Open Source Databases

MS-SQL and Oracle aren't going away, but they are expensive to license. If you don't plan to distribute your application, you can download for free the Microsoft Data Engine. This is essentially MS-SQL without Enterprise Manager. As a developer you can also download anything you need from Oracle. Be sure to check out JDeveloper if you are interested in Java or Servlet development. If you plan to distribute your application, you have to look into how to license the database products to your clients. But for internal SQA tools, this isn't usually a problem.

As an alternative, many ISP's now include options for accessing remote MySQL databases and you can install it on your own system. MySQL has a few shortcoming (stored procedures are still pending) but it's free, easy to install and works well with PHP for developing Web-based applications. For managing MySQL databases locally and at my ISP, I use Navicat, which provides an inexpensive graphical user interface.

If you need more power, PostgreSQL is available and comes with some installations of Linux. I've yet to delve into it. But I know there are many books on the subject.

Network Requirements

SQA Domain

You should look into setting up your own SQA network domain. For Windows this will require some education on your part and of course permission of your network administrator.

SSL Certificates

If you find yourself in a position where you have to test a Web-based application that uses SSL (Secure Socket Layers), you can download trial certificates from places such as Verisign, Entrust and Thawte. For open source alternatives, check out CACert and if you are really into it OpenSSL. I would recommend working with your marketing and development teams to determine which vendor they will officially support and buy a certificate from that vendor. You can just keep downloading free certificates. But installation and client setup consumes a lot of time. It's worth spending a few hundred dollars.

See my article on Web Testing for more ideas on setting up your network for testing.

Hardware

Removable Hard-Drives

Even with Ghost you'll find that you won't want to waste time restoring images for every build. So you still have the problem of trying to test multiple operating systems on a limited number of PC's. You can resort to using products, like Partition Magic to create a dual-boot PC. I've done this and works out quite well. But you may want to consider using removable hard-drives instead.

Removeable hard-drive drawers are available from companies such as StarTech and Kingwin. Ideally all machines should be the same make, model and configuration, so the drives can be interchangeable. Removable drawers come with one caddy (and no hard-drive!). You will need to buy additional caddies and of course additional drives to go in them. When you buy the drawer, buy the caddies all at once to avoid discontinuation problems (hint, if buying over the Web, make sure the drawers and caddies are shipping in 24 hours as opposed to 1 week or so). I'd recommend the metal drawers over plastic.

Another advantage to using drawers and caddies is that you will only need to buy the OEM version of hard-drives to fill them. When shopping for hard-drives on places like Buy.com look for drives that contain only a picture of the drive, versus a box. The drives that come with no hardware or fancy box are cheaper. You can also buy OEM drives in bulk.

Hubs vs. Switches

Be carefully when buying a Hub or a Switch to network your PC's together. Switches are more expensive, but they are full-duplex versus a Hub which is half-duplex. For more information see the glossary on Linksys.com.

Using eBay

If money is really tight and you are willing to take a chance, you can find great hardware deals on eBay.

Electrical Requirements

Most of the SQA labs that I've worked in required special wiring. Once you have 3 or more PC's running in a single place, you are going to start running into electrical problems. Even on a limited budget, you can't get "creative" or you'll burn the place down. I was once horrified to discover that two of my employees were plugging power strips into other power strips to extend the amount of electrical outlets available to their hardware. Don't do this - this is a fire hazard. At least look into spreading your network around the building to reduce the load in any one spot.

PC's generate a lot of heat and need to remain cool. You will need to factor in the electrical and installation requirements for air conditioning. Work with the buildings electrician to identify your needs.

One way to reduce electrical requirements is to use KVM (Keyboard, Video, Mouse) switches. They allow you to share one keyboard, monitor and mouse with several PCs, saving desk/rack space. They are available from most computer supply stores. They also spare you the hassle of trying to balance several keyboards and remember what mouse you were using.

The only problem I've had is with USB-based KVM switches. When rebooting a PC remotely through PC Anywhere, the remote PC may not boot because it can't find the keyboard (non-USB KVM's plug into the keyboard port, USB's of course don't use it). To get beyond this problem, I've had to retain the PC's keyboard and just leave it hanging. Of course the trade-off with the old style KVM's is bulkier cables.

Space

Once you know your hardware and electrical requirements, you are going to need to plan your space requirements. Many labs use racks. Combined with KVM switches and PC Anywhere, racks can be a great space saver.

Conclusion

Taking the time to plan your lab, even if your lab is just your cube, can help you accomplish more with less (less money, less space, less time). Once you start using Ghost, PC Anywhere and removable hard-drives to do your testing, you'll wonder how you ever got by without them. By working with your IS department and an electrician you can be sure that your lab will meet your needs.


Other Resource

... to read more articles, visit http://sqa.fyicenter.com/art/

SQA Lab Essentials