Agreed, whether you rewrite or change in-place you're not going to be confident in the outcome unless you have tons of end to end tests first.
Then you need to find and skip/ignore the tests that don't actually test end-to-end behavior or business logic, just some implementation detail along the way.
Only then will you be free to do what is probably the first step if you have a crappy codebase: start establishing domain boundaries and interfaces and splitting things across those lines.
Then you need to find and skip/ignore the tests that don't actually test end-to-end behavior or business logic, just some implementation detail along the way.
Only then will you be free to do what is probably the first step if you have a crappy codebase: start establishing domain boundaries and interfaces and splitting things across those lines.