Skip to main content
4 events
when toggle format what by license comment
Mar 7, 2022 at 16:34 comment added Christos Dimitroulas @alpha_989 yes, that is an approach I have used several times on apps which were lacking test coverage. First I created integration tests which prevented regressions in the important functionalities of the app. Then it was possible to safely refactor the code to be more modular and unit testable without fear of breaking the app.
Mar 29, 2018 at 19:33 comment added Britt Wescott @alpha_989, this is very much IMHO and I'm open to hearing other ideas, but I would prefer Integration Tests over Unit Tests for Legacy Code. In both cases, you would have to be certain that the methods are working correctly before adding any kind of testing, but Integration Testing ensures that the overall expectations of the methods are working as opposed to individual code elements.
Feb 24, 2018 at 23:57 comment added alpha_989 If I have a legacy application with no unit-tests, and I want to include unit-tests for certain parts, do you think its better to first write out the integration tests for the legacy code. Once that is written, then you can uncouple the tight coupling, and create functions with interfaces that can be tested? Since you have the integration-test already written, you can then verify at each step of refactoring, that the new version of the code still works as desired?
Jul 14, 2013 at 14:38 history answered k3b CC BY-SA 3.0