Posts

Performance test with Gatling

Image
Introduction: Gatling is an open-source load testing tool written purely in Scala code. The straightforward and expressive DSL that Gatling offers makes it simple to write load testing scripts. It doesn’t contain a GUI (like say JMeter ), although it does ship with a GUI to assist with recording scripts. It can run a huge amount of traffic on a single computer, eliminating the need for complex distributed testing infrastructure. The Gatling code check can be checked into a version control system, and easily used with Continuous Integration tools to run load and performance tests as part of your CI build. Downloading: Download gatling from =   https://gatling.io/open-source/ Testing  Two types of testing: By using HAR file = which is handled by recorder.sh file By writing scripts =  which is handled by gatling.sh file      Location for recorder.sh = cd gatling**/bin/      Location for gatling.sh = cd gatling**/bin/ ...

Spring Boot Caching

Image
Spring Boot Caching Caching: The Spring Framework provides support for transparently adding caching to an application. At its core, the abstraction applies caching to methods, thus reducing the number of executions based on the information available in the cache. EhCache: EhCache is an open-source, Java-based cache used to boost performance. The current version of Ehcache is 3. It provides the implementation of the JSR-107 cache manager. We can use it directly. First, create a spring boot hello-world   gradle project using reference: https://beginnersword.blogspot.com/2020/07/getting-started-with-spring-boot.html Implementation: Add the below gradle dependencies in the build.gradle file. Let’s create a TestCacheController in the controller package and create an endpoint named it as /testCaching . Now create a model class Test and create a variable named username, message then generate getter and setter for them. Let’s now create a service class with the name TestCacheService a...