Static Testing

38 189 0
Static Testing

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Static Testing 1 Principles 2 Lifecycle 4 Dynamic test techniques 3 Static testing 5 Management 6 Tools Software Testing ISEB Foundation Certificate Course 1 Contents Reviews and the test process Types of review Static analysis ISEB Foundation Certificate Course Static testing 1 2 4 5 3 6 2 People techniques n individual: deskdesk checking, datachecking, data stepping, proofstepping, proof readingreading n group: Reviews (informal & formal): for consensusReviews (informal & formal): for consensus Walkthrough: for educationWalkthrough: for education Inspection (most formal): to find faultsInspection (most formal): to find faults Static techniques do not execute code Static techniques do not execute code 3 Benefits of reviews n Development productivity improvement n Reduced development timescales n Reduced testing time and cost n Lifetime cost reductions n Reduced fault levels n Improved customer relations n etc. 4 Reviews are cost-effective n 10 times reduction in faults reaching test, testing cost reduced by 50% to 80% Freedman & Weinberg, Handbook of Freedman & Weinberg, Handbook of Walkthroughs, Inspections & Technical ReviewsWalkthroughs, Inspections & Technical Reviews n reduce faults by a factor of 10 Yourdon, Structured WalkthroughsYourdon, Structured Walkthroughs n 25% reduction in schedules, remove 80% - 95% of faults at each stage, 28 times reduction in maintenance cost, many others Gilb & Graham, Software InspectionGilb & Graham, Software Inspection 5 What can be Inspected? n policy, strategy, business plans, marketing or advertising material, contracts n system requirements, feasibility studies, acceptance test plans n test plans, test designs, test cases, test results n system designs, logical & physical n software code n user manuals, procedures, training material Anything written down can be Inspected 6 What can be reviewed? n anything which could be Inspected i.e. anything written downi.e. anything written down n plans, visions, “big picture”, strategic directions, ideas n project progress work completed to schedule, etc.work completed to schedule, etc. n “Should we develop this” marketing options 7 What to review / Inspect? Tests Tests Tests Tests Requirements Requirements Design Code Functions Integration T Unit Test Accept. Test System Test 8 Costs of reviews n Rough guide: 5%-15% of development effort half day a week is 10%half day a week is 10% n Effort required for reviews planning (by leader / moderator)planning (by leader / moderator) preparation / selfpreparation / self study checkingstudy checking meetingmeeting fixing / editing / followfixing / editing / follow upup recording & analysis of statistics / metricsrecording & analysis of statistics / metrics process improvement (should!)process improvement (should!) 9 Contents Reviews and the test process Types of review Static analysis ISEB Foundation Certificate Course Static testing 1 2 4 5 3 6 10 [...]... given to author 26 Static testing 1 2 3 4 5 6 ISEB Foundation Certificate Course Contents Reviews and the test process Types of review Static analysis 27 What can static analysis do? n n Remember: static techniques do not execute the code A form of automated testing - check for violations of standards - check for things which may be a fault Descended from compiler technology - a compiler statically analyses... violations of standards - check for things which may be a fault Descended from compiler technology - a compiler statically analyses code, and “knows” a lot about it, e.g variable usage; finds syntax faults - static analysis tools extend this knowledge - can find unreachable code, undeclared variables, parameter type mis-matches, uncalled functions & mis28 procedures, array bound violations, etc Data flow... and other metrics 31 Unreachable code example n n Macro definitions (different for different platforms the code runs on) Buffsize: 1000 Mailboxmax: 1000 IF Buffsize < Mailboxmax THEN Error-Exit ENDIF Static Analysis finds the THEN clause unreachable, so will flag a fault 32 Cyclomatic complexity n n n cyclomatic complexity is a measure of the complexity of a flow graph - (and therefore the code that... DO WHILE more Questions IF Answer = Correct THEN end Right = Right + 1 ENDIF res END DO Result = (Right / Questions) if pass IF Result > 60% THEN Print "pass" ELSE fail Print "fail” ENDIF end 35 Other static metrics n n n n n n lines of code (LOC) operands & operators (Halstead’s metrics) fan-in & fan-out nesting levels function calls OO metrics: inheritance tree depth, number of methods, coupling & . Static Testing 1 Principles 2 Lifecycle 4 Dynamic test techniques 3 Static testing 5 Management 6 Tools Software Testing ISEB Foundation Certificate Course 1 Contents Reviews. Course 1 Contents Reviews and the test process Types of review Static analysis ISEB Foundation Certificate Course Static testing 1 2 4 5 3 6 2 People techniques n individual: deskdesk checking,. (should!) 9 Contents Reviews and the test process Types of review Static analysis ISEB Foundation Certificate Course Static testing 1 2 4 5 3 6 10 Types of review of documents Informal Review undocumented ••

Ngày đăng: 12/05/2014, 11:08

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan