Skip to main content

Posts

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...
Recent posts

Karate zip release | running your tests using jenkins

Some time back there was a question on my youTube channel related to using Jenkins along with Karate's zip release version. So I did a POC to explore the possibility and found that Jenkins can be used when using Karate's zip release version. Problem Statement: Can Jenkins be used to run the tests when using the zip release version of Karate. Pre-requisites: Java should be installed on your system Jenkins should be available How to run Karate tests in Jenkins? Launch Jenkins Create a new Project by clicking on New Item Then enter a name Select 'Freestyle project' Click on OK In the subsequent screen scroll down to the build section For windows OS Select Execute Windows batch command For Linux Will cover in a separate post  Enter the following command inside the text area D: cd D:\karateZipRelease\karate-1.2.0.RC1 ...

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...

[~]$ whoami

[~]$ whoami A.k.a. KALIMOH Quality explorer  #SupportOpenSource    If you stay in a Mega CITY  you never know where your next job / project might take you too or how much one might need to travel. It is during these travels that I got hooked on to listening to Podcasts which have a magical world of their own. Some of my favorites podcasts are: Test Guild   Formerly known as the Joe Colantonio show Always get to learn something new Darknet Diaries One of the best shows out there,  Really love the journey and growth of @JackRhysider as a creator and presenter This is the one that got me addicted to podcasts and Security Testing Hackable A podcast by McAfee Where the host ends up getting hacked almost every show My favorite is the one where the Host gets locked out of his own house  Talk Python to me  This podcast is reason of my love for  Python Full list in another post maybe☺. It was during one of my trav...

Karate - Quick Start with Maven Archetype

 What is Karate? Karate enables you to script a sequence of calls to any kind of web-service and assert that the responses are as expected.  Karate provides an easy to use DSL which natively supports json and xml. Karate is not just limited to API automation. After the initial releases which supported API automation, now the capabilities include Performance testing, UI  automation, Desktop automation (a release candidate was made available just a few weeks ago with this capability). Why Karate?  Is based on the popular Cucumber / Gherkin standard, and IDE support and syntax-coloring options exist  You can run tests and generate reports like any standard Java project. But instead of Java - you write tests in a language ( DSL ) designed to make dealing with HTTP, JSON or XML Java knowledge is not required and even non-programmers can write tests Embedded JavaScript engine that allows you to build a library of re-usable functions  Gherki...