Sei sulla pagina 1di 11

Gestione dei Sistemi Software a.

a 2010/11

Processo di Sviluppo (Std 12207)

• Requirements Elicitation Fasi di


• System Requirements Analysis Implementazione e
• System Architecture Design Testing del sw
• Software Requirements Analysis
• Software Design
• Software Construction (Code and Unit Test)
• Software Integration
• Software Testing
• Sys
System
e Integration
eg o
• System Testing
• Software Installation

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
1

Software construction (Std 12207)


Purpose:
To produce executable software units that properly reflect the
software design.

Outcomes:

1. verification criteria are defined for all software units against their
requirements;
2. software units defined by the design are produced;
3. consistency and traceability are established between software
requirements and design and software units;
4. verification of the software units against the requirements and the
design is accomplished.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
2

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 1


Gestione dei Sistemi Software a.a 2010/11

Software integration (Std 12207)


Purpose:
To combine the software units, producing integrated software items,
consistent with the software design, that demonstrate that the functional and non-
functional software requirements are satisfied on an equivalent or complete
operational platform.
Outcomes:
1) an integration strategy is developed for software units consistent with the
software design and the prioritized software requirements;
2) verification criteria for software items are developed that ensure compliance
with the software requirements allocated to the items;
3) software items are verified using the defined criteria;
4) software items defined by the integration strategy are produced;
5) results of integration testing are recorded;
6) consistency and traceability are established between software design and
software items;
7) a regression strategy is developed and applied for re-verifying

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
3

Software testing (Std 12207)


Purpose:
To confirm that the integrated software product meets its defined
requirements

Outcomes:

1. criteria for the integrated software is developed that demonstrates


compliance with the software requirements;
2. integrated software is verified using the defined criteria;
3. test results are recorded;
4 a regression
4. i strategy isi developed
d l d andd applied li d for
f re-testing
i the
h
integrated software when a change in software items is made.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
4

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 2


Gestione dei Sistemi Software a.a 2010/11

Software Testing
.. standard IEEE 610.12-1990 :
TESTING
(1) The process of operating a system or component under specified conditions,
observing or recording the results, and making an evaluation of some aspect
of the system or component.
(2) (IEEE Std.729-1983) The process of analyzing a software item to detect the
differences between existing and required conditions (that is, bugs) and to
evaluate the features of the software item.

See also:
a so: accepta
acceptance
ce testing;
test g; benchmark;
be c a ; checkout;
c ec out; component
co po e t testing;
test g;
development testing; dynamic analysis; formal testing; functional testing;
informal testing; integration testing; interface testing; loopback testing;
mutation testing; operational testing; performance testing; qualification
testing; regression testing; stress testing; structural testing; system testing;
unit testing.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
5

Software Testing
Testing: il processo in cui un sistema software o un suo componente,
es. un programma, è eseguito con lo specifico intento di individuare
malfunzionamenti, prima che esso sia rilasciato all’utente finale

component
to be
tested

results

tester
test cases
valori di input con cui
esercitare il componente

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
6

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 3


Gestione dei Sistemi Software a.a 2010/11

Software Testing
Scopi:
• Identificare la presenza di malfunzionamenti di un software
=> presenza di difetti
• Valutare la rispondenza di un sistema ai requisiti, funzionali e non

… una delle
d ll principali
i i li attività
tti ità di verifica
ifi e validazione
lid i del
d l software
ft
… una delle principali attività per l’assicurazione della qualità del software

Attenzione:
il testing non può dimostrare l’assenza di difetti, ma può solo dimostrare la
presenza di difetti (Dijkstra)
… se eseguendo il testing non riesco ad individuare malfunzionamenti, non è
detto che non vi siano difetti …
… non vi è garanzia che se alla n-esima prova un modulo od un sistema abbia
risposto correttamente (ovvero non sono stati più riscontrati difetti), altrettanto
possa fare alla (n+1)-esima
… impossibilità di produrre tutte le possibili configurazioni di valori di input (test
case) in corrispondenza di tutti i possibili stati interni di un sistema software
Gestione dei Sistemi Software
Prof. G. A. Di Lucca - Univ. del Sannio
7

…...
repeat
B0
… l’impossibiltà del testing esaustivo … if R1 then
if R2 then
per il semplice programma if R3 then
schematizzato a fianco,
fianco se il ciclo viene B1
eseguito solamente al max 20 volte si else
possono avere oltre 100.000 miliardi di B2
endif
possibili esecuzioni diverse !!
if R4 then
Nell’ipotesi che ciascun test case sia B3
elaborato in 1 ms sarebbero necessari else
3170 anni !! B4
endif
else
B5
endif
endif
until R6
……….
Ingegneria del Software
Ing. G. A. Di Lucca - Univ. del Sannio
8

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 4


Gestione dei Sistemi Software a.a 2010/11

Software Testing

Necessità di uso di metodi e tecniche, per ridurre lo sforzo (inteso


come impiego di risorse umane, tecnologiche e di tempo) per poter
individuare il massimo numero ppossibile di malfunzionamenti ((con il
minimo numero possibile di test case) prima che il prodottto sia
rilasciato

… circa il 40% dei costi di produzione del software per il raggiungimento


di ragionevoli livelli di qualità sono richiesti dal testing

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
9

Software Testing

Failure (Fallimento/malfunzionamento):
evento osservabile di violazione delle specifiche (ovvero del
comportamento atteso);
Fault (difetto/anomalia):
Insieme di informazioni (dati di ingresso, valori di variabili,
istruzioni, etc.) che quando processate possono produrre un
fallimento;
Error (errore):
causa che genera un difetto.
NB - non tutti gli errori (mistake) producono un fallimento;
NB.
- un fault può generare molti fallimenti.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
10

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 5


Gestione dei Sistemi Software a.a 2010/11

Esempio

ERRORE di editing/digitazione program RADDOPPIA ...


ANOMALIA // calcola il doppio del valore letto in input
....
=> “*” invece di “+”
read (x);
MALFUNZIONAMENTO y := x*x;
=> il valore visualizzato write (y)
...
ANOMALIA causata da un errore
MALFUNZIONAMENTO causato da
un’anomalia

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
11

Who Tests the Software?

developer independent tester


Understands the system Must learn about the system,
but, will test "gently" but, will attempt to break it
and, is driven by "delivery" and, is driven by quality

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
12

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 6


Gestione dei Sistemi Software a.a 2010/11

Testing Strategy
• Starting by ‘testing-in-the-small’ and move toward ‘testing-in-the-
large’
• For conventional ((i.e. not OO)) software
– The module (component) is our initial focus
– Integration of modules follows

• For OO software
– focus when “testing in the small” changes from an individual
module (the conventional view) to an OO class that
encompasses attributes and operations and implies
communication and collaboration

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
13

Testing Strategy
integration
test
unit test

S ft
Software System
S t

validation system
test test
Gestione dei Sistemi Software
Prof. G. A. Di Lucca - Univ. del Sannio
14

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 7


Gestione dei Sistemi Software a.a 2010/11

Il processo di testing

Unit
testing
Module
testing
Sub-system
testing
System
testing
Acceptance
testing

Component Integration testing User


testing testing
Ingegneria del Software
Ing. G. A. Di Lucca - Univ. del Sannio
15

Testing di unità
(detto anche di modulo)

il testing è applicato isolatamente ad una unità o ad un modulo di


un sistema software;
unità:
ità elemento
l t ddefinito
fi it nell progetto
tt di un sistema
it software
ft e
testabile separatamente;
… una classe, un metodo, un programma, una function,
una libreria di function,

unità e modulo sono spesso usati come sinonimi


obiettivo è quello di rilevare malfunzionamenti (logica e dati) nel
modulo;
tipicamente è realizzato dal programmatore che ha prodotto l'unità
sotto test.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
16

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 8


Gestione dei Sistemi Software a.a 2010/11

Testing di integrazione
il testing è applicato ad un aggregato di due o più unità di un sistema
software;
ll'obiettivo
obiettivo è quello di rilevare errori nelle interazioni fra le unità e
nelle funzioni che l'aggregato deve assolvere;
tipicamente non è compito dei programmatori che hanno prodotto le
unità componenti.

le unità da integrare sono selezionate in base a criteri ricavabili dal


progetto (architettura del sistema);
il termine testing di integrazione viene usato anche con riferimento
alla integrazione componenti hardware e software.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
17

Testing di sistema
il testing è applicato sul sistema software completo ed integrato;
l'obiettivo è quello di valutare l'adesione del sistema ai requisiti
specificati;
effettuato dal team addetto al testing;
Vanno testati tutti i tipi di requisiti, non sono solo i requisiti
funzionali;

Ad esempio:
Prestazioni;
Sicurezza;
Manutenibilità;
Usabilità;
.......etc.

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
18

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 9


Gestione dei Sistemi Software a.a 2010/11

alpha testing

uso del sistema da parte di utenti reali ma nell'ambiente di


produzione e prima della immissione sul mercato.

beta testing
installazione ed uso del sistema in ambiente reale prima della
immissione sul mercato.

tipicamente adottati dai produttori di packages per mercato di massa

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
19

Testing di accettazione
testing effettuato sull'intero sistema sulla base di un piano e di
procedure approvate dal cliente (o utente);
l'obiettivo é quello di mettere il cliente, l'utente o altri a ciò preposti
(collaudatori o enti ad hoc) in condizione di decidere se accettare il
prodotto;

segna il passaggio del sistema dal produttore all'ambiente operativo

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
20

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 10


Gestione dei Sistemi Software a.a 2010/11

Altre tipologie di Testing

• Validation testing
– Focus is on software requirements
• Performance Testing
– test the run-time
run time performance of software within the context of an
integrated system
• Stress testing
– executes a system in a manner that demands resources in abnormal
quantity, frequency, or volume
• Security testing
– verifies that protection mechanisms built into a system will, in fact, protect
p p penetration
it from improper p
• Recovery testing
– forces the software to fail in a variety of ways and verifies that recovery is
properly performed

Gestione dei Sistemi Software


Prof. G. A. Di Lucca - Univ. del Sannio
21

Gestione dei Sistemi Software - Prof. G.A. Di Lucca 11

Potrebbero piacerti anche