Karate – UI Testing – When using Zalenium Safari and MSEDGE immediately error on driver/session call => no capabilities found [duplicate]

I am using Edge and Safari browsers of Saucelabs through Zalenium as below. Microsoft Edge {type : msedgedriver, webDriverSession : {capabilities : {browserName : MicrosoftEdge}, desiredCapabilities : {browserName : MicrosoftEdge}}, start : false, webDriverUrl : https://username:[email protected]_zalenium_host.com/wd/hub} Safari {type : safaridriver, webDriverSession : {capabilities : {browserName : safari}, desiredCapabilities : {browserName : safari}}, start : false, … Read more

Is there a way to update the headers in one feature file and use the Auth token from Karate.config.js?

This is explained in detail in the docs: https://github.com/intuit/karate#configure-headers * configure headers = read(‘classpath:my-headers.js’) And you can refer to variables declared in karate-config.js anywhere in Karate. Again read the docs, and there are multiple examples. Next time please ask a more specific question: https://stackoverflow.com/help/minimal-reproducible-example

How to run karate tests from project jar?

Not something we directly support but teams have done this in Spring Boot etc. It should be possible, see if this thread helps: https://github.com/intuit/karate/issues/520 Also you may not need JUnit also: https://github.com/intuit/karate/issues/427 And see the sample project in this ticket as an example: https://github.com/intuit/karate/issues/529 EDIT – in 1.0 onwards we hope that class-loading from spring-boot … Read more

I cannot get the inner value of a JSON object

Yeah your response looks really wrong, a string within a JSON and all. But even if that is the expected response, Karate can handle it. Refer the documentation on type conversions: https://github.com/intuit/karate#type-conversion * def response = “”” [ { “code”: 200, “result”: “[{\”distinct\”:false,\”operatetime\”:\”2019-05-17 17:01:01\”,\”personid\”:\”e8edec61-fd1a-4c69-8b60-fb8d21d06095\”,\”sampleid\”:\”1c9410cd-608d-4eb1-8d12-c8f2faf7fca4\”}]” } ] “”” * json result = response[0].result * def personId … Read more

Is there an option for us to customize and group the test scenarios in the statics section of the Karate Gatling Report?

Talk about timing. Here’s the issue I raised a few hours back: https://github.com/intuit/karate/issues/526 So yes, this is a gap we are planning to address. Counting on you for beta-testing. EDIT: Available since version 0.9.0 – this works by specifying a nameResolver: first put a header in your transaction and use a nameResolver to use this … Read more