18
2009-03-03 1 Software Testability 软软软软软软 Request From Quality

Software Testability

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Software Testability

2009-03-03 1

Software Testability软件可测试性

Request From Quality

Page 2: Software Testability

2009-03-03 2

No Agenda

Page 3: Software Testability

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.

Page 4: Software Testability

2009-03-03 4

Definition 简单的说,软件的可测试性就是一个计算机程序能够被测试的容易程度。

一般来说可测试性很好的软件必然是一个强内聚、弱耦合、接口明确、意图明晰的软件,而不具可测试性的软件往往具有过强的耦合和混乱的逻辑。

Page 5: Software Testability

2009-03-03 5

Includes: Operability Visibility Resolvability Simplicity Intelligibility Control Stability

Page 6: Software Testability

2009-03-03 6

Operability Excellent UX (don’t make me think) Smooth Interaction Less Error

Page 7: Software Testability

2009-03-03 7

Visibility Accessible

Code (comments, changes)Design (changes)

State Standard Output (include error) Detailed Log Only one output for each input

Page 8: Software Testability

2009-03-03 8

Resolvability Independent Modules Reduce coupling between modules

/layers Avoid UI inter-invocation

Page 9: Software Testability

2009-03-03 9

Simplicity Function Structure Code

Page 10: Software Testability

2009-03-03 10

Intelligibility Design Dependency Changes Document Guidance

Page 11: Software Testability

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

Page 12: Software Testability

2009-03-03 12

Control (cont.) Testing purpose

Interface (method, url)Hook

Page 13: Software Testability

2009-03-03 13

Stability Unfrequent changes Controllable changes Little impact on existing test Easy recovery

Page 14: Software Testability

2009-03-03 14

Unit Test TDD(Test Driven Development) Less Arguments Short Method Simple Logic Clear Log Reduce Expensive Instantiation Weak Coupling

Page 15: Software Testability

2009-03-03 15

Weak Coupling

Page 16: Software Testability

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.

Page 17: Software Testability

2009-03-03 17

为了测试它,我们需要了解它了解越多的信息,我们将测得更巧妙我们越是能控制它,测试越能被自动化和优化

Page 18: Software Testability

2009-03-03 18

The End