Sunday, February 22, 2009

WHY DO SOFTWARE TESTING?

A clever person solves a problem. A wise person avoids it.”
--- Albert Einstein


Why test software? “To find the bugs!” is the instinctive response and many people, developers and programmers included, think that that’s what debugging during development and code reviews is for, so formal testing is redundant at best. But a “bug” is really a problem in the code; software testing is focused on finding defects in the final product.


Here are some important defects that better testing would have found.
  • In February 2003 the U.S. Treasury Department mailed 50,000 Social Security checks without a beneficiary name. A spokesperson said that the missing names were due to a software program maintenance error.
  • In July 2001 a “serious flaw” was found in off-the-shelf software that had long been used in systems for tracking U.S. nuclear materials. The software had recently been donated to another country and scientists in that country discovered the problem and told U.S. officials about it.
  • In October 1999 the $125 million NASA Mars Climate Orbiter—an interplanetary weather satellite—was lost in space due to a data conversion error. Investigators discovered that software on the spacecraft performed certain calculations in English units (yards) when it should have used metric units (meters).
  • In June 1996 the first flight of the European Space Agency's Ariane 5 rocket failed shortly after launching, resulting in an uninsured loss of $500,000,000. The disaster was traced to the lack of exception handling for a floating-point error when a 64-bit integer was converted to a 16-bit signed integer.
Software testing answers questions that development testing and code reviews can’t.
  • Does it really work as expected?
  • Does it meet the users’ requirements?
  • Is it what the users expect?
  • Do the users like it?
  • Is it compatible with our other systems?
  • How does it perform?
  • How does it scale when more users are added?
  • Which areas need more work?
  • Is it ready for release?
What can we do with the answers to these questions?
  • Save time and money by identifying defects early
  • Avoid or reduce development downtime
  • Provide better customer service by building a better application
  • Know that we’ve satisfied our users’ requirements
  • Build a list of desired modifications and enhancements for later versions
  • Identify and catalog reusable modules and components
  • Identify areas where programmers and developers need training

Purpose of Software Testing

Software testing has three main purposes: verification, validation, and defect finding.
  • The verification process confirms that the software meets its technical specifications. A “specification” is a description of a function in terms of a measurable output value given a specific input value under specific preconditions. A simple specification may be along the line of “a SQL query retrieving data for a single account against the multi-month account-summary table must return these eight fields ordered by month within 3 seconds of submission.”
  • The validation process confirms that the software meets the business requirements. A simple example of a business requirement is “After choosing a branch office name, information about the branch’s customer account managers will appear in a new window. The window will present manager identification and summary information about each manager’s customer base: .” Other requirements provide details on how the data will be summarized, formatted and displayed.
  • A defect is a variance between the expected and actual result. The defect’s ultimate source may be traced to a fault introduced in the specification, design, or development (coding) phases.

Sunday, February 15, 2009

Requirements for Effective Software Testing

Software testing is not an activity to take up when the product is ready. An effective Software Testing begins with a proper plan from the user requirements stage itself. Software testability is the ease with which a computer program is tested. Metrics can be used to measure the testability of a product. The requirements for effective Software Testing are given in the following sub-sections.

Operability in Software Testing:
1. The better the software works, the more efficiently it can be tested.
2. The system has few bugs (bugs add analysis and reporting overhead to the test process)
3. No bugs block the execution of tests.
4. The product evolves in functional stages (allows simultaneous development & testing)


Observability in Software Testing:
1. What is seen is what is tested
2. Distinct output is generated for each input
3. System states and variables are visible or queriable during execution
4. Past system states and variables are visible or queriable (eg., transaction logs)
5. All factors affecting the output are visible
6. Incorrect output is easily identified
7. Incorrect input is easily identified
8. Internal errors are automatically detected through self-testing mechanism
9. Internally errors are automatically reported
10. Source code is accessible


Controllability in Software Testing:
1. The better the software is controlled, the more the testing can be automated and optimised.
2. All possible outputs can be generated through some combination of input in Software Testing
3. All code is executable through some combination of input in Software Testing
4. Software and hardware states can be controlled directly by testing
5. Input and output formats are consistent and structured in Software Testing
6. Tests can be conveniently specified, automated, and reproduced.


Decomposability in Software Testing:
1. By controlling the scope of testing, problems can be isolated quickly, and smarter testing can be performed.
2. The software system is built from independent modules
3. Software modules can be tested independently in Software Testing


Simplicity in Software Testing:
1. The less there is to test, the more quickly it can be tested in Software Testing
2. Functional simplicity
3. Structural simplicity
4. Code simplicity


Stability in Software Testing:
1. The fewer the changes, the fewer the disruptions to testing
2. Changes to the software are infrequent
3. Changes to the software are controlled in Software Testing
4. Changes to the software do not invalidate existing tests in Software Testing
5. The software recovers well from failures in Software Testing


Understandability in Software Testing:
1. The more information we have, the smarter we will test
2. The design is well understood in Software Testing
3. Dependencies between internal external and shared components are well understood.
4. Changes to the design are communicated.
5. Technical documentation is instantly accessible
6. Technical documentation is well organized in Software Testing
7. Technical documentation is specific and detailed
8. Technical documentation is accurate

Monday, February 9, 2009

What is Software testing?

According to Wikipedia "Testing is a process of technical investigation, performed on behalf of stakeholders, that is intended to reveal quality-related information about the product with respect to the context in which it is intended to operate. This includes, but is not limited to, the process of executing a program or application with the intent of finding errors."



According to the classic definition of Myers "Software Testing is the process of executing a program or system with the intent of finding errors."


According to the definition given by Hetzel, "Testing involves any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results"


In simple words, software testing is the process of finding deviation from the requirements and user expectations. As a tester, you will be the first person to look at the product from a user point of view and the last person to give objective information about its quality prior to its release.