diff --git a/Ingegneria del Software/0722_1/correct.txt b/Ingegneria del Software/0722_1/correct.txt new file mode 100644 index 0000000..d4625fd --- /dev/null +++ b/Ingegneria del Software/0722_1/correct.txt @@ -0,0 +1 @@ +State coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_1/quest.txt b/Ingegneria del Software/0722_1/quest.txt new file mode 100644 index 0000000..e6594c7 --- /dev/null +++ b/Ingegneria del Software/0722_1/quest.txt @@ -0,0 +1,19 @@ +img=https://i.imgur.com/HZd8X10.png +La state coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + +Si consideri il seguente insieme di test cases: + + + +Test case 1: act0 act0 act2 act0 act0 act0 act2 act1 act2 act0 act2 act2 act2 act2 act0 act0 act1 act2 act2 act0 act2 act0 act2 act1 act0 act2 act1 act2 act2 act0 act2 + +Test case 2: act2 act2 act1 act0 act0 act0 act0 act2 act2 act1 act2 + +Test case 3: act2 act2 act2 act1 act0 act2 act2 act0 act2 + + + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_1/wrong 1.txt b/Ingegneria del Software/0722_1/wrong 1.txt new file mode 100644 index 0000000..4e45af2 --- /dev/null +++ b/Ingegneria del Software/0722_1/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_1/wrong 2.txt b/Ingegneria del Software/0722_1/wrong 2.txt new file mode 100644 index 0000000..a8aead7 --- /dev/null +++ b/Ingegneria del Software/0722_1/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_10/correct.txt b/Ingegneria del Software/0722_10/correct.txt new file mode 100644 index 0000000..23e721f --- /dev/null +++ b/Ingegneria del Software/0722_10/correct.txt @@ -0,0 +1 @@ +50% \ No newline at end of file diff --git a/Ingegneria del Software/0722_10/quest.txt b/Ingegneria del Software/0722_10/quest.txt new file mode 100644 index 0000000..c18ff48 --- /dev/null +++ b/Ingegneria del Software/0722_10/quest.txt @@ -0,0 +1,20 @@ +img=https://i.imgur.com/pz1HiRX.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + + +ed il seguente insieme di test cases: + + + +Test case 1: act2 act2 + +Test case 2: act0 act1 act1 act1 act2 act2 act1 act0 act1 + +Test case 3: act0 act0 + + + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_10/wrong 1.txt b/Ingegneria del Software/0722_10/wrong 1.txt new file mode 100644 index 0000000..52f25fe --- /dev/null +++ b/Ingegneria del Software/0722_10/wrong 1.txt @@ -0,0 +1 @@ +70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_10/wrong 2.txt b/Ingegneria del Software/0722_10/wrong 2.txt new file mode 100644 index 0000000..1e091a3 --- /dev/null +++ b/Ingegneria del Software/0722_10/wrong 2.txt @@ -0,0 +1 @@ +90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_11/correct.txt b/Ingegneria del Software/0722_11/correct.txt new file mode 100644 index 0000000..f293f3e --- /dev/null +++ b/Ingegneria del Software/0722_11/correct.txt @@ -0,0 +1 @@ +(a = 6, b = 0, c = 1), (a = 0, b = 5, c = 0), (a = 0, b = 3, c = 0) \ No newline at end of file diff --git a/Ingegneria del Software/0722_11/quest.txt b/Ingegneria del Software/0722_11/quest.txt new file mode 100644 index 0000000..709cf96 --- /dev/null +++ b/Ingegneria del Software/0722_11/quest.txt @@ -0,0 +1,22 @@ +Una Condition è una proposizione booleana, cioè una espressione con valore booleano che non può essere decomposta +in espressioni boolean più semplici. Ad esempio, (x + y <= 3) è una condition. + +Una Decision è una espressione booleana composta da conditions e zero o più operatori booleani. Ad esempio, sono decisions: +(x + y <= 3) +((x + y <= 3) || (x - y > 7)) +Un insieme di test cases T soddisfa il criterio di Condition/Decision coverage se tutte le seguenti condizioni sono soddisfatte: + +1) Ciascun punto di entrata ed uscita nel programma è eseguito in almeno un test; +2) Per ogni decision d nel programma, per ogni condition c in d, esiste un test in T in cui c è true ed un test in T in cui c è false. +3) Per ogni decision d nel programma, esiste un test in T in cui d è true ed un test in T in cui d è false. + +Si consideri la seguente funzione: +int f(int a, int b, int c) +{ if ( (a + b >= 6) && (b - c <= 1) ) + return (1); // punto di uscita 1 + else if ((b - c <= 1) || (b + c >= 5)) + then return (2); // punto di uscita 2 + else return (3); // punto di uscita 3 +} + +Quale dei seguenti test set soddisfa il criterio della Condition/Decision coverage ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_11/wrong 1.txt b/Ingegneria del Software/0722_11/wrong 1.txt new file mode 100644 index 0000000..eafabb1 --- /dev/null +++ b/Ingegneria del Software/0722_11/wrong 1.txt @@ -0,0 +1 @@ +(a = 6, b = 0, c = 1), (a = 0, b = 5, c = 0), (a = 0, b = 3, c = 2) \ No newline at end of file diff --git a/Ingegneria del Software/0722_11/wrong 2.txt b/Ingegneria del Software/0722_11/wrong 2.txt new file mode 100644 index 0000000..fc010a3 --- /dev/null +++ b/Ingegneria del Software/0722_11/wrong 2.txt @@ -0,0 +1 @@ +(a = 5, b = 0, c = 1), (a = 0, b = 5, c = 0), (a = 0, b = 3, c = 0) \ No newline at end of file diff --git a/Ingegneria del Software/0722_12/correct.txt b/Ingegneria del Software/0722_12/correct.txt new file mode 100644 index 0000000..8785661 --- /dev/null +++ b/Ingegneria del Software/0722_12/correct.txt @@ -0,0 +1 @@ +{x = -200, x = -50, x = 0, x = 100, x = 700} \ No newline at end of file diff --git a/Ingegneria del Software/0722_12/quest.txt b/Ingegneria del Software/0722_12/quest.txt new file mode 100644 index 0000000..58ef38e --- /dev/null +++ b/Ingegneria del Software/0722_12/quest.txt @@ -0,0 +1,11 @@ +Il partition coverage di un insieme di test cases è la percentuale di elementi della partition inclusi nei test cases. La partition è una partizione finita dell'insieme di input della funzione che si sta testando. + +Si consideri la seguente funzione C: + +int f1(int x) { return (x + 7); } + +Si vuole testare la funzione f1(). A tal fine l'insieme degli interi viene partizionato come segue: + +{(-inf, -101], [-100, -1], {0}, [1, 500], [501, +inf)} + +Quale dei seguenti test cases consegue una partition coverage del 100% ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_12/wrong 1.txt b/Ingegneria del Software/0722_12/wrong 1.txt new file mode 100644 index 0000000..a6df32d --- /dev/null +++ b/Ingegneria del Software/0722_12/wrong 1.txt @@ -0,0 +1 @@ +{x = -200, x = -150, x = 0, x = 100, x = 700} \ No newline at end of file diff --git a/Ingegneria del Software/0722_12/wrong 2.txt b/Ingegneria del Software/0722_12/wrong 2.txt new file mode 100644 index 0000000..0aaedb8 --- /dev/null +++ b/Ingegneria del Software/0722_12/wrong 2.txt @@ -0,0 +1 @@ +{x = -200, x = -50, x = 0, x = 100, x = 500} \ No newline at end of file diff --git a/Ingegneria del Software/0722_13/correct.txt b/Ingegneria del Software/0722_13/correct.txt new file mode 100644 index 0000000..b110af1 --- /dev/null +++ b/Ingegneria del Software/0722_13/correct.txt @@ -0,0 +1 @@ +Transition coverage: 40% \ No newline at end of file diff --git a/Ingegneria del Software/0722_13/quest.txt b/Ingegneria del Software/0722_13/quest.txt new file mode 100644 index 0000000..83987bd --- /dev/null +++ b/Ingegneria del Software/0722_13/quest.txt @@ -0,0 +1,15 @@ +img=https://i.imgur.com/dMvnEEi.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + +ed il seguente insieme di test cases: + +Test case 1: act2 act2 act2 act0 + +Test case 2: act0 act1 act2 act0 act2 + +Test case 3: act2 act2 act2 act2 + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_13/wrong 1.txt b/Ingegneria del Software/0722_13/wrong 1.txt new file mode 100644 index 0000000..eb5e1cd --- /dev/null +++ b/Ingegneria del Software/0722_13/wrong 1.txt @@ -0,0 +1 @@ +Transition coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_13/wrong 2.txt b/Ingegneria del Software/0722_13/wrong 2.txt new file mode 100644 index 0000000..cf27703 --- /dev/null +++ b/Ingegneria del Software/0722_13/wrong 2.txt @@ -0,0 +1 @@ +Transition coverage: 70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_14/correct.txt b/Ingegneria del Software/0722_14/correct.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_14/correct.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_14/quest.txt b/Ingegneria del Software/0722_14/quest.txt new file mode 100644 index 0000000..f3d1bcd --- /dev/null +++ b/Ingegneria del Software/0722_14/quest.txt @@ -0,0 +1,17 @@ +Il branch coverage di un insieme di test cases è la percentuale di branch del programma che sono attraversati da almeno un test case. + +Si consideri la seguente funzione C: + +----------- + +int f(int x, int y) { + + if (x - y <= 2) { if (x + y >= 1) return (1); else return (2); } + + else {if (x + 2*y >= 5) return (3); else return (4); } + + } /* f() */ + +Si considerino i seguenti test cases: {x=1, y=2}, {x=0, y=0}, {x=5, y=0}, {x=3, y=0}. + +Quale delle seguenti è la branch coverage conseguita? \ No newline at end of file diff --git a/Ingegneria del Software/0722_14/wrong 1.txt b/Ingegneria del Software/0722_14/wrong 1.txt new file mode 100644 index 0000000..a2507e5 --- /dev/null +++ b/Ingegneria del Software/0722_14/wrong 1.txt @@ -0,0 +1 @@ +80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_14/wrong 2.txt b/Ingegneria del Software/0722_14/wrong 2.txt new file mode 100644 index 0000000..23e721f --- /dev/null +++ b/Ingegneria del Software/0722_14/wrong 2.txt @@ -0,0 +1 @@ +50% \ No newline at end of file diff --git a/Ingegneria del Software/0722_15/correct.txt b/Ingegneria del Software/0722_15/correct.txt new file mode 100644 index 0000000..973ef63 --- /dev/null +++ b/Ingegneria del Software/0722_15/correct.txt @@ -0,0 +1 @@ +State coverage: 75% \ No newline at end of file diff --git a/Ingegneria del Software/0722_15/quest.txt b/Ingegneria del Software/0722_15/quest.txt new file mode 100644 index 0000000..035eb2b --- /dev/null +++ b/Ingegneria del Software/0722_15/quest.txt @@ -0,0 +1,16 @@ +img=https://i.imgur.com/wYIAk1e.png +La state coverage di un insieme di test cases (cioè sequeze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + +Si consideri il seguente insieme di test cases: + +Test case 1: act1 act0 act2 act0 + +Test case 2: act0 act1 act2 act2 act0 + + +Test case 3: act0 act0 act0 + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_15/wrong 1.txt b/Ingegneria del Software/0722_15/wrong 1.txt new file mode 100644 index 0000000..d4625fd --- /dev/null +++ b/Ingegneria del Software/0722_15/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_15/wrong 2.txt b/Ingegneria del Software/0722_15/wrong 2.txt new file mode 100644 index 0000000..a8aead7 --- /dev/null +++ b/Ingegneria del Software/0722_15/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_16/correct.txt b/Ingegneria del Software/0722_16/correct.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_16/correct.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_16/quest.txt b/Ingegneria del Software/0722_16/quest.txt new file mode 100644 index 0000000..12ae518 --- /dev/null +++ b/Ingegneria del Software/0722_16/quest.txt @@ -0,0 +1,17 @@ +Il branch coverage di un insieme di test cases è la percentuale di branch del programma che sono attraversati da almeno un test case. + +Si consideri la seguente funzione C: + +----------- + +int f(int x, int y) { + + if (x - y <= 0) { if (x + y >= 2) return (1); else return (2); } + + else {if (2*x + y >= 1) return (3); else return (4); } + + } /* f() */ + +Si considerino i seguenti test cases: {x=1, y=1}, {x=0, y=0}, {x=1, y=0}, {x=0, y=-1}. + +Quale delle seguenti è la branch coverage conseguita? \ No newline at end of file diff --git a/Ingegneria del Software/0722_16/wrong 1.txt b/Ingegneria del Software/0722_16/wrong 1.txt new file mode 100644 index 0000000..23e721f --- /dev/null +++ b/Ingegneria del Software/0722_16/wrong 1.txt @@ -0,0 +1 @@ +50% \ No newline at end of file diff --git a/Ingegneria del Software/0722_16/wrong 2.txt b/Ingegneria del Software/0722_16/wrong 2.txt new file mode 100644 index 0000000..a2507e5 --- /dev/null +++ b/Ingegneria del Software/0722_16/wrong 2.txt @@ -0,0 +1 @@ +80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_17/correct.txt b/Ingegneria del Software/0722_17/correct.txt new file mode 100644 index 0000000..a2507e5 --- /dev/null +++ b/Ingegneria del Software/0722_17/correct.txt @@ -0,0 +1 @@ +80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_17/quest.txt b/Ingegneria del Software/0722_17/quest.txt new file mode 100644 index 0000000..3150037 --- /dev/null +++ b/Ingegneria del Software/0722_17/quest.txt @@ -0,0 +1,16 @@ +img=https://i.imgur.com/ixzrFpG.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + + +ed il seguente insieme di test cases: + +Test case 1: act1 act1 act1 + +Test case 2: act1 act2 act1 act1 act0 act0 act0 act1 act2 act1 act2 act1 act2 act2 act0 act2 act0 act1 act2 act2 act0 act2 act2 act2 + +Test case 3: act0 act1 act1 act0 act2 act2 act0 act2 act0 act2 act0 act2 act0 act0 act0 act0 act0 act0 act1 act1 act2 + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_17/wrong 1.txt b/Ingegneria del Software/0722_17/wrong 1.txt new file mode 100644 index 0000000..2fd674f --- /dev/null +++ b/Ingegneria del Software/0722_17/wrong 1.txt @@ -0,0 +1 @@ +60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_17/wrong 2.txt b/Ingegneria del Software/0722_17/wrong 2.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_17/wrong 2.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_18/correct.txt b/Ingegneria del Software/0722_18/correct.txt new file mode 100644 index 0000000..d4625fd --- /dev/null +++ b/Ingegneria del Software/0722_18/correct.txt @@ -0,0 +1 @@ +State coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_18/quest.txt b/Ingegneria del Software/0722_18/quest.txt new file mode 100644 index 0000000..ca50f58 --- /dev/null +++ b/Ingegneria del Software/0722_18/quest.txt @@ -0,0 +1,16 @@ +img=https://i.imgur.com/a7JeI7m.png +La state coverage di un insieme di test cases (cioè sequeze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + + +Si consideri il seguente insieme di test cases: + +Test case 1: act1 act2 act2 act2 act2 act0 act2 + +Test case 2: act2 act0 act0 act2 act0 + +Test case 3: act2 act2 act0 act2 act2 act0 + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_18/wrong 1.txt b/Ingegneria del Software/0722_18/wrong 1.txt new file mode 100644 index 0000000..f6a4b07 --- /dev/null +++ b/Ingegneria del Software/0722_18/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_18/wrong 2.txt b/Ingegneria del Software/0722_18/wrong 2.txt new file mode 100644 index 0000000..a8aead7 --- /dev/null +++ b/Ingegneria del Software/0722_18/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_19/correct.txt b/Ingegneria del Software/0722_19/correct.txt new file mode 100644 index 0000000..8b0c318 --- /dev/null +++ b/Ingegneria del Software/0722_19/correct.txt @@ -0,0 +1 @@ +Transition coverage: 50% \ No newline at end of file diff --git a/Ingegneria del Software/0722_19/quest.txt b/Ingegneria del Software/0722_19/quest.txt new file mode 100644 index 0000000..a412231 --- /dev/null +++ b/Ingegneria del Software/0722_19/quest.txt @@ -0,0 +1,17 @@ +img=https://i.imgur.com/Rd4gO4k.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + + +ed il seguente insieme di test cases: + +Test case 1: act0 act2 act1 act2 + +Test case 2: act2 act2 act1 act2 act2 + + +Test case 3: act2 act1 act0 act2 + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_19/wrong 1.txt b/Ingegneria del Software/0722_19/wrong 1.txt new file mode 100644 index 0000000..eb5e1cd --- /dev/null +++ b/Ingegneria del Software/0722_19/wrong 1.txt @@ -0,0 +1 @@ +Transition coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_19/wrong 2.txt b/Ingegneria del Software/0722_19/wrong 2.txt new file mode 100644 index 0000000..a29d476 --- /dev/null +++ b/Ingegneria del Software/0722_19/wrong 2.txt @@ -0,0 +1 @@ +Transition coverage: 80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_2/correct.txt b/Ingegneria del Software/0722_2/correct.txt new file mode 100644 index 0000000..7d0c43c --- /dev/null +++ b/Ingegneria del Software/0722_2/correct.txt @@ -0,0 +1,5 @@ +int f(in x, int y) +{ +assert( (x > 0) && (y > 0) && ((x > 1) || (y > 1)) ); +..... +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_2/quest.txt b/Ingegneria del Software/0722_2/quest.txt new file mode 100644 index 0000000..8210340 --- /dev/null +++ b/Ingegneria del Software/0722_2/quest.txt @@ -0,0 +1,7 @@ +Pre-condizioni, invarianti e post-condizioni di un programma possono essere definiti usando la macro del C assert() (in ). In particolare, assert(expre) non fa nulla se l'espressione expre vale TRUE (cioè non è 0), stampa un messaggio di errore su stderr e abortisce l'esecuzione del programma altrimenti. + +Si consideri la funzione C + +int f(in x, int y) { ..... } + +Quale delle seguenti assert esprime la pre-condizione che entrambi gli argomenti di f sono positivi ed almeno uno di loro è maggiore di 1 ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_2/wrong 1.txt b/Ingegneria del Software/0722_2/wrong 1.txt new file mode 100644 index 0000000..392cc67 --- /dev/null +++ b/Ingegneria del Software/0722_2/wrong 1.txt @@ -0,0 +1,5 @@ +int f(in x, int y) +{ +assert( (x >= 0) && (y >= 0) && ((x > 1) || (y > 1)) ); +..... +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_2/wrong 2.txt b/Ingegneria del Software/0722_2/wrong 2.txt new file mode 100644 index 0000000..2fde3f0 --- /dev/null +++ b/Ingegneria del Software/0722_2/wrong 2.txt @@ -0,0 +1,5 @@ +int f(in x, int y) +{ +assert( (x > 0) && (y > 0) && (x > 1) && (y > 1) ); +..... +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_20/correct.txt b/Ingegneria del Software/0722_20/correct.txt new file mode 100644 index 0000000..973ef63 --- /dev/null +++ b/Ingegneria del Software/0722_20/correct.txt @@ -0,0 +1 @@ +State coverage: 75% \ No newline at end of file diff --git a/Ingegneria del Software/0722_20/quest.txt b/Ingegneria del Software/0722_20/quest.txt new file mode 100644 index 0000000..afddbb1 --- /dev/null +++ b/Ingegneria del Software/0722_20/quest.txt @@ -0,0 +1,15 @@ +img=https://i.imgur.com/dzwfqoB.png +La state coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + +Si consideri il seguente insieme di test cases: + +Test case 1: act0 act1 act2 act2 act2 act1 act1 act0 act0 act0 act0 act0 act1 + +Test case 2: act1 + +Test case 3: act0 act1 act2 act0 act2 act2 act2 act2 act0 act1 + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_20/wrong 1.txt b/Ingegneria del Software/0722_20/wrong 1.txt new file mode 100644 index 0000000..4e45af2 --- /dev/null +++ b/Ingegneria del Software/0722_20/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_20/wrong 2.txt b/Ingegneria del Software/0722_20/wrong 2.txt new file mode 100644 index 0000000..d4625fd --- /dev/null +++ b/Ingegneria del Software/0722_20/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_21/correct.txt b/Ingegneria del Software/0722_21/correct.txt new file mode 100644 index 0000000..4e45af2 --- /dev/null +++ b/Ingegneria del Software/0722_21/correct.txt @@ -0,0 +1 @@ +State coverage: 60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_21/quest.txt b/Ingegneria del Software/0722_21/quest.txt new file mode 100644 index 0000000..37d7e62 --- /dev/null +++ b/Ingegneria del Software/0722_21/quest.txt @@ -0,0 +1,20 @@ +img=https://i.imgur.com/wVYqOVj.png +La state coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + + +Si consideri il seguente insieme di test cases: + + + +Test case 1: act0 act2 act2 act1 act2 act1 act2 act0 act1 + +Test case 2: act0 act2 act0 + +Test case 3: act1 act1 act2 + + + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_21/wrong 1.txt b/Ingegneria del Software/0722_21/wrong 1.txt new file mode 100644 index 0000000..f6a4b07 --- /dev/null +++ b/Ingegneria del Software/0722_21/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_21/wrong 2.txt b/Ingegneria del Software/0722_21/wrong 2.txt new file mode 100644 index 0000000..90b2f35 --- /dev/null +++ b/Ingegneria del Software/0722_21/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 40% \ No newline at end of file diff --git a/Ingegneria del Software/0722_22/correct.txt b/Ingegneria del Software/0722_22/correct.txt new file mode 100644 index 0000000..f6a4b07 --- /dev/null +++ b/Ingegneria del Software/0722_22/correct.txt @@ -0,0 +1 @@ +State coverage: 90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_22/quest.txt b/Ingegneria del Software/0722_22/quest.txt new file mode 100644 index 0000000..fdca1b9 --- /dev/null +++ b/Ingegneria del Software/0722_22/quest.txt @@ -0,0 +1,16 @@ +img=https://i.imgur.com/zkjv6a7.png +La state coverage di un insieme di test cases (cioè sequeze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + +Si consideri il seguente insieme di test cases: + +Test case 1: act2 act1 act2 act2 act1 act0 act1 act2 act2 + +Test case 2: act0 act0 act2 + + +Test case 3: act2 act0 act2 + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_22/wrong 1.txt b/Ingegneria del Software/0722_22/wrong 1.txt new file mode 100644 index 0000000..1c07658 --- /dev/null +++ b/Ingegneria del Software/0722_22/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_22/wrong 2.txt b/Ingegneria del Software/0722_22/wrong 2.txt new file mode 100644 index 0000000..d4625fd --- /dev/null +++ b/Ingegneria del Software/0722_22/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_23/correct.txt b/Ingegneria del Software/0722_23/correct.txt new file mode 100644 index 0000000..2fd674f --- /dev/null +++ b/Ingegneria del Software/0722_23/correct.txt @@ -0,0 +1 @@ +60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_23/quest.txt b/Ingegneria del Software/0722_23/quest.txt new file mode 100644 index 0000000..2e81fc7 --- /dev/null +++ b/Ingegneria del Software/0722_23/quest.txt @@ -0,0 +1,15 @@ +Il partition coverage di un insieme di test cases è la percentuale di elementi della partition inclusi nei test cases. La partition è una partizione finita dell'insieme di input della funzione che si sta testando. + +Si consideri la seguente funzione C: + +int f1(int x) { return (2*x); } + +Si vuole testare la funzione f1(). A tal fine l'insieme degli interi viene partizionato come segue: + +{(-inf, -11], [-10, -1], {0}, [1, 50], [51, +inf)} + +Si consideri il seguente insieme di test cases: + +{x=-100, x= 40, x=100} + +Quale delle seguenti è la partition coverage conseguita? \ No newline at end of file diff --git a/Ingegneria del Software/0722_23/wrong 1.txt b/Ingegneria del Software/0722_23/wrong 1.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_23/wrong 1.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_23/wrong 2.txt b/Ingegneria del Software/0722_23/wrong 2.txt new file mode 100644 index 0000000..a2507e5 --- /dev/null +++ b/Ingegneria del Software/0722_23/wrong 2.txt @@ -0,0 +1 @@ +80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_24/correct.txt b/Ingegneria del Software/0722_24/correct.txt new file mode 100644 index 0000000..a40ea7d --- /dev/null +++ b/Ingegneria del Software/0722_24/correct.txt @@ -0,0 +1 @@ +(a=200, b = 0, c = 1), (a=50, b = 5, c = 0), (a=50, b = 3, c = 0). \ No newline at end of file diff --git a/Ingegneria del Software/0722_24/quest.txt b/Ingegneria del Software/0722_24/quest.txt new file mode 100644 index 0000000..5b1bcf2 --- /dev/null +++ b/Ingegneria del Software/0722_24/quest.txt @@ -0,0 +1,22 @@ +Una Condition è una proposizione booleana, cioè una espressione con valore booleano che non può essere decomposta +in espressioni boolean più semplici. Ad esempio, (x + y <= 3) è una condition. + +Una Decision è una espressione booleana composta da conditions e zero o più operatori booleani. Ad esempio, sono decisions: +(x + y <= 3) +((x + y <= 3) || (x - y > 7)) +Un insieme di test cases T soddisfa il criterio di Condition/Decision coverage se tutte le seguenti condizioni sono soddisfatte: + +1) Ciascun punto di entrata ed uscita nel programma è eseguito in almeno un test; +2) Per ogni decision d nel programma, per ogni condition c in d, esiste un test in T in cui c è true ed un test in T in cui c è false. +3) Per ogni decision d nel programma, esiste un test in T in cui d è true ed un test in T in cui d è false. + +Si consideri la seguente funzione: +int f(int a, int b, int c) +{ if ( (a >= 100) && (b - c <= 1) ) + return (1); // punto di uscita 1 + else if ((b - c <= 1) || (b + c >= 5) +) + then return (2); // punto di uscita 2 + else return (3); // punto di uscita 3 +} + Quale dei seguenti test set soddisfa il criterio della Condition/Decision coverage ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_24/wrong 1.txt b/Ingegneria del Software/0722_24/wrong 1.txt new file mode 100644 index 0000000..5b77112 --- /dev/null +++ b/Ingegneria del Software/0722_24/wrong 1.txt @@ -0,0 +1 @@ +(a=200, b = 0, c = 1), (a=50, b = 5, c = 0), (a=50, b = 0, c = 5). \ No newline at end of file diff --git a/Ingegneria del Software/0722_24/wrong 2.txt b/Ingegneria del Software/0722_24/wrong 2.txt new file mode 100644 index 0000000..abe0eaa --- /dev/null +++ b/Ingegneria del Software/0722_24/wrong 2.txt @@ -0,0 +1 @@ +(a=200, b = 0, c = 1), (a=50, b = 4, c = 0), (a=200, b = 4, c = 0) \ No newline at end of file diff --git a/Ingegneria del Software/0722_25/correct.txt b/Ingegneria del Software/0722_25/correct.txt new file mode 100644 index 0000000..39d8c13 --- /dev/null +++ b/Ingegneria del Software/0722_25/correct.txt @@ -0,0 +1,9 @@ +int f(in x, int y) + +{ + +assert( (x >= 0) && (y >= 0) && ((x > 0) || (y > 0)) ); + +..... + +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_25/quest.txt b/Ingegneria del Software/0722_25/quest.txt new file mode 100644 index 0000000..23565d6 --- /dev/null +++ b/Ingegneria del Software/0722_25/quest.txt @@ -0,0 +1,7 @@ +Pre-condizioni, invarianti e post-condizioni di un programma possono essere definiti usando la macro del C assert() (in ). In particolare, assert(expre) non fa nulla se l'espressione expre vale TRUE (cioè non è 0), stampa un messaggio di errore su stderr e abortisce l'esecuzione del programma altrimenti. + +Si consideri la funzione C + +int f(in x, int y) { ..... } + +Quale delle seguenti assert esprime la pre-condizione che entrambi gli argomenti di f sono non-negativi ed almeno uno di loro è positivo ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_25/wrong 1.txt b/Ingegneria del Software/0722_25/wrong 1.txt new file mode 100644 index 0000000..c5c0179 --- /dev/null +++ b/Ingegneria del Software/0722_25/wrong 1.txt @@ -0,0 +1,9 @@ +int f(in x, int y) + +{ + +assert( (x > 0) && (y > 0) && ((x > 1) || (y > 1)) ); + +..... + +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_25/wrong 2.txt b/Ingegneria del Software/0722_25/wrong 2.txt new file mode 100644 index 0000000..e4e10cc --- /dev/null +++ b/Ingegneria del Software/0722_25/wrong 2.txt @@ -0,0 +1,9 @@ +int f(in x, int y) + +{ + +assert( (x >= 0) && (y >= 0) && ((x > 1) || (y > 1)) ); + +..... + +} \ No newline at end of file diff --git a/Ingegneria del Software/0722_26/correct.txt b/Ingegneria del Software/0722_26/correct.txt new file mode 100644 index 0000000..7311d41 --- /dev/null +++ b/Ingegneria del Software/0722_26/correct.txt @@ -0,0 +1 @@ +Test set: {x=1, y=1}, {x=0, y=0}, {x=2, y=1}, {x=2, y=0}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_26/quest.txt b/Ingegneria del Software/0722_26/quest.txt new file mode 100644 index 0000000..78ad81f --- /dev/null +++ b/Ingegneria del Software/0722_26/quest.txt @@ -0,0 +1,15 @@ +Il branch coverage di un insieme di test cases è la percentuale di branch del programma che sono attraversati da almeno un test case. + +Si consideri la seguente funzione C: + +----------- + +int f(int x, int y) { + + if (x - y <= 0) { if (x + y >= 1) return (1); else return (2); } + + else {if (2*x + y >= 5) return (3); else return (4); } + + } /* f() */ + +Quale dei seguenti test sets consegue una branch coverage del 100% ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_26/wrong 1.txt b/Ingegneria del Software/0722_26/wrong 1.txt new file mode 100644 index 0000000..7e48e4f --- /dev/null +++ b/Ingegneria del Software/0722_26/wrong 1.txt @@ -0,0 +1 @@ +Test set: {x=1, y=1}, {x=0, y=0}, {x=2, y=1}, {x=2, y=3}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_26/wrong 2.txt b/Ingegneria del Software/0722_26/wrong 2.txt new file mode 100644 index 0000000..3e327ab --- /dev/null +++ b/Ingegneria del Software/0722_26/wrong 2.txt @@ -0,0 +1 @@ +Test set: {x=1, y=1}, {x=2, y=2}, {x=2, y=1}, {x=2, y=0}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_3/correct.txt b/Ingegneria del Software/0722_3/correct.txt new file mode 100644 index 0000000..a2507e5 --- /dev/null +++ b/Ingegneria del Software/0722_3/correct.txt @@ -0,0 +1 @@ +80% \ No newline at end of file diff --git a/Ingegneria del Software/0722_3/quest.txt b/Ingegneria del Software/0722_3/quest.txt new file mode 100644 index 0000000..ac6007d --- /dev/null +++ b/Ingegneria del Software/0722_3/quest.txt @@ -0,0 +1,15 @@ +img=https://i.imgur.com/K7pm0xk.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + +ed il seguente insieme di test cases: + +Test case 1: act0 act2 act1 act2 act2 act2 act0 act1 act2 act2 act2 + +Test case 2: act0 act1 act2 act2 act1 act2 act0 act2 act2 act2 act0 + +Test case 3: act2 act2 act0 act2 act1 act0 act2 act0 + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_3/wrong 1.txt b/Ingegneria del Software/0722_3/wrong 1.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_3/wrong 1.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_3/wrong 2.txt b/Ingegneria del Software/0722_3/wrong 2.txt new file mode 100644 index 0000000..2fd674f --- /dev/null +++ b/Ingegneria del Software/0722_3/wrong 2.txt @@ -0,0 +1 @@ +60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_4/correct.txt b/Ingegneria del Software/0722_4/correct.txt new file mode 100644 index 0000000..1e091a3 --- /dev/null +++ b/Ingegneria del Software/0722_4/correct.txt @@ -0,0 +1 @@ +90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_4/quest.txt b/Ingegneria del Software/0722_4/quest.txt new file mode 100644 index 0000000..681243a --- /dev/null +++ b/Ingegneria del Software/0722_4/quest.txt @@ -0,0 +1,15 @@ +img=https://i.imgur.com/IAPlGNV.png +La state coverage di un insieme di test cases (cioè sequeze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + + +Si consideri il seguente insieme di test cases: + +Test case 1: act1 act1 act0 act1 act1 act2 act0 + +Test case 2: act2 act0 act0 + +Test case 3: act1 act1 act2 act0 act0 + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_4/wrong 1.txt b/Ingegneria del Software/0722_4/wrong 1.txt new file mode 100644 index 0000000..52f25fe --- /dev/null +++ b/Ingegneria del Software/0722_4/wrong 1.txt @@ -0,0 +1 @@ +70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_4/wrong 2.txt b/Ingegneria del Software/0722_4/wrong 2.txt new file mode 100644 index 0000000..95bc750 --- /dev/null +++ b/Ingegneria del Software/0722_4/wrong 2.txt @@ -0,0 +1 @@ +100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_5/correct.txt b/Ingegneria del Software/0722_5/correct.txt new file mode 100644 index 0000000..cf27703 --- /dev/null +++ b/Ingegneria del Software/0722_5/correct.txt @@ -0,0 +1 @@ +Transition coverage: 70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_5/quest.txt b/Ingegneria del Software/0722_5/quest.txt new file mode 100644 index 0000000..5201b57 --- /dev/null +++ b/Ingegneria del Software/0722_5/quest.txt @@ -0,0 +1,17 @@ +img=https://i.imgur.com/4nez8mZ.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + +ed il seguente insieme di test cases: + +Test case 1: act2 act0 act2 act2 act2 + +Test case 2: act0 act2 act2 act1 act2 act1 act1 act1 act2 act2 act2 act2 act2 + +Test case 3: act2 act2 act2 act0 act1 act0 + + + +Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra? \ No newline at end of file diff --git a/Ingegneria del Software/0722_5/wrong 1.txt b/Ingegneria del Software/0722_5/wrong 1.txt new file mode 100644 index 0000000..2d5aeb0 --- /dev/null +++ b/Ingegneria del Software/0722_5/wrong 1.txt @@ -0,0 +1 @@ +Transition coverage: 60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_5/wrong 2.txt b/Ingegneria del Software/0722_5/wrong 2.txt new file mode 100644 index 0000000..eb5e1cd --- /dev/null +++ b/Ingegneria del Software/0722_5/wrong 2.txt @@ -0,0 +1 @@ +Transition coverage: 100% \ No newline at end of file diff --git a/Ingegneria del Software/0722_6/correct.txt b/Ingegneria del Software/0722_6/correct.txt new file mode 100644 index 0000000..8d957c2 --- /dev/null +++ b/Ingegneria del Software/0722_6/correct.txt @@ -0,0 +1 @@ +45% \ No newline at end of file diff --git a/Ingegneria del Software/0722_6/quest.txt b/Ingegneria del Software/0722_6/quest.txt new file mode 100644 index 0000000..4609be1 --- /dev/null +++ b/Ingegneria del Software/0722_6/quest.txt @@ -0,0 +1,13 @@ +img=https://i.imgur.com/gNFBVuc.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + + +ed il seguente insieme di test cases: + +Test case 1: act0 act1 act0 act2 act2 act1 act2 act2 act2 act2 act2 act0 act0 + +Test case 2: act2 + +Test case 3: act2 \ No newline at end of file diff --git a/Ingegneria del Software/0722_6/wrong 1.txt b/Ingegneria del Software/0722_6/wrong 1.txt new file mode 100644 index 0000000..2fd674f --- /dev/null +++ b/Ingegneria del Software/0722_6/wrong 1.txt @@ -0,0 +1 @@ +60% \ No newline at end of file diff --git a/Ingegneria del Software/0722_6/wrong 2.txt b/Ingegneria del Software/0722_6/wrong 2.txt new file mode 100644 index 0000000..1e091a3 --- /dev/null +++ b/Ingegneria del Software/0722_6/wrong 2.txt @@ -0,0 +1 @@ +90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_7/correct.txt b/Ingegneria del Software/0722_7/correct.txt new file mode 100644 index 0000000..711ba55 --- /dev/null +++ b/Ingegneria del Software/0722_7/correct.txt @@ -0,0 +1 @@ +40% \ No newline at end of file diff --git a/Ingegneria del Software/0722_7/quest.txt b/Ingegneria del Software/0722_7/quest.txt new file mode 100644 index 0000000..037e019 --- /dev/null +++ b/Ingegneria del Software/0722_7/quest.txt @@ -0,0 +1,12 @@ +img=https://i.imgur.com/uEiyXTN.png +La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta. + +Si consideri lo state diagram in figura + +ed il seguente insieme di test cases: + +Test case 1: act2 act2 act2 act2 act0 act1 act2 act0 + +Test case 2: act1 act2 + +Test case 3: act2 act0 \ No newline at end of file diff --git a/Ingegneria del Software/0722_7/wrong 1.txt b/Ingegneria del Software/0722_7/wrong 1.txt new file mode 100644 index 0000000..1e091a3 --- /dev/null +++ b/Ingegneria del Software/0722_7/wrong 1.txt @@ -0,0 +1 @@ +90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_7/wrong 2.txt b/Ingegneria del Software/0722_7/wrong 2.txt new file mode 100644 index 0000000..52f25fe --- /dev/null +++ b/Ingegneria del Software/0722_7/wrong 2.txt @@ -0,0 +1 @@ +70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_8/correct.txt b/Ingegneria del Software/0722_8/correct.txt new file mode 100644 index 0000000..31a01d5 --- /dev/null +++ b/Ingegneria del Software/0722_8/correct.txt @@ -0,0 +1 @@ +Test set: {x=3, y=6}, {x=0, y=0}, {x=15, y=0}, {x=9, y=0}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_8/quest.txt b/Ingegneria del Software/0722_8/quest.txt new file mode 100644 index 0000000..462c3bb --- /dev/null +++ b/Ingegneria del Software/0722_8/quest.txt @@ -0,0 +1,15 @@ +Il branch coverage di un insieme di test cases è la percentuale di branch del programma che sono attraversati da almeno un test case. + +Si consideri la seguente funzione C: + +----------- + +int f(int x, int y) { + + if (x - y <= 6) { if (x + y >= 3) return (1); else return (2); } + + else {if (x + 2*y >= 15) return (3); else return (4); } + + } /* f() */ + +Quale dei seguenti test sets consegue una branch coverage del 100% ? \ No newline at end of file diff --git a/Ingegneria del Software/0722_8/wrong 1.txt b/Ingegneria del Software/0722_8/wrong 1.txt new file mode 100644 index 0000000..549dba8 --- /dev/null +++ b/Ingegneria del Software/0722_8/wrong 1.txt @@ -0,0 +1 @@ +Test set: {x=3, y=6}, {x=0, y=0}, {x=15, y=0}, {x=10, y=3}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_8/wrong 2.txt b/Ingegneria del Software/0722_8/wrong 2.txt new file mode 100644 index 0000000..0c564f7 --- /dev/null +++ b/Ingegneria del Software/0722_8/wrong 2.txt @@ -0,0 +1 @@ +Test set: {x=3, y=6}, {x=2, y=1}, {x=15, y=0}, {x=9, y=0}. \ No newline at end of file diff --git a/Ingegneria del Software/0722_9/correct.txt b/Ingegneria del Software/0722_9/correct.txt new file mode 100644 index 0000000..f6a4b07 --- /dev/null +++ b/Ingegneria del Software/0722_9/correct.txt @@ -0,0 +1 @@ +State coverage: 90% \ No newline at end of file diff --git a/Ingegneria del Software/0722_9/quest.txt b/Ingegneria del Software/0722_9/quest.txt new file mode 100644 index 0000000..2b0b595 --- /dev/null +++ b/Ingegneria del Software/0722_9/quest.txt @@ -0,0 +1,16 @@ +img=https://i.imgur.com/l0OUTrQ.png +La state coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di stati (inclusi START ed END) raggiunti almeno una volta. + +Si consideri lo state diagram in figura + +Si consideri il seguente insieme di test cases: + + +Test case 1: act2 act2 act2 act1 act2 act1 act2 act2 act1 + +Test case 2: act2 act2 act0 act1 act1 act2 act0 act0 act2 act0 act2 act2 act2 act0 act0 act0 act2 act2 act0 act2 act2 act2 act1 act2 act2 act1 + +Test case 3: act2 act0 act2 act1 act2 act1 act0 act2 act2 act0 act0 act2 act1 + + +Quale delle seguenti è la migliore stima della state coverage per i test cases di cui sopra \ No newline at end of file diff --git a/Ingegneria del Software/0722_9/wrong 1.txt b/Ingegneria del Software/0722_9/wrong 1.txt new file mode 100644 index 0000000..1c07658 --- /dev/null +++ b/Ingegneria del Software/0722_9/wrong 1.txt @@ -0,0 +1 @@ +State coverage: 70% \ No newline at end of file diff --git a/Ingegneria del Software/0722_9/wrong 2.txt b/Ingegneria del Software/0722_9/wrong 2.txt new file mode 100644 index 0000000..4e45af2 --- /dev/null +++ b/Ingegneria del Software/0722_9/wrong 2.txt @@ -0,0 +1 @@ +State coverage: 60% \ No newline at end of file