Friday, August 7, 2009

Software Testing

What is Software Testing?

In general, testing is finding out how well something works. In terms of human beings, testing tells what level of knowledge or skill has been acquired. In computer hardware and software development, testing is used at key checkpoints in the overall process to determine whether objectives are being met. For example, in software development, product objectives are sometimes tested by product user representatives. When the design is complete, coding follows and the finished code is then tested at the unit or module level by each programmer; at the component level by the group of programmers involved; and at the system level when all components are combined together. At early or late stages, a product or service may also be tested for usability. 

At the system level, the manufacturer or independent reviewer may subject a product or service to one or more performance tests, possibly using one or more benchmarks. Whether viewed as a product or a service or both, a Web site can also be tested in various ways - by observing user experiences, by asking questions of users, by timing the flow through specific usage scenarios, and by comparing it with other sites.

The answer to the primary role of software testing is two fold:

  • Determine whether the system meets specifications (Producer View), and

  • Determine whether the system meets business and user needs (Customer View)

Testing encompasses three concepts:

  1. The demonstration of the validity of the software at each stage in the system development life cycle.

  2. Determination of the validity of the final system with respect to user needs and requirements.

  3. Examination of the behavior of a system by executing the system on sample test data.

Software Metrics


Although general set of standards has been agreed upon, the appropriate metrics to test how well software meets those standards are still poorly defined. Publications by IEEE, have presented numerous potential metrics that can be used to test each attribute. Different metrics may give different rank ordering of the same attribute, making comparisons across products difficult and uncertain.

List of Metrics available

Fault Density

Software purity level

Defect density

Estimated number of faults remaining (by seeding)

Cumulative failure profile

Requirements compliance

Fault days number

Test coverage

Functional or modular test coverage

Data or information flow complexity

Cause and effect graphing

Reliability growth function

Requirements traceability

Residual fault count

Defect indices

Failure analysis elapsed time

Error distribution (s)

Testing sufficiently

Software maturity index

Mean time to failure

Person-hours per major defect detected

Failure rate

Number of conflicting requirements

Software documentation and source listing

Software science measures

Software release readiness

Graph-theoretic complexity


Cyclomatic Complexity

Test accuracy

Minimal unit test case determination

System performance reliability

Run reliability

Independent process reliability

Design structure

Combined hardware and software (system) availability

Mean time to discover the next K-faults


What makes good Metrics?

This is a very interesting question. Many people say that anything we do should be quantitative. Yes, that's absolutely correct. Working in a project, there should be certain measurement criteria for measuring the skills and productivity of every individual in the team. Metrics play an important role in giving a good analysis. Every organization should make a list of metrics applicable in the organization and each employee should be aware of it.

Now let us look at few attributes, which make up good metrics:

  • The metric should be simple and computable so that its easy and straight forward.

  • The metric should be measuring the correct attribute.

  • The metric results should be reproducible.

  • The metric should be consistent in units or dimensions.

  • The metric should be independent of programming language.

  • The metric should provide good and meaningful analysis.

what can be measured with Metrics?

Metrics can measure anything which is quantifiable, like:

  • Effort, time and expenditure in each stage of the project.

  • Number of functionalities implemented.

  • Number of errors reported.

  • Types of errors reported.

  • Project schedules.

  • Benchmark important milestones in the project.

Monday, July 20, 2009