Thursday 22 March 2018

Full stack integration testing with node?

Firstly, a couple of things to preface this with. I have asked this before, though not too recently. And I am a Java developer who's a big automated testing fan.I'm trying to work out the best ways, if possible, to perform integration testing of the full system. The goal here is 100% confidence at the end of yarn test the everything works. By "everything" I mean:All unit testsDatabase migrationsDAOs, against a real databaseREST APIs, all the way to the database and backEtcI also want to do all of this with the minimal amount of setup. I'd like it to be yarn install && yarn test, and that does everything necessary. No needing to install databases locally, and configure the build to point to them, and so on. That's not reproducible, and is a huge way to introduce errors.In the Java world, I achieve this using things like http://ift.tt/2aztOAh to run s database server up in-process and test against that. And it works great.My assumption is that the best way to achieve this would be docker. In particular, I've found the dockerode module that I think will let me start and stop containers.Is this the best way to tackle this? Or are there other, easier ways that people use?

Submitted March 22, 2018 at 09:43PM by sazzer

No comments:

Post a Comment