Leveraging Neocortix’s Cloud to Load Test
Neocortix Cloud Services.
A flagship Scalable Compute service, which runs full Debian Linux in a secure container on Android phones, accessible via a standard SSH interface.
The NCS infrastructure comes knit with Distributed Load testing abilities scaling the user load from devices across the demographic locations, and with its tool-agnostic approach, one can leverage its capabilities without any additional learning curve.
I gathered that a certification program was being offered, which frankly is an open invitation to try out the NCS infrastructure and, in return, receive accreditation for having maneuvered the given technical asks.
I was intrigued, coupled with the fact that the challenge to embark came free of cost, I scooted to register at https://cloud.neocortix.com, and was ready to face the test requirements square and fair.
The free account entails 100 free hours to play around with the interface. I was initially under the impression that the hours meant using the entire system for the 100 hours, but it comes with an expected slight curve — which is the number of instances/devices multiplied with the time utilized. If you are using ten instances/devices and running a test for 1 hour, you will exhaust your free hours sooner than you anticipate.
After registration on the NCS website, you should download the certification-related word document that details the required Steps to graduate from the program and help traverse the labyrinth of tasks. It also comes equipped with a tutorial page(https://neocortix.com/tutorials) for participants to control and cross the checklist items.
Irrespective of the tool you would like to work with, the first and foremost task is to set up the batch jobs, using a Linux powered shell utility. This setup installs the example-python-programs (/ncsexamples) to load test the application-under-test and inject worker threads from multiple configurable instances. There are many testing tools to pick from the available arsenal like JMeter, Gatling, and Neoload.
What fascinated me about the entire process was its final step — A creative charge to enhance the testing experience by developing a custom code to plot a meaningful graph or edit the test parameters for spinning another round of test-run.
I picked the HTTP response code graph plotted against the time series from the client-side metric maps. This graph is a reasonably intuitive one, but my challenge was not working with python before. I tasked myself to get this done to feel more accomplished and prove myself as a worthy participant.
I took help of the git repo of Harinder Seera, who created this beautiful plot showing the composite Response Time Distribution from a Global Last-Mile Load Test.
The code repository in case you want to have a look : https://github.com/hseera/neocortix-jmeter-histogram
Spending some time understanding the Python programming nuances, i.e., from printing the statutory ‘hello world’ in the CLI, I decided to collide head-on by plotting the HTTP response code graph.
For this, I needed two things.
* To read the CSV result files generated during the load test
* To retrieve the various Response Code values from the column — responseCode
* To write them into a new file under a single column for ease of access
* To identify the unique HTTP response codes such as 200, 404, 500, 502, etc
* To get a count of these individual status codes
- And of course, to plot them against the time series, i.e., duration of the test
The above completed the test requirements, and I retired for the night after publishing the results to the certifications team. With Morning came a pleasant email from Lloyd Watts, the Founder, and CEO of Neocortix, notifying me that I graduated from the program successfully and awarded a Completion certificate
A weekend scaling the python turned out to be quite fun. In case you want to take this for a spin — https://neocortix.com/certifications