Skip to main content

Posts

Showing posts from September, 2020

Performance testing with Karate Gatling

What is Karate Gatling? Github page of this project has the tag line API performance testing made simple . Simply put this should help in performance testing of the api test written using Karate by leveraging performance testing capabilities of karate. On reviewing the documentation available on GitHub following capabilities are listed: Re-use karate tests as performance tests executed by Gatling Gatling and scala required only for defining the load model Everything else can be defined in Karate  Karate assertion failure also appear in the Gatling report Anything that can be written in Java can be performance tested. Option to scale out over multiple hardware nodes or Docker containers In this post we will see how to reuse Karate tests for execution using Gatling We will see step by step on how to setup Karate Gatling performance tests. There are a few prerequisites for setting up your karate Gatling tests. Prerequisites: JDK should be installed and availabl...

Getting started with karate-config.js

In this post we will see how to add an configuration file (karate-config.js) to our sample karate project. This configuration file is similar to the properties file that you would have used for other automation projects.  I'll be using the Karate-Zip release version for this post too. Still unaware about it, check out my last post . When using the config file we need to understand a few basics about it: When Karate starts-up it expects a file called karate-config.js in the classpath This config file should be a Javascript function . The function is expected to return a json object All Keys and values in the json object will be made available as script variable So what is classpath when using the Karate Standalone Jar or the Zip release version of Karate? To understand this lets open the karate.bat file and try to see what it contains, it has this command java -cp karate.jar;. com.intuit.karate.Main %* So com.intuit.karate.Main is the entry point for the Karate command line app A...

Getting Started with Karate - ZIP release

In the last post we saw what is Karate? and Why to use Karate. In this post we will see one of the simplest way of setting up and getting started with Karate framework. U sually when someone is starting their journey towards learning automation, then one of the most difficult things is doing the various setups before they can even get started. Karate although a recent entry as compared to some of the other automation tools already out there for a long time, has taken a clever approach that adresses these issues that are faced during busy schedules . I'm listing down few of the statements that have come up during my discussions with various people of the Testing community. T hese are the pain points that they encounter on a regular basis and in some extreme cases have pushed them away from even starting their automation journey. Problem statements Lots of time is wasted in setup of tools or the framework, when your target is to complete only a small POC In most places there are m...