Sunday, January 8, 2012

Test Automation Basics - I

What is Test Automation?
  • Test automation is the process of writing a computer program to do testing that would otherwise need to be done manually. Once tests have been automated, they can be run quickly and repeatedly.

Why should I go for automation?
  • Manual testing is a laborious and time consuming process.
  • At times manual testing is not effective in finding certain classes of defects.
  • Often the most cost effective method for software products that have a long maintenance life and shorter maintenance cycle
  • Even minor patches over the lifetime of the application can cause features to break which were working at an earlier point in time.

What are the critical questions you should ask before investing in automation?
  • What to automate?
  1. Selecting the correct features of the product for automation largely determines the success of the automation.
  2. Pick test cases based on priority
  3. Based on stability
  4. Based on its multiple runs on various environments
  5. Collect acceptance/regression test cases to
    be automated
  • When to automate?


  • Who should automate?

Test mindset + Development Skill + Domain knowledge


  • Whether one really needs automation?

  • Is automation going to yield an ROI?
What are the tasks of Quality Assurance can be automated?

  • Product installation
  • test data creation
  • GUI interaction
  • problem detection
  • defect logging
  • automating tests in an end-to-end fashion.

What should we automate first?

What we should automate?
  • unstable features
  • features that are undergoing changes should be avoided

What are various types of test automation?

There are two general approaches to test automation

  • Code-driven testing - API Testing
The public interfaces to classes, modules or libraries are tested with a variety of input arguments to validate that the results that are returned are correct.testing.

  • GUI Testing
A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behavior of the program is correct.

How can we make automation as cost-effective one?

It can be made cost-effective in the longer term, especially when used repeatedly in regression testing.


Can test case generation be automated?

One way to generate test cases automatically is model-based testing through use of a model of the system for test case generation but research continues into a variety of alternative methodologies for doing so.

What are popular requests while defining automation frameworks?
  • Platform , OS and browser independence
  • Data driven capability (Input Data, Output Data, Metadata)
  • Customizable Reporting (DB Access, crystal reports)
  • Easy debugging and logging
  • Version control friendly – minimal binary files
  • Extensible & Customizable (Open APIs to be able to integrate with other tools)
  • Common Driver (For example, in the Java development ecosystem, that means Ant or Maven and the popular IDEs). This enables tests to integrate with the developers' workflows.
  • Support unattended test runs for integration with build processes and batch runs. Continuous integration servers require this.
  • Email Notifications (automated notification on failure or threshold levels). This may be the test runner or tooling[clarification needed] that executes it.
  • Support distributed execution environment (distributed test bed)
  • Distributed application support (distributed SUT)