I’ve got a project where I’m not handing post-deployment testing with any real grace. It’s been on the list of things to resolve, and I’m happy with it for the moment because of the pre-release tests, manual release testing, and monitoring post-release, but it does need solving.
(This article was originally published on my dev.to page)
I stumbled upon the
newman cli tool from the good folks at getpostman.com. It's a CLI, open source tool that runs the tests you have saved in your Postman collections, and gives the typical error state output / console output you expect from any…
I recently wrote the article Handling API validation with OpenAPI (Swagger) documents in NodeJS, which went into how to pass on the work of input validation to the OpenAPI spec. This follows on, showing how to lighten the testing load and ensure your API is producing exactly the output you’ve painstakingly documented.
There is nothing, nothing, more predictable than API documentation being wrong.
It’s hard to keep that document up to date with all the other pressures of having to, you know, maintain the API. It’s simpler to push the fix or feature and then update the doc. Eventually.
I always found the hardest thing about API work was the documentation.
Sure, there are loads of nice tools out there to help you define it, provide nice front-ends and the like, but maintaining that isn’t anywhere nearly as fun as getting the actual work done. So soon enough, you’ve got stale documentation with little errors, and validation rules that don’t quite match up.
A recent NodeJS API project came my way which had out-of-date OpenAPI 3 documentation for the few endpoints it already had, but the understanding that we where going to start using it a lot more, so…
The old argument is that the content on the internet needs paying for. Long gone are the days where everything is created by enthusiasts and people messing around in their spare time. Today’s content and platforms are high-quality and expensive to produce, and at the moment we’ve really only got three models to pay for it:
Web Dev / DevOps with a habit of using Amazon Web Services for things. Dependences: Bacon, Coffee. Toothpaste in my eye 1 times this year.