top of page

 

I don’t know how many of you web geeks are into basketball (I hope I am not alone), but for those of you who are, who can forget Allen Iverson’s infamous post-game press conference where he derides the need for practice? Just to set the stage, it was after the ritual post-game press conference where the Philadelphia 76ers lost the game that AI, as he is called, was asked by a reporter if it is true that he does not attend practice. What starts out as a credible and intelligible response trails off into an aimless derision of the whole idea of practice itself.

 

Well, I am here to tell you that practice is not dead. No matter what you may think of the now retired AI practice, at least in terms web development, is alive and well and progressing. I liken “practice” to Quality Assurance and that is primarily what this post is about. Although obviously different, practice is similar to QA in the sense that they are both preparation for putting your product out on the floor (getting ready for prime time!), so to speak. It is a chance to test and verify that what you have been working on actually works.

 

Now that the web and web development are at the center of the universe again, it has become imperative that full-featured, thorough, tools be applied to our development efforts. With the advent of mobile as a platform for developers, billions of dollars are being spent to create development tools as well as applications that work on these devices. Indeed, the web has had new life poured into it and is the application delivery medium of choice for practically all mobile devices.

 

With so much at stake, the old days of “good enough” is just not good enough. With Apple, Sony, Microsoft and numerous other goliath companies betting the farm on web applications that run on their devices, they need rock solid applications to run on them.

 

When I talk about QA I am really talking about testing, specifically in our case, how you test a web application. Testing web applications, as opposed to other software applications, has been a difficult task. Unit testing and integration testing have been included in many developer IDEs, but addressing the unique requirements of testing web applications has been more difficult to achieve. It requires user and often regression testing at the level of the web client.

 

The testing of any UI, web or GUI client, typically relies on automation scripts. These scripts mimic user interaction with the application, testing not only the new pieces of the application, but in the case of regression testing they can also test existing related functionality. Regression testing is meant to verify that the new stuff hasn’t caused bugs in the existing pieces of the application. These are perfect scenarios for automated tests, as much of the testing can be redundant testing of existing functionality. The perennial problem with automation testing, however, is that the tools used for this sort of testing simply record and play back a fixed test.

 

The difficulty here is that these sorts of scripts are not very flexible, they are difficult to maintain, and break easily. Changes to the web page, such as renaming a field, can break these scripts. Keeping up with writing new test scripts for every change made to the HTML in a page is frustrating at best, impractical and unattainable at worst.

As I mentioned, the renaissance in web technologies due to mobile, has made it imperative to apply robust tools to web application development. In that vein, this problem with web application testing using automation scripts is being addressed. Essentially, you can now include with such tools as MS Test in Visual Studio, APIs that allow you to create tests that make http calls testing the functionality of your web application.

 

You can create a web framework that sits between your unit testing API and a web page testing API and use simple assert statements to test your web pages. It is very cool watching your unit tests perform testing on your web pages, watching them succeed or fail, just like any other unit test. This is a definite improvement over using a fixed script testing tool with its previously mentioned flaws. SeleniumHQ is one such web application testing API that you can use to perform this sort of flexible, maintainable, and integrated testing.

 

Note: here is a great presentation on the subject (https://www.youtube.com/watch?v=DO8KVe00kcU) by John Sonmez.

 

It doesn’t matter whether you are a wizard programmer or Allen Iverson on the basketball court, testing your work is indeed important. With the money being spent to shore up our ability to create solid, reliable web applications, the testing of our applications is now hugely important. With practice we are continuing to improve. We want to make sure we put our best product on the floor.

 

PS--While perhaps no Shakespeare with his words, Allen Iverson was a gifted player. I'm not hatin'. I have great admiration for his achievements in life, which are probably beyond anything I will ever do.

 

Are We Talking 'Bout Practice??

bottom of page