HTML5 Test Automation for Beginners
Test and Monitor | Posted June 22, 2012

Last week we organized a webinar on the topic of HTML5 test automation. It was an interesting and well attended event. The presenter Nick Olivo was as entertaining and informative as ever. You can see the main presentation on YouTube and the complete event, including Q/A session on

When going through the list of questions I realized that many of the attendees were new to the topic of test automation. The following blog contains some elements presented in the webinar and some additional descriptions of topics covered in the more advanced sections of the event.

1.  “Despite the hype around #HTML5, we're still just talking about a web page, here.”

The above quote was the most popular one from the selection of quotes that we shared on Twitter during and after the event. You can still see the conversation if you go to the TestComplete Twitter Chat page. To address the specifics of HTML5 test automation we need to first learn how to approach testing of Web sites in general. Here is a good starting point for learning about Web testing automation in general: Intro to Web Testing with TestComplete.

2.  Recording and playback of user interaction with the application under test

There are many different tools and concepts available and sometimes all these options can be confusing. The type of testing introduced in the webinar is based on a tool's ability to recognize building elements (objects) of the Web pages as they are constructed by browsers. Everything you type into browser windows, Web page forms, all the buttons you click, pages you open are “remembered” together with the order with which you interact with the Application Under Test (AUT). These sequences can be played back as tests, they can also be reviewed, updated, or turned into test scripts.

The benefit of this approach is that the automation tool can do everything you can do when testing manually and you don’t have to script pre-conditions and other setup. If you can run it, the tool can do it too.

More traditional scripting-first approach is still available, but it is this record-playback functionality that distinguishes this type of (mostly commercial) testing tools like TestComplete.  You can learn more about recording and playback in this video: Creating Your First Test.

3.  Automatic evaluation of test runs

Another important element of test automation is evaluation of test runs (or playbacks). Record-playback functionality allows you to run certain test sequences and use cases as often as you want, but unless you add some checkpoints you will not be able to determine if consequent play-back of tests are correct.

In the webinar, Nick introduced several examples on how to create snapshots of data displayed in Web page elements and compare them with the snapshots collected during test recording. If you take a Web page element, like for example an individual cell within a table, you can verify attributes of this cell - width, height of the cell, or its content. In case of HTML5 extensions you can work with more complex, media rich elements like – video and audio streams, images, etc. As Nick mentioned in the webinar, these multimedia objects also have attributes that you can verify automatically. With rich content some additional planning may be required. For example, with video content you may want to ensure that the correct video is loaded, that it can play and pause, and that the bit rate and video size are correct, etc.

Stay tuned for a follow up Q&A where I address additional questions you had during the event on Monday.




By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox