It's been a while, since I wrote about Camouflage. There have been some exciting developments in past few months and I would like to present the new features Camouflage has to offer to support your prototyping/testing needs.
What is Camouflage?
For the uninitiated, Camouflage is a mocking tool, used to stub the backends based on various protocols, such as http, https, http2, grpc and websockets.
Camouflage helps you carry out your front end prototyping, unit testing, functional/performance testing in silos, in absence of one or more Microservices/APIs. If you'd like to read more, visit my previous post
What's new in Camouflage?
Some of the things I have been working on for past few months are:
- A fully customizable caching mechanism. Compared to earlier versions where cache was stored only in memory, you can now use redis for caching.
- Connection to external data sources. Most mocking tools rely on random data such as names, uuids, random numbers etc to make your response dynamic. But sometimes, that's not enough. Even though you are just building a mock, you might at times, need to connect to a real data source instead of just random data. Camouflage supported CSV files as data source in previous versions, but now you can also use postgres as your data source. (MySQL/Mongo to be supported soon)
-
Containerization. Camouflage can now be deployed on docker environments, and kubernetes. Simply use the enclosed
docker-compose.yml
andkubernetes/*.yaml
to quickly spin up a Camouflage environment
Full list of features
๐ฅ File based mocking support for HTTP, HTTPS, HTTP2, gRPC and websockets. ๐ฅ
โก Dynamic/realistic responses without having to write any code. โก
๐งฉ Flexibility to partially or fully code your responses. ๐งฉ
๐ฏ Conditional responses based on request parameters. ๐ฏ
๐ Inbuilt Caching - In memory and redis. ๐
๐งฎ Ability to fetch and condition the response using external data. Currently supported data sources are CSV and postgres. ๐งฎ
โณ Delay Simulation. โณ
๐ Inbuilt monitoring. ๐
๐ฆบ Inbuilt backup and restore mechanism. ๐ฆบ
โฉ Quick start with camouflage init and camouflage restore modules. โฉ
๐ Deployable on standalone VMs, Dockers and Kubernetes. ๐
๐ Comes with a file explorer UI that allows modification of mock files hosted remotely. ๐
What is in works?
Camouflage is now reaching a stable state, which means a large part of effort would be focused on maintenance, resolving dependency vulnerability, cleaning up and commenting code, building an up-to-date JSDocs, supporting newer releases of Node (Camouflage can be run on systems with Node <v15).
New functionalities on the road map are introducing few more data source compatibility, breaking down Camouflage from one large package to smaller modules that can be used as plugins, and eventually migrating from express to fastify.
Check out the project @ Github. Leave a ๐ if you'd like what you see, drop suggestions or ask questions, we'd love every bit of support we can get. To know all the details about Camouflage, refer to documentation
Top comments (0)