-
Notifications
You must be signed in to change notification settings - Fork 1
Deliverable 5
Deliverable 5
For deliverable 5, team IsntThisFun designed and injected five faults into Beets’ source code, which we planned to cause at least five tests to fail, but not all, following the deliverable specifications. We decided to inject one fault into each of our five methods.
The first function Team IsntThisFun added faults to was human_bytes. Within this function, we changed the string which indicates the memory size unit from 'iB' to 'iBytes'.
This change affects all tests cases with a memory unit value above 1023. Therefore test case 1d fails, as shown below, because the expected value '1.9 GiB' is not equal to the new value of '1.9 GiBytes'.
Original Result
Result After Fault
The second function Team IsntThisFun added faults to was human_bytes. Within this function, we changed the string which indicates the memory size unit from 'iB' to 'iBytes'.
This change affects all tests cases with a memory unit value above 1023. Therefore test case 1d fails because the expected value '1.9 GiB' is not equal to the new value of '1.9 GiBytes'.
Original Result
Result After Fault
The third function Team IsntThisFun added faults to was human_seconds_short. Within this function, we add a line which truncates the interval to create an hour field. We then added the hour field to the return value by adding it the the string formatting.
This change affects all tests cases which output a value in the M:SS format specified. Therefore test cases 3a, 3b, and 3e fail because the expected values in M:SS format are not equal to the new format of H:MM.SS.
Original Result
Result After Fault
The fourth function Team IsntThisFun added faults to was _bool_fallback. Within this function, we swapped the return values within the if and else test.
This change affects all tests cases which return a value instead of an error. Therefore test case 1d fails because the expected value '1.9 GiB' is not equal to the new value of '1.9 GiBytes'.
Original Result
Result After Fault
The fifth function Team IsntThisFun added faults to was human_bytes. Within this function, we changed the string which indicates the memory size unit from 'iB' to 'iBytes'.
This change affects all tests cases with a memory unit value above 1023. Therefore test case 1d fails because the expected value '1.9 GiB' is not equal to the new value of '1.9 GiBytes'.
Original Result
Result After Fault