Robotic Process Automation (RPA) has received increasingattention in recent years. It enables task automation by software componentswhich interact with user interfaces in a similar way to that ofhumans. An RPA project lifecycle is closely resembling a software projectone. However, in certain contexts (e.g., business process outsourcing), atesting environment is not always available. Thus, deploying the robotsin the production environment entails high risk. To mitigate it, an innovativeapproach to automatically generate a testing environment anda test suite for an RPA project is presented. The activities of the humanswhose processes are to be robotized are monitored and a UI logis confirmed. On one side, the test environment is generated as a fakeapplication, which mimics the real environment by leveraging the UI loginformation. The control flow of the application is governed by an invisiblecontrol layer which decides which image to show depending on theinterface actions that it receives. On the other side, the test case checkswhether the robot can reproduce the behaviour of the UI log. Promisingresults were obtained and a number of limitations were identified suchthat it may be applied in more realistic domains.