Monday, December 11, 2023

Mountebank testing


 

I recently switched to do some testing from Wiremock to Mountebank. I found that Mountebank had far more flexibility and simplicity when doing complex data setups to support your test cases. I ran both on the docker and kubernetes and they work perfectly fine in both engines.

Sample docker  mountebank run:

docker run --name mountebank -p 2525:2525 -p 11000-11010:11000-11010 \\
 -v /home/user/mountebank-data/:/mb bbyars/mountebank --configfile /mb/templates/imposters.ejs \\
 --allowInjection --ipWhitelist "::ffff:172.17.0.1|172.17.0.1"

Sample wiremock run:

docker run --name wiremock \\
  -p 9999:8080 \\
  -v /home/bcavlin/IdeaProjects/moleculer/mock:/home/wiremock \\
  wiremock/wiremock --verbose --global-response-templating --max-template-cache-entries 0
 

Starting MEGA instances


 

MEGA is proving to be a solid provider for the data storage with encryption enabled. In case you wanted to start multiple instances in Linux (e.g. work and personal), here is the script I picked up and modified a bit from the web:

Sample: