SOFTWARE LIFE CYCLE

kettleproduceΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 4 χρόνια και 1 μήνα)

78 εμφανίσεις

10/15/12
1
Objectives


Software Development
Oct 15, 2012
Sprenkle - CSCI209
1
Review


What have we learned so far this term?
Oct 15, 2012
Sprenkle - CSCI209
2
Rest of the semester


Shift from learning Java to learning how to
develop software (abstractly) with Java as
our implementation/example


Why Java?
Ø

Popular language
Ø

Many frameworks and tools for Java
Ø

Java’s structure allows for strict adherence to
design techniques


Just a start
Ø

You’ll need to continue learning more “on the
street”
Oct 15, 2012
Sprenkle - CSCI209
3
SOFTWARE LIFE CYCLE
Oct 15, 2012
Sprenkle - CSCI209
4
Traditional Software Engineering
Process: Waterfall Model
Oct 15, 2012
Sprenkle - CSCI209
5
Requirements
Design
Implementation
Integration
Acceptance
Release/
Maintenance
Validate
at each step

Goal: A stage is 100%
complete before moving to
next step

Feedback in Waterfall Model
Oct 15, 2012
Sprenkle - CSCI209
6


Problems may be revealed
in later stages



What happens if problems
aren’t revealed until
Acceptance?

Requirements
Design
Implementation
Integration
Acceptance
Release/
Maintenance
10/15/12
2
Iterative Design
Oct 15, 2012
Sprenkle - CSCI209
7
Design
Evaluate
Implement
Get feedback
from users/

clients

Spiral Model


Idea: smaller prototypes
to test/fix/throw away
Ø

Finding problems early
costs less


In general…
Ø

Break functionality into
smaller pieces
Ø

Implement most
depended-on or highest-
priority features first
Oct 15, 2012
Sprenkle - CSCI209
8
Design

Implement

Evaluate

Prototypes

Radial dimension: cost

[Boehm 86]
Prototypes


Purpose/Dimensions
Ø

Functionality
Ø

Interaction
Ø

Implementation


Fidelity:
Ø

Low: omits details
Ø

High: closer to finished project
Ø

Multi-dimensional


Breadth: % of features covered
Ø

Only enough features for certain tasks


Depth: degree of functionality
Ø

Limited choices, canned responses, no error handling
Oct 15, 2012
Sprenkle - CSCI209
9
From Nielsen, 
Usability Engineering


Low Fidelity
Prototypes


Media: Paper


Examples:
storyboard,
sketches, flipbook,
flow diagram
Oct 15, 2012
Sprenkle - CSCI209
10
High Fidelity Prototypes


Media: Flash, HTML (non-interactive),
PowerPoint, Video


Examples: Mockups, Wizard of Oz
Oct 15, 2012
Sprenkle - CSCI209
11
Virtual Peer for
Autistic Children

http://
www.articulab.justinecassell.com
/projects/
samautism
/
index.html

How to Implement an Effective Solution


Understand the problem (interact with
people
)


Understand the external constraints (interact
with
people
)


Design an effective solution to the problem


While designing the solution, design some
tests

to verify that the problem is solved (and remains
solved)


Code the effective solution to the problem


Teach other team members about your solution
to the problem (interact with
people
)
Oct 15, 2012
Sprenkle - CSCI209
12
10/15/12
3
Spiral Model Steps


Design a {method, class, package}


Implement the {method, class, package}


Test the {method, class, package}


Fix the {method, class, package}


Deploy the {method, class, package}


Get feedback
Ø

Probably will require modifications to design


Repeat
Oct 15, 2012
Sprenkle - CSCI209
13
SOFTWARE TESTING
PROCESS
Oct 15, 2012
Sprenkle - CSCI209
14
Why Test Programs?


Consider an online bookstore
Oct 15, 2012
Sprenkle - CSCI209
15
Bug!

Customer

sees bug

Site Goes Down

for Maintenance

Customers choose

a competitor’s site

Lose customers’

confidence

(a.k.a., a fault)

Microsoft Testing


Beyond their internal testing …
Ø

5 million people beta tested
Ø

60+ years of performance testing
Ø

1 Billion+ Office 2007 sessions


Still, users found correctness, stability,
robustness, and security bugs
Oct 15, 2012
Sprenkle - CSCI209
16
Type 1 Bugs: Compile-Time


Syntax errors
Ø

Missing semicolon, parentheses


Compiler notifies of error


Cheap, easy to fix
Oct 15, 2012
Sprenkle - CSCI209
17
Type 2 Bugs: Run-Time


Usually logic errors


Expensive to locate, fix
Oct 15, 2012
Sprenkle - CSCI209
18
10/15/12
4
Aside: Objections to “Bug” Terminology


“Bug”
Ø

Sounds like it’s just an
annoyance


Can simply swat away
Ø

Minimizes potential problems
Ø

Hides programmer’s
responsibility


Alternative terms
Ø

Defect
Ø

Fault
Oct 15, 2012
Sprenkle - CSCI209
19
Software Testing Process


Test Suite: set of test cases
Oct 15, 2012
Sprenkle - CSCI209
20
Input
Program
Output
Test Case
Program
Under Test
Expected
Output
?
pass or fail
Software Testing Process


Tester plays devil’s advocate
Ø

Hopes
to reveal problems in the program
using “good” test cases
Ø

Better tester finds than a customer!
Oct 15, 2012
Sprenkle - CSCI209
21
Input
Program
Output
How is
testing
different from
debugging
?

How Would You Test a Calculator
Program?


What test cases: input and expected output?
Oct 15, 2012
Sprenkle - CSCI209
22
Numerical
Answer
adds, subtracts,
multiplies, divides
Operands,
operators,
expected
output
Input
Calculator
Program
Output
Example Test Cases for Calculator
Program


Basic Functionality
Ø

Addition
Ø

Subtraction
Ø

Multiplication
Ø

Division
Ø

Order of operations


Invalid Input
Ø

Letters, not-operation
characters (&,$, …)


“Tricky” Cases
Ø

Divide by 0
Ø

Negative Numbers
Ø

Long sequences of
operands, operators
Ø

VERY large, VERY
small numbers
Oct 15, 2012
Sprenkle - CSCI209
23
Types of Testing
(Non-Exhaustive)



Black-box testing


White-box testing


Non-functional testing


Acceptance testing
Oct 15, 2012
Sprenkle - CSCI209
24
Ideas or definitions of any of these?

10/15/12
5
Types of Testing
(Non-Exhaustive)



Black-box testing
Ø

Test
functionality
(e.g., the
calculator)
Ø

No knowledge of the code
Ø

Examples of testing:
boundary values


White-box testing
Ø

Have access to code
Ø

Goal
: execute
all
code


Non-functional testing
Ø

Performance testing
Ø

Usability testing (HCI)
Ø

Security testing
Ø

Internationalization,
localization


Acceptance testing
Ø

Customer tests to
decide if accepts
product
Oct 15, 2012
Sprenkle - CSCI209
25
Levels of Testing


Unit
Ø

Tests minimal software component, in isolation
Ø

For us, Class-level testing
Ø

Web: Web pages (Http Request)


Integration
Ø

Tests interfaces & interaction of classes


System
Ø

Tests that completely integrated system meets
requirements


System Integration
Ø

Test system works with other systems, e.g.,
third-party systems
Oct 15, 2012
Sprenkle - CSCI209
26
Cost increases