I have a Single-Page Application written in ReactJS which backend is built in Django Rest Framework. I want to integrate end-to-end testing to the application.
I have only two environments where the application is deployed. One is production and the other one development. I've decided on writing tests with Playwright, but I don't know what would be a good practice of automating those tests. Some questions that I came up with are:
- Should I test against the
devenvironment, or should I spin up new temporarly instance of Frontend and Backend dedicated to tests? - When should the tests be run? Should they be integrated within the pipeline of Frontend, backend or be configured to run periodically?
- Where should they be stored? I think it makes sense to store them on the Frontend repo, but depending on the answers for 1 and 2, storing them into a dedicated repo might also make sense.
Could you also suggest any article or blog post? I read some, but none explained it in a real world example.