Hey everyone! I'm trying to figure out how to set up end-to-end testing for my Node.js API server and Angular frontend using Azure Pipelines. My goal is to have everything (the API, frontend, and PostgreSQL database) running on the agent for testing. I've heard that using Docker and Docker Compose might be the approach I need to take for this. Does anyone have any resources or guides that go over this specific scenario, aside from the official docs? Any help would be appreciated!
3 Answers
You could start looking into various web development subreddits for discussions. Just a heads-up, using Docker/Compose might not directly solve your problem, but it's definitely a strong option for managing services in your testing setup.
To get started, how do you usually run your application? You can run the Node.js API with a basic command like `node --exp.strip.typ server.ts`, and for your Angular app, use `ng build && node serve:ssr`. Just so you know, when I'm in production mode, I build Docker images for everything. In dev, I typically just use npm scripts. I mentioned Docker because I need to run a PostgreSQL database alongside the apps in my CI/CD setup. It’s definitely feasible with Docker Compose!
You might have a tough time finding specific resources for exactly your needs, especially regarding e2e testing. I suggest diving into the documentation to really get a grasp of how everything works. If you're willing to put in the effort, trying out AI tools to see what they suggest based on your situation could also be helpful. Good luck!
Thanks for the tip! I'm definitely up for reading more documentation and exploring AI suggestions to uncover more info.
Oh, that makes sense! So you're using Docker for production and normal scripts while developing. Good to know Docker Compose is viable for your setup!