Software testability: Difference between revisions

Content deleted Content added
m Added the link to the "Design for testing" page
Nmondal (talk | contribs)
No edit summary
Line 2:
'''Software testability''' is the degree to which a software artifact (i.e. a software system, software module, requirements- or design document) supports testing in a given test context. If the testability of the software artifact is high, then finding faults in the system (if it has any) by means of testing is easier.
 
Formally, some systems are testable, and some are not. This classification can be achieved by noticing that, to be testable,
Testability is often thought of as an [[extrinsic]] property which results from interdependency of the software to be tested and the test goals, test methods used, and test resources (i.e., the test context). Even though testability can not be measured directly (such as software size) it should be considered an [[intrinsic]] property of a software artifact because it is highly correlated with other key software qualities such as encapsulation, coupling, cohesion, and redundancy.
for a functionality of the system under test "S",
which takes input "I", a Computable predicate function "V" must exists such that V( S, I ) is true when S, given input I, produce a valid output, false otherwise.
This function "V" is known as the verification function for the system with input I.
 
Many software systems are untestable, or not immediately testable. For example, googles recaptcha, without having any metadata about the images is not a testable system.
Recaptcha, however, can be immediately tested if for each image shown, there is a tag stored elsewhere. Given this meta information, one can test the system.
TestabilityTherefore, testability is often thought of as an [[extrinsic]] property which results from interdependency of the software to be tested and the test goals, test methods used, and test resources (i.e., the test context). Even though testability can not be measured directly (such as software size) it should be considered an [[intrinsic]] property of a software artifact because it is highly correlated with other key software qualities such as encapsulation, coupling, cohesion, and redundancy.
 
The correlation of 'testability' to good design can be observed by seeing that code that has weak cohesion, tight coupling, redundancy and lack of encapsulation is difficult to test<ref name="DesignPatternsExplained2ndEd">{{cite journal | last1=Shalloway | first1=Alan | last2=Trott | first2=Jim | title=Design Patterns Explained, 2nd Ed | page=133 | year=2004 | ISBN=978-0321247148 }}</ref>.