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
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....
1 vote
1 answer
98 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 ...
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", "...
0 votes
0 answers
746 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-...
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 ...
2 votes
1 answer
727 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 ...
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 ..
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('...
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]='...