Timeline for Refactoring - is it appropriate to simply rewrite code, as long as all tests pass?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 30, 2018 at 10:10 | audit | First posts | |||
| Oct 30, 2018 at 10:10 | |||||
| Oct 28, 2018 at 8:24 | history | edited | Doc Brown | CC BY-SA 4.0 | added 525 characters in body |
| Oct 25, 2018 at 17:17 | history | edited | Doc Brown | CC BY-SA 4.0 | added 210 characters in body |
| Oct 24, 2018 at 14:44 | comment | added | cbojar | In this instance, the missed branches could have been caught with a code coverage tool while developing the tests. | |
| Oct 24, 2018 at 13:00 | history | edited | Robbie Dee | CC BY-SA 4.0 | deleted 6 characters in body |
| Oct 24, 2018 at 10:30 | comment | added | bdsl | You can never be absolutely certain that the tests cover all possible edge cases, since it isn't feasible to test with all possible inputs. But there are lots of ways to gain more confience in tests. You could look into mutation testing, which is a way to test the effectiveness of the tests. | |
| Oct 24, 2018 at 10:17 | history | edited | Robbie Dee | CC BY-SA 4.0 | added 51 characters in body |
| Oct 24, 2018 at 9:20 | comment | added | user200783 | Thanks, that makes sense. So, if the ultimate solution to undesirable changes in behaviour is to have comprehensive tests, is there any way to be confident that tests cover all possible edge cases? For example, it would be possible to have 100% coverage of brie_tick while still never testing the problematic @days_remaining == 1 case by, for example, testing with @days_remaining set to 10 and -10. | |
| Oct 24, 2018 at 5:56 | history | answered | Doc Brown | CC BY-SA 4.0 |