Posts

Showing posts from October, 2018

Setting up docker with Hyper-V

Image
Docker is just amazing with flexibility we get to not worry about setting up the environments for our application. --Photo by  Ilse Orsel  on  Unsplash Download docker for windows . So with Windows we can use hyper-V and get containers spawned in minutes. Here is how we do it. Make sure you have Hyper-V enabled on windows if not go to turn on windows feature and turn this feature On. Once this is done with restart. Use Hyper-V Manager for Windows to create a Virtual Switch Now use the following commands to create the docker containers docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default this will create a VM, you can see this with Hyper-V manager or docker-machine ls once the machine is created you need to set some of the machine details in Environments Variables to list the variables use docker-machine env default Now set the env vairables as below using bash eval $("C:\Users\arjun_shetty\bin\...

Load Testing an nodejs API

Image
Load Testing is quite a stream of its own all I did was smoothly sailed on top of it. With not much time in hand, the only weapon of choice was Jmeter, Well quite brilliant a tool!! We had to test a facebook chat-bot built with nodejs. This app is a webhook for FB to push the chat messages down to our app. This is how we achieved it On Windows: Download JMeter from  here . Now run the jmeter.bat, this will open up a java GUI where you can easily configure the endpoints you want to test. Add a thread group and set the number of users/thread you want to spawn to test your API Add an Http request sampler  Fill in the intuitive fields like URL, request body, Method, etc., For setting up HTTP headers like content-type or authorization fields right click on HTTP request and add config element HTTP header manager, then the key values as you may To see the results on all the requests that will spawn create add listener View results tree.  You are ready ...