The share of software in industrial automation systems is steadily increasing. Thus, software quality issues become a critical concern for many automation projects, which require effective software quality assurance measures. In this paper we describe an architecture for automated testing of software applications part of industrial automation systems. We focus on testing programmable logic controller (PLC) software for machineries, which can be achieved by using test automation frameworks derived from software development. The paper provides a collection of practical receipts describing how different approaches from software engineering best-practices can be applied in the context of industrial automation systems. A combination of these receipts has been used for automating software tests in an industrial automation project. In this project, more than 200 tests have been developed to assure the quality of critical PLC components. The tests are an integral part of the project's automated build and continuous integration system. Every software change triggers an automated build and test process to ensure that no defects or unintended side effects have been introduced. The feedback from the project confirmed the applicability and usefulness of the outlined testing approach in context of industry automation. The paper concludes with providing recommendations and sharing additional lessons we have learned from automated testing of PLC software.