Let's discuss legacy applications. Everyone hates legacy apps but they make money for our customers, so we have to live with it. But they should be tested as well. Especially If you hope to get them refactored one day

So, how was it, covering lefacy apps with test? What tools did you use?

We used Codeception to test app that we have been developing for a year or so. We started to write tests from acceptance tests and cover the most important scenarios first. Then after we covered most critical parts with acceptance tests, we started to write unit tests and refactor where it was necessary. Codeception really helped not to broke old features while refactoring and adding new ones.

By the way, there is Asis project for testing legacy application. The idea behind it is a bit tricky:

The main idea is the following: while user or tester is using your product (for example, Web site) the Asis tool records the function calls which are performed, the sets of arguments which are passed to the function and the received output. Output can be any, starting from strings, integers, HTML, JSON and finishing with serialized objects with complex internal structure. We don't care what we receive - we just record it and approve as correct result, because we know that we are working with the stable release version.