karate

Capability of using Karate along with selenium webdriver

拈花ヽ惹草 提交于 2019-11-28 06:16:19
问题 I started using Karate one week back and this is my first question. I used to write web service tests using Spock & groovy, Rest assured & cucumber. When I came across Karate I felt it's really interesting. Thank you for your huge effort. I found Karate really capable and satisfying my needs to automated Json services. However, I would like to know some more details on this. I use another framework along with groovy, Spock and Java. In my scenario, I need to send a json request, get the

Executing Karate jar with mock using external library Spring Framework

北城余情 提交于 2019-11-28 05:29:19
问题 Good morning. I am working on a project that uses Karate Standalone. I am completely new to Karate to excuse my lack of knowledge here. The standalone karate jar is executed with the ' -m ' command line parameter to start a mock.feature. The mock.feature references a utils class that is built on ' org.springframework.amqp '. The problem is that the karate.jar startup fails with a Command Line Execution Exception due to external library ' org/springframework/amqp/rabbit/connection

Is it possible to have multiple JS functions inside one JS file of karate framework?

廉价感情. 提交于 2019-11-28 02:00:55
问题 I need to perform two operations on the result of JSON responses.so can we have those different operations inside single JS file? or do we need to have mapping like one JS file for one operation. Please help on this 回答1: I don't recommend trying to create complicated JavaScript in Karate, it just leads to maintainability issues. If you really want an object with multiple utility methods on it, write a Java class with static methods, and it will be much easier to maintain / debug. That said,

How to read input data from an excel spreadsheet and pass it JSON payload in karate framework?

馋奶兔 提交于 2019-11-27 07:16:18
问题 I need to create data driven unit tests for different APIs in karate framework. The various elements to be passed in the JSON payload should be taken as input from an excel file. 回答1: A few points: I recommend you look at Karate's built-in data-table capabilities, it is far more readable, integrates into your test-script and you won't need to depend on other software. Refer these examples: call-table.feature and dynamic-params.feature Next I would recommend using JSON instead of an Excel or

How to compare 2 JSON objects that contains array using Karate tool and feature files

天大地大妈咪最大 提交于 2019-11-27 05:39:53
Files for the scenario All the files are on same directory. title-update-request.json {id: 12, name: 'Old Hello', config:[{username: 'qwe', password: 'tyu'},{username: 'abc', password: 'xyz'}]} title-update-response.json {id: 12, name: 'New Hello', config:[{username: 'qwe', password: 'tyu'},{username: 'abc', password: 'xyz'}]} title-update-error-request.json {id: 00, name: 'Old Hello', config:[{username: 'qwe', password: 'tyu'},{username: 'abc', password: 'xyz'}]} title-update-error-response.json {Error: 'not found', Message: 'The provided Book is not found.'} book-record.feature Feature: CRUD

In Karate how we can collaboratively work along with BA to automate business scenarios

a 夏天 提交于 2019-11-26 19:09:24
While using Karate we were able to do most of the validations for web services, we were able to successfully integrate Karate with Selenium webdriver and do DB assertions using java classes. For DB we returned the results sets as list by converting each row as a hashmap and Karate took it as json array. So the validations became simple. Most of the needs for us on a QA side have been achieved using Karate. However, today when we introduced, it to a bigger community one of the dev lead came up with a question. He is an expert in JBehave, BDD, jsonpath, java, web services etc. We also felt his

Error using DBUtils in first scenario

*爱你&永不变心* 提交于 2019-11-26 14:57:43
问题 When I use DBUtils.java in Eclipse and run the tests there it works fine, but when I run it through Jenkins the first time that DBUtils are used is failing. And the second works... The first time that it uses db.readRows it fails. Scenario: Account Create Given path 'accounts' And header Authorization = setup.authorization And request {identifier: KarateCreation, subscribers:[{identifier:KarateCreation, firstName:KarateCreation, lastName:KarateCreation}]} When method POST And match response

How to compare 2 JSON objects that contains array using Karate tool and feature files

一世执手 提交于 2019-11-26 10:04:54
问题 Files for the scenario All the files are on same directory. title-update-request.json {id: 12, name: \'Old Hello\', config:[{username: \'qwe\', password: \'tyu\'},{username: \'abc\', password: \'xyz\'}]} title-update-response.json {id: 12, name: \'New Hello\', config:[{username: \'qwe\', password: \'tyu\'},{username: \'abc\', password: \'xyz\'}]} title-update-error-request.json {id: 00, name: \'Old Hello\', config:[{username: \'qwe\', password: \'tyu\'},{username: \'abc\', password: \'xyz\'}]

In Karate how we can collaboratively work along with BA to automate business scenarios

对着背影说爱祢 提交于 2019-11-26 04:55:18
问题 While using Karate we were able to do most of the validations for web services, we were able to successfully integrate Karate with Selenium webdriver and do DB assertions using java classes. For DB we returned the results sets as list by converting each row as a hashmap and Karate took it as json array. So the validations became simple. Most of the needs for us on a QA side have been achieved using Karate. However, today when we introduced, it to a bigger community one of the dev lead came up