Automation Testing part 2

Explanation for the slide that I posted previously. You can view it HERE

Automation Testing

Automation testing uses software to run and verify tests without human intervention. It requires development of automation script or program. Test Engineer will develop the script based on the manual test step and then execute it.

Benefits of Automated Testing

  • Fast – As automated tests are run by tools, these are run much faster than human users.
  • Reliable – Tests perform precisely the same operation each time they are run, thereby eliminating human error.
  • Repeatable – Testers can test how the application reacts after repeated execution of the same operation.
  • Programmable – Testers can program sophisticated tests that bring hidden information.
  • Reusable – Tests can be re-used on different versions of the software.

What to automate

Regression test

To determine if previous functionality stops working as intended.

Data-driven test

Scripting technique that stores test input in a table or spreadsheet.(ISTQB)

Load Test

To determine whether the performance data is still valid with an increasing number of users (load)

Do Automate:

  • Tests that runs with each new version of your application to check the stability of basic functionality across the entire application.
  • Tests that use multiple data values for the same operation.
  • Tests that are run many times and tests that check a multi-user.

Do not Automate:

  • Tests that are executed only once.
  • Tests that require immediate execution.
  • Tests that check how easy the application is to use (usability tests).
  • Tests that do not have predictable results.

Preparation before automate

  • Check for the stability of the AUT
  • Execute the test case steps manually
  • Check your data
  • Determine the initial and end conditions of the test
  • Standardize naming conventions

Examples of Automation Tools

Functional Test :

QTP, Selenium, Windmill, etc.

Non-Functional Test :

Load Runner, CloudTest, Load Storm, etc.

HP Quick Test Professional (QTP)

QTP Logo

HP QuickTest Professional is automated testing software designed for testing various software applications and environments. It performs functional and regression testing through a user interface such as a native GUI or web interface. It works by identifying the objects in the application user interface or a web page and performing desired operations (such as mouse clicks or keyboard events); it can also capture object properties like name or handler ID. HP QuickTest Professional uses a VBScript scripting language to specify the test procedure and to manipulate the objects and controls of the application under test. To perform more sophisticated actions, users may need to manipulate the underlying VBScript. Although HP QuickTest Professional is usually used for "UI Based" Test Case Automation, it also can automate some "Non-UI" based Test Cases such as file system operations, database testing or Web services testing.

HP QuickTest Professional provides two views—and ways to modify—a test script: Keyword View and Expert View. These views enable HP QuickTest Professional to act as an Integrated Development Environment (IDE) for the test, and HP QuickTest Professional includes many standard IDE features, such as breakpoints to pause a test at predetermined places

QTP Keyword View

Keyword View lets users create and view the steps of a test in a modular, table format. Each row in the table represents a step that can be modified. The Keyword View can also contain any of the following columns: Item, Operation, Value, Assignment, Comment, and Documentation. For every step in the Keyword View, HP QuickTest Professional displays a corresponding line of script based on the row and column value. Users can add, delete or modify steps at any point. In Keyword View, users can also view properties for items such as checkpoints, output values, and actions, use conditional and loop statements, and insert breakpoints to assist in debugging a test.

QTP Expert View

In Expert View, HP QuickTest Professional lets users display and edit a test's source code using VBScript. Designed for more advanced users, users can edit all test actions except for the root Global action, and changes are synchronized with the Keyword View


QuickTest identifies objects in your application based on a set of test object properties. It stores the object data it learns in the object repository. You can save your objects either in a shared object repository or in action object repository. In shared object repository mode, you can use one object repository file for multiple tests or components.


Selenium Logo

Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including Java, C#, Groovy, Perl, PHP, Python and Ruby. The tests can then be run against most modern web browsers. Selenium deploys on Windows, Linux, and Macintosh platforms.

Selenium IDE

Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is implemented as a Firefox extension, and allows recording, editing, and debugging tests. It was previously known as Selenium Recorder. Selenium-IDE was originally created by Shinya Kasatani and donated to the Selenium project in 2006. Scripts may be automatically recorded and edited manually providing autocompletion support and the ability to move commands around quickly. Scripts are recorded in Selenese, a special test scripting language for Selenium. Selenese provides commands for performing actions in a browser (click a link, select an option), and for retrieving data from the resulting pages.


  • Easy record and playback
  • Intelligent field selection will use IDs, names, or XPath as needed
  • Autocomplete for all common Selenium commands
  • Walk through tests
  • Debug and set breakpoints
  • Save tests as Selenese, Ruby scripts, or other formats
  • Support for Selenium user-extensions.js file
  • Option to automatically assert the title of every page
  • Easy customization through plugins

Selenium RC

Selenium RC (Selenium 1) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

Selenium RC comes in two parts. A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them. Client libraries for your favorite computer language.

Selenium WebDriver is the successor to Selenium RC. Selenium WebDriver accepts commands (sent in Selenese, or via a Client API) and sends them to a browser. This is implemented through a browser-specific browser driver, which sends commands to a browser, and retrieves results. Most browser drivers actually launch and access a browser application (such as Firefox or Internet Explorer) there is also a HtmlUnit browser driver, which simulates a browser using HtmlUnit. Unlike in Selenium 1, where the Selenium RC server was necessary to run tests, Selenium WebDriver does not need a special server to execute tests. Instead, the WebDriver directly starts a browser instance and controls it.

Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a distributed test execution environment.

Automation Process

Automation Process

  1. Initial Condition: Precondition state to be set for a certain step to be executed.
  2. Test Step: Converting manual step to automation script.
  3. Checkpoint: What is the pass and fail condition.
  4. Test Data: Determine the data that we will use to test application.
  5. Result: Where to save? How you want it?
  6. End Condition: Clean up test data, close the browser, close the application etc.