In karate framework, is it possible to include request/responses in junit reports - karate

I was wondering if it's possible to include requests/responses logs in the junit reports generated by karate.
Thanks a lot.

Currently not supported, and no support is planned. This is an area where the project invites open-source contributions.

Related

How I can make the URL of my summary report public to share in Karate framework [duplicate]

I'm trying to get reporting working for Karate DSL, and it's proven a challenge because my team uses Circle CI instead of Jenkins. Cucumber reporting seems to only work for Jenkins.
I've had a look at this documentation, here:
https://github.com/intuit/karate/tree/master/karate-demo#example-report
https://github.com/jenkinsci/cucumber-reports-plugin
I was wondering if there is a circle friendly equivalent you could recommend? It'd be even better if the reports could be generated in the terminal. It's going to be a hard sell to convince my team to change CI tools just so I can implement a test framework.
Thanks!
Here's what I suggest:
If you follow the demo / doc instructions - you will get the HTML reports in say target/cucumber-html-reports, and this is "pure Maven and Java", no dependency on CircleCI at all so far.
Now all you need to do is somehow make these HTML reports accessible via the web. In Jenkins, there is an HTML Publisher Plugin. I am not familiar with CircleCI but a quick search suggests that there is a way to expose links to build artifacts.
Also note that when you follow the demo, Java JUnit XML reports would also be output to target/cucumber-reports. It looks like CircleCI has support for these which means that it should be able to derive the build pass/fail status and stats if configured right.
Also note that Karate now enables you to write custom reports: https://stackoverflow.com/a/66773839/143475

How to run karate test runner file with TestNG? [duplicate]

This question already has an answer here:
Karate framework and TestNG
(1 answer)
Closed last year.
We have implemented cucumber with rest assured for API automation. Recently we came to know Karate giving advantages when compared with Rest assured. So I thought of recommend to my organization to use Karate, hence I have prepared sample to API automation scripts with Karate. Yes, I can execute very well with JUnit, but same testrunner file if I tried to execute with TestNG am unable to execute at all, displaying Test runs are zero after my execution.
Could you please help me is there any way to run Karate runner file with TestNG framwework. Really your answer going to make us decision.
I have gone through various posts which are related TestNG with Karate. But unluckily am unable to trigger my scripts.
Note: I have extended KarateRunner class and used #KarateOptions as well in my code.
TestNG is needed only for development mode. All teams finally need to do CI and here Karate does not need even JUnit, please refer this: https://github.com/intuit/karate#parallel-execution
Now for development mode - even if you insist on using TestNG, you can mix JUnit into the same project: https://stackoverflow.com/a/19928639/143475
Please give up trying to use TestNG for Karate, it is un-necessary and a waste of your time. Also note that we have IDE support which is what most developers will use. Even the JUnit support is not needed most of the time.

QUERY: Using Karate DSL with javascript based UI automation framework

I want to know, if we can use karate with JS based UI automation framework. And if yes, what are the requisite to follow. Do we require maven in that case?
We have well matured UI automation Selenium based framework. We want to know, if we can integrate Karate DSL without using maven.
You might if you use the CLI (command line interface) provided by the stand-alone JAR / executable. Please read the documentation here: https://github.com/intuit/karate/tree/master/karate-netty#standalone-jar
Which means if you can call an OS command from node / JS - you can use Karate. But there are no guarantees - and you can assume the answer to your question is NO.
That said - we plan to have our own competitor to Selenium - but it will take a little more time: https://github.com/intuit/karate/tree/master/karate-core

Is TestNG enough as a web test framework?

I just moved into web testing using Selenium and have been learning Selenium WebDriver + Java.
My question is, why do I need to build a test framework when TestNG is there?
What is there that TestNG cannot do as a framework?
Nothing :-)
More seriously, TestNG is very popular with Selenium users for a variety of reasons, among which support for:
Dependencies (very convenient to test pages that follow each other).
Parameterization with #DataProvider (useful to test various combinations of browsers and user agents).
Parallel tests (lets you test on multiple browsers simultaneously).
Check out the Selenium forums for more information and feel free to email the testng-users list if you have questions.
Yes, I think TestNG is enough as a web test framework. If you are familiar of using JUnit, It is easier to switch into TestNG
Building a custom framework may be necessary at times.
And you can use TestNG for that. :)

How to do testing with lift applications?

How to do testing and is there something similar like Rack::Test with ruby frameworks?
You can use Specs, ScalaTest and JUnit (and any other java test framework), theres some examples on the new wiki.
Read this!
I don't know much about ruby, so maybe don't get your point. But what about Jitr?
Jitr (pronounced "jitter") is a JUnit
Integration Test Runner.
It allows your web application
integration tests to easily run
against a lightweight web container in
the same JVM as your tests.
You can use it with JUnit 4's #RunWith annotation. In Scala: #RunWith(classOf[Jitr]).
This may be of help, it's on Lifts wiki pages. There are examples using Junit, Scalatest and and Specs.
How To: Unit test lift snippets with a logged in user