Skip to main content

Questions tagged [karate]

Use this tag for questions related to web-service API testing using the Karate framework.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

Sending a file in the body of a POST request in Karate

I am having some difficulties getting a request to work as expected in Karate where I use a .json file in the body of my POST request. I have tried to define it as both a form field and as a multipart ...
DEnumber50's user avatar
  • 1,192
0 votes
1 answer
1k views

Pull username and password variables into JS call in karate

I'm trying to do some basic authorization by using the javascript function (basic-auth.js) here to encode: function fn(creds) { var temp = creds.USER_NAME + ':' + creds.PASSWORD; var Base64 = Java....
DEnumber50's user avatar
  • 1,192
1 vote
1 answer
99 views

API Testing and automation framework [closed]

I wonder if it is 100% necessary to use an automation framework like KARATE instead of API Tools like POSTMAN. Usually I automate different websites by using SELENIUM & JAVA and I try different ...
new_programmer's user avatar
4 votes
2 answers
8k views

How to send API request json body in cucumber

Can anyone help me to send json request in one line ?? Example { "benefitPlanIDs": [ { "benefitPlanID": "011748abc", "benefitPlanPlatform": "abc" } ], "clientId": "abc", "...
Babita's user avatar
  • 51
0 votes
0 answers
750 views

TestNGClassFinder Warning: Can't link and determine methods of class examples.ExamplesTest

Just started with Karate API test sample project and encountered with this issue. My pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Lalit Phirke's user avatar
1 vote
0 answers
918 views

javascript evaluation failed: PPB00001694, ReferenceError: "PPB00001694" is not defined in <eval> at line number 1

I have created a test using Karate DSL and using the data-table for the send to the URL path variable. I need to pass the test data in to URL, but it's throwing an error. My code: Feature: Update ...
Jagannatha Mv's user avatar
1 vote
1 answer
2k views

Comparison testing using karate tool

I'm using karate tool for api automation testing. Is there a way to do comparison or A/B testing using karate - That's testing with 2 urls and making sure both return the same response..please help ..
Gayathri's user avatar
1 vote
1 answer
11k views

Getting issue with passing string variable in JSON request [closed]

I am stuck in a scenario where i have created customized java code which returns a string. Next, I am passing it in another \path with JSON request below: Given url 'url' def browserCall = Java.type('...
Ranjan Gupta's user avatar
2 votes
1 answer
731 views

Getting issue while automating SOAP service using Karate framework

I am a bit stuck while automating SOAP service . I have below url and request xml : Background: url Scenario: soap 1.1 request """ When soap action '********' Then status 200 After running ...
Ranjan Gupta's user avatar
4 votes
1 answer
2k views

Getting issue while sending nested JSON as request to validate the POST REST API method using Karate framework

Please note that I am trying to send the below request and validate the response on POST method using url `http:******* Note : I tried sending nested Json as an array like ****[0]='', voucherData[1]='...
Ranjan Gupta's user avatar