@GanbaroDigital
ISO 25010:2011
Systems and software engineering -
Systems and software Quality
Requirements and Evaluation
(SQuaRE) -
Systems and software quality models
Slide 37
Slide 37 text
@GanbaroDigital
Two Quality Models
• Quality In Use Model
• Product Quality Model
Slide 38
Slide 38 text
@GanbaroDigital
Two Quality Models
• Quality In Use Model
• Product Quality Model
Slide 39
Slide 39 text
@GanbaroDigital
Quality In Use Model
measures what it is like
to live with the code
that has shipped.
Slide 40
Slide 40 text
@GanbaroDigital
Product Quality Model
measures
the quality of the code
that you want to ship.
Slide 41
Slide 41 text
@GanbaroDigital
Other models (e.g. data quality)
are covered elsewhere in
ISO 25000
Slide 42
Slide 42 text
@GanbaroDigital
What does the
Product Quality Model
look like?
@GanbaroDigital
We can apply the
Product Quality Model
to MVC apps.
Slide 53
Slide 53 text
@GanbaroDigital
How?
We define quality measurements.
Slide 54
Slide 54 text
@GanbaroDigital
What is a
quality measurement?
Slide 55
Slide 55 text
@GanbaroDigital
It is a mathematical function:
X = A / B
or
X = 1 - ( A / B )
Slide 56
Slide 56 text
@GanbaroDigital
X = A / B
where
A is the number of times that
a quality criteria is satisfied
B is the total number of opportunities
to satisfy that quality criteria
Slide 57
Slide 57 text
@GanbaroDigital
For example:
A is the number of times
that output is correctly escaped.
B is the total number of times
that output needs escaping.
Slide 58
Slide 58 text
@GanbaroDigital
If we correctly escape output
25 times out of 30
X = 25 / 30
= 0.83
Slide 59
Slide 59 text
@GanbaroDigital
If we correctly escape output
87 times out of 1237
X = 87 / 1237
= 0.07
Slide 60
Slide 60 text
@GanbaroDigital
These measurements
are comparable.
We can compare
0.83 to 0.07.
Slide 61
Slide 61 text
@GanbaroDigital
X = 1 - ( A / B )
where
A is the number of times that
a quality criteria is not satisfied
B is the total number of opportunities
to satisfy that quality criteria
Slide 62
Slide 62 text
@GanbaroDigital
For example:
A is the number of application routes
where a GET modifies the database
B is the total number of routes
in the application that accept GETs
Slide 63
Slide 63 text
@GanbaroDigital
If we modify the database
during a GET request
in 5 routes out of 400
X = 1 - ( 5 / 400 )
= 0.98
Slide 64
Slide 64 text
@GanbaroDigital
If we modify the database
during a GET request
in 39 routes out of 258
X = 1 - ( 39 / 258 )
= 0.84
Slide 65
Slide 65 text
@GanbaroDigital
These measurements
are comparable.
We can compare
0.98 to 0.84.
Slide 66
Slide 66 text
@GanbaroDigital
Quality measurements:
X = A / B
or
X = 1 - ( A / B )
Slide 67
Slide 67 text
@GanbaroDigital
Use X = A / B
when you want people
to do A
as much as possible
Slide 68
Slide 68 text
@GanbaroDigital
Use X = 1 - ( A / B )
when you want people
to do A
as little as possible
Slide 69
Slide 69 text
@GanbaroDigital
When we measure quality,
a quality criteria is either:
satisfied (a pass) or
not (a fail).
Slide 70
Slide 70 text
@GanbaroDigital
Every quality measurement
has a value between 0 and 1.
0 is the worst score possible.
1 is the best score possible.
Slide 71
Slide 71 text
@GanbaroDigital
One
quality measurement function
measures one
quality criteria.
Slide 72
Slide 72 text
@GanbaroDigital
ISO is working on some draft
quality measurements.
They’re not ready.
They’re not specific enough.
Slide 73
Slide 73 text
@GanbaroDigital
We have to define our own.
Slide 74
Slide 74 text
@GanbaroDigital
Step 1:
Define your quality criteria.
Slide 75
Slide 75 text
@GanbaroDigital
Start by covering
the basics.
Cover what is important to you.
Slide 76
Slide 76 text
@GanbaroDigital
3 Levels Of Importance
• Essential - must not ship
• Major - should not merge
• Minor - housekeeping
@GanbaroDigital
3 Levels Of Importance
• Essential - must not ship
• Major - should not merge
• Minor - housekeeping
Slide 79
Slide 79 text
@GanbaroDigital
Examples: HTTP
• Do not modify database on GETs
• Return HTTP 422 when request
validation fails
• Return HTTP 500 when an unexpected
exception occurs
Slide 80
Slide 80 text
@GanbaroDigital
3 Levels Of Importance
• Essential - must not ship
• Major - should not ship
• Minor - housekeeping
Slide 81
Slide 81 text
@GanbaroDigital
Examples: Code Health
• Follow SOLID
• Follow DRY
• Remove all unused code
Slide 82
Slide 82 text
@GanbaroDigital
Step 2:
Define one or more
quality measurement function
for each of
your quality criteria.
Slide 83
Slide 83 text
@GanbaroDigital
Route Parameter Verification
• X = A / B, where
• A = number of route parameters that
are verified, and
• B = total number of route parameters
defined
Slide 84
Slide 84 text
@GanbaroDigital
CSRF Token Publishing
• X = A / B, where
• A = number of HTML forms that
publish a CSRF token
• B = total number of HTML forms
Slide 85
Slide 85 text
@GanbaroDigital
CSRF Token Verification
• X = A / B, where
• A = number of routes that validate the
CSRF token of a HTML form
• B = total number of routes that accept
a HTML form as input
Slide 86
Slide 86 text
@GanbaroDigital
Verification Failure Notification
• X = A / B, where
• A = number of routes that return HTTP
422 when request verification fails
• B = total number of routes that accept
any form of input
Slide 87
Slide 87 text
@GanbaroDigital
Class Substitution
• X = A / B, where
• A = number of methods that accept
an interface as the input type
• B = total number of methods that
accept objects as input
Slide 88
Slide 88 text
@GanbaroDigital
… you get the idea.
Slide 89
Slide 89 text
@GanbaroDigital
Start small.
Don’t go overboard.
Slide 90
Slide 90 text
@GanbaroDigital
No-one writes perfect code.
No-one can afford
to pay for perfect code.
Slide 91
Slide 91 text
@GanbaroDigital
Design quality measurements
for the things that are cheaper
to get right first time.
Slide 92
Slide 92 text
@GanbaroDigital
Design quality measurements
for the things
that need to become habits.
Slide 93
Slide 93 text
@GanbaroDigital
How do we use
the quality model
in code reviews?
Slide 94
Slide 94 text
@GanbaroDigital
Your quality criteria
are your
code review checklist.
Slide 95
Slide 95 text
@GanbaroDigital
Train your developers
to use the quality criteria
when designing
and writing software.
Slide 96
Slide 96 text
@GanbaroDigital
How do we use
the quality model
in QA teams?
Slide 97
Slide 97 text
@GanbaroDigital
The quality model
forms the basis
of your test strategy.
Slide 98
Slide 98 text
@GanbaroDigital
Update your quality criteria
and quality measurement functions
when QA discovers
new kinds of defects.
Slide 99
Slide 99 text
@GanbaroDigital
How do we use
the quality model
with management?
@GanbaroDigital
The quality measurements show
where quality is good
as well as
where it needs improving.
Slide 103
Slide 103 text
@GanbaroDigital
Ignoring problems is
just as unhealthy
as only reporting problems.
Slide 104
Slide 104 text
@GanbaroDigital
Celebrate your successes.
Fix your faults.
Slide 105
Slide 105 text
@GanbaroDigital
In post-mortems, link the root cause
to the relevant quality measurements
or to any missing ones.
Slide 106
Slide 106 text
@GanbaroDigital
Identify gaps in your quality criteria
and plug them.
Slide 107
Slide 107 text
@GanbaroDigital
How do we deal
when the team changes?
Slide 108
Slide 108 text
@GanbaroDigital
Quality has already been defined.
That’s what your written
quality criteria are.
You just need to train new people
in your quality criteria.
Slide 109
Slide 109 text
@GanbaroDigital
Talk about your quality criteria
when interviewing.
Make it part of your
engineering culture.
Slide 110
Slide 110 text
Stuart Herbert ~ @stuherbert
Founder @GanbaroDigital