QA Automation of a legacy system may also sometimes be very painful. Most of the systems have code that is either outdated or poorly documented, hence difficult to work with recent automation tools. Sometimes the code is not modular; this makes the job even more complex because such code might require significant refactoring for making automation effective. Other potential problems to cause delays in automation can be limitations concerning testability and issues regarding integrations. It is possible, however, to manage such challenges through careful planning, picking the right tools, and automating mostly the critical parts of the system.