I need an advice again. We have now moved our comp...
# general
s
I need an advice again. We have now moved our complete backend to seed in a monorepo and broken it down to multiple serverless services inside. Now we want to plan some e2e testing. I saw there is a post deploy phase, where I can trigger e2e tests. Now our frontend site is in vercel and we have a similar PR wise deployment there. So was seeing how do we have a proper e2e testing scheme ? say for a given PR in backend and given PR in frontend (separate repo), i want to test the overall functionality of our application. What do you guys use and fits best with serverless systems ? also its not pure UI testing, as many times the UI will do something and then there will be async tasks in backend, so i need to check if proper db updates are made and also proper cloudwatch logs show up or not ? These might be a trivial scenario for many, but please give advice to help me out.
s
You could try just with cypress, and a few API calls that confirm the database changes. Avoid connecting directly to the dB in case of schema changes. If you need to scrape logs for application health, perhaps consider adding metrics e.g. cloudwatch.putMetric, your logs will probably change in weird and wonderful ways, making these tests fail frequently
f
Agreed with Simon. If you need to reference backend resources (ie. table names, API endpoints), you can add them as stack outputs. And in your e2e test, you can use AWS CLI or SDK to fetch their value.