Upload
kai-feng-zhang
View
2.509
Download
0
Embed Size (px)
DESCRIPTION
Citation preview
2009-03-03 1
Software Testability软件可测试性
Request From Quality
2009-03-03 2
No Agenda
2009-03-03 3
Impression Testability is defined as the degree to which a
system facilitates the establishment of test criteria and the performance of tests to determine whether those criteria have been met. (from IEEE 90)
DFT (Design For Test, Wikipedia), http://en.wikipedia.org/wiki/Design_For_Test
For software, testability is not only testable, but easy-to-test.
2009-03-03 4
Definition 简单的说,软件的可测试性就是一个计算机程序能够被测试的容易程度。
一般来说可测试性很好的软件必然是一个强内聚、弱耦合、接口明确、意图明晰的软件,而不具可测试性的软件往往具有过强的耦合和混乱的逻辑。
2009-03-03 5
Includes: Operability Visibility Resolvability Simplicity Intelligibility Control Stability
2009-03-03 6
Operability Excellent UX (don’t make me think) Smooth Interaction Less Error
2009-03-03 7
Visibility Accessible
Code (comments, changes)Design (changes)
State Standard Output (include error) Detailed Log Only one output for each input
2009-03-03 8
Resolvability Independent Modules Reduce coupling between modules
/layers Avoid UI inter-invocation
2009-03-03 9
Simplicity Function Structure Code
2009-03-03 10
Intelligibility Design Dependency Changes Document Guidance
2009-03-03 11
Control Standard Controls (recognizable by 3rd
party) Customized UI Elements
Naming standardRecognizable (name, type)UniquenessControllable (input, get, click)
Good practice: Forms Widgets
2009-03-03 12
Control (cont.) Testing purpose
Interface (method, url)Hook
2009-03-03 13
Stability Unfrequent changes Controllable changes Little impact on existing test Easy recovery
2009-03-03 14
Unit Test TDD(Test Driven Development) Less Arguments Short Method Simple Logic Clear Log Reduce Expensive Instantiation Weak Coupling
2009-03-03 15
Weak Coupling
2009-03-03 16
Causes for the lack of testability Dev concern functionality for customer not
tester Tester never aware demand functionality
/hooks help test Management support
Consequence: Software quality hurts, and test cost increase.
2009-03-03 17
为了测试它,我们需要了解它了解越多的信息,我们将测得更巧妙我们越是能控制它,测试越能被自动化和优化
2009-03-03 18
The End