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...
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
karate D:\karateZipRelease\karate-1.2.0.RC1\src\demo\api
cd D:\karateZipRelease\karate-1.2.0.RC1
karate D:\karateZipRelease\karate-1.2.0.RC1\src\demo\api
- So the above command would first change the drive to D.
- This is where I've my files
- Then the next command would change the directory to where the karate.jar file is located
- Then the last command uses the keyword karate followed by the path to directory which contain the api tests
- For the purpose of this POC, I'm using the demo api tests already included in the zip release version.
- The last line in the command can be modified to run individual tests too,
- This can be achieved by merely changing the path to point to the Test instead of an directory
- Next, click Apply and save
- Now Click on Build Now link in the Left pane
- Under Build History you'll see that the execution has started
- Click on the Link (#1) under this section
- Click on Console Output to view the details
- Since I've run all the tests in the directory, the console output was too big to be taken as a single screen print.
- I've displayed below the top and bottom part of the output
A special mention and THANKS to all those lovely people who keep sending their queries, your queries help me learn too :-)
Please do keep sending the queries. I'll try to post answers to those as soon as I get time to explore them. Thank you for your patience.
Comments
Post a Comment