Automated testing requires careful analysis and planning. Ideally, the person writing the test script(s) works closely with system designers, developers, and coders to understand precisely what the end product is intended to do, and how it should do it. Testing scripts written to ensure that the software produced does what it is supposed to, and, – even more importantly – doesn’t do anything unexpected, are produced and validated. Then a tool is used to record the testing procedure as it is performed manually. This results in one or more sequences of inputs that can then be automatically played back as often as necessary to verify that subsequent changes and additions to the code do not negatively impact functionality. Depending on the complexity of the code, and the number of steps in the test, this can radically reduce the time required for each repetition of the test while increasing the accuracy of the results. As an example, manual testing for creation of a My HealtheVet account and profile took 6 hours by an experienced tester. Automated testing of the same scenario took 20 minutes to set up and 120 seconds to rerun all test steps, or a savings of more than 99%.
The software marketplace has any number of capable, effective tools for creating automated tests at various price points. Because, as a small business, KRM Associates, Inc. (KRM) is committed to using the most cost-effective tools, we utilize open-source applications whenever possible. Under that principal, we selected the Selenium suite for testing web-based applications. Developed by the “Thought Work” in 2004, it is remarkable tool for functional, automated software testing, meeting all of our major criteria:
- Cost-effective: An open source tool providing a remarkable savings in resources cost
- Language: Many languages, like Java, Ruby, and Python and C #, are supported
- Browser: Supporting multiple browsers (Internet Explorer (IE), Mozilla, Opera, Chrome and Safari), it can be used for cross-browser testing and can be integrated easily to newly launched browsers.
- Framework: Makes the automation more robust by supporting multiple frame-works, like Junit, TestNG, Bromine, Nunit, or Rspec.
- Operating System: Supports all commonly used operating systems: Windows, Apple, Linux and Android.
- Time Saving: The Selenium grid allows parallel execution of the test cases – can be done on all browsers.
The latest version of Selenium 2.0 is the result of merging WebDriver and Selenium RC. WebDriver is another tool for writing automated tests of websites but was designed to address some Selenium RC limitations. The difference is that WebDriver controls the browser itself using native methods of the browser and operating system. Selenium 2 supports the WebDriver API and is backward compatible with Selenium RC, which means you can still run tests developed with this version. It includes:
- Selenium IDE (Integrated Development Environment), a plugin to Firefox that is easily downloaded and installed into the browser. Selenium IDE is used for record and play back functionality, the default script is generated in HTML (HyperText Markup Language) and can play back in HTML format only on Firefox. Selenium IDE can also be used to display the object properties of the application.
- Selenium RC (Remote Control) Client/Server: a client/server based application that allows you to control web browsers using the following components:
- Selenium Client Libraries: Are the API’s for the programming languages to communicate with Selenium server.
- Selenium Grid, which scales Selenium RC tests, to allow running tests on parallel, different machines and environments.