Sunteți pe pagina 1din 10

Basics of Software Testing

Unit - 1

6.1 Organizational Metrics


Metrics at organizational level are useful in project

planning and management.


Examples:

- Defects per thousand lines of code (defects/KLOC) - Testing cost per KLOC - Actual schedule of system testing - Delivery schedule slippage
Organizational metrics allow senior management to

monitor the overall strength of the organization and points to areas of weakness.
Asst. Prof. Bhavani K

6.2 Project Metrics


Project Metrics relate to a specific project

These are useful in the monitoring and control of a

specific project.
Examples: The ratio of actual-to-planned system test

effort is one project metric.


Another Project metric is the ratio of the number

of successful tests to the total number of tests in the system test phase.
3 Asst. Prof. Bhavani K

6.3 Process Metrics


Every project uses the process. The goal of Process Metrics to measure the

goodness of the process


Examples:

- The number of errors found in different testing phases (Unit Test, Integration Test, and System Test)
4 Asst. Prof. Bhavani K

6.4 Product Metrics: Generic


Product metrics are useful in making decisions related

to the product. For example Should the product be released to the client?
Examples:

(1) Cyclomatic complexity: proposed by Thomas McCabe based on the control flow of a program. V(G) = E - N + 2p V(G) is the complexity of the control flow graph, E is the edges, N nodes, p the connected procedures V(G) of the value 5 or less are preferred
5 Asst. Prof. Bhavani K

Product Metrics: Generic


Example:

(2) Halstead metrics: proposed by late Prof. Maurice Halstead B = 7.6 E(0.667)S(0.333) B represents the number of errors during software development, S the program size and E is the effort.
Some Hasltead Measures of Program complexity and

effort - Operation Count N1 Number of Operators in a Program - Operand Count N2 Number of Operands in a program
Allows the management to plan testing resources.
6 Asst. Prof. Bhavani K

6.5 Product Metrics: OO Software


Reliability: Probability of failure of a software product

with respect to a given operational profile in a given environment


Defect Density: Number of defects per KLOC Defect Severity: Distribution of defects by their level

of severity
Test Coverage: Fraction of Testable items

e.g. Basic blocks covered


7

Etc . K Asst. Prof. Bhavani

6.6 Progress Monitoring and Trends


Metrics for monitoring progress requires making

measurements on a regular basis over time. Such measurements offer trends.


Example:

Browser coding and testing over consecutive months

Asst. Prof. Bhavani K

6.7 Static and Dynamic Metrics


Static metrics are computed without having to

execute the product. - Example: No. of testable entities in an application


Dynamic metrics require code execution.

- Example: no. of testable entities actually covered by a test suite

Asst. Prof. Bhavani K

6.8 Testability
IEEE

definition: degree to which a system or component facilitates the establishment of test criteria and the performance of tests to determine whether those criteria have been met. design and implementation.

Testability in software focuses on the verification of

Static testability metrics : software complexity. Dynamic testability metrics : code based coverage

criteria.
High testability is a desirable goal.
10 Asst. Prof. Bhavani K

S-ar putea să vă placă și