Posts

Showing posts with the label testing

Load Testing using Apache Bench - Post JSON API

Load test using Apache Bench We have been using Apache Bench to load test our rest microservices. One of the most useful situaiton while performing a load testing, is to change the number of concurrent requests parameter. Apache Bench is a simple tool which has helped us to do this quick testing to see whether our services break on huge load. How to Install Apache Bench on Ubuntu - 18.04 LTS In order to install Apache Bench all you have to do is: $ sudo apt install apache2-utils How to execute "ab" for POST API First create the JSON body to be posted, add that json data to a file with follwoing syntax: $ cat my_data.json json='{"queryType" : "groupBy","dataSource" : "pixel-feed","dimensions" : [], "granularity" : "all","filter" : {"type" : "selector","dimension" : "pixel_id","value" : "122112"},...

React - Component testing + End-to-End testing

Image
Introduction There are many test frameworks for testing React app.  Facebook introduced their own Jest framework which helps you run test cases against the React components and also mock some of the flow.  With lot of JavaScript developers in the community also having their due soft corner towards Mocha as their test runner. Lets see the things that are good and can be the right tool for the environment.  This post is basically trying to give more overview about how we can test a react app and ensure to automate the same. Tools for testing components The most favored tools include the Jest and Mocha. There are also plenty of other tools like Jasmine. Now these are all your test runner frameworks which use plenty of other libraries to get their work done, like Chai, Karma, PhantomJS or JSDom. Checking this webpage tells more about the community ​ usage : Talking briefly about Jest and Mocha (which requires other library support to run t...