Is there any way to get all tags available in all feature files of projects in karate? [duplicate] - karate

This question already has an answer here:
Karate summary reports not showing all tested features after upgrade to 1.0.0
(1 answer)
Closed 1 year ago.
We want to avoid report portal's empty launches if passed tag does not available in all feature files. So is there any predefined method or any way in karate to check that passed tag available or not before execution of test cases?

No there is not. Feel free to contribute code.

Related

Karate HTML Report is not generated if there is a feature with #ignore tag [duplicate]

This question already has an answer here:
Karate summary reports not showing all tested features after upgrade to 1.0.0
(1 answer)
Closed 1 year ago.
I have two simple features on my project. One has the #ignore tag. When I run Karate project, everything is OK but HTML report is not generated, I mean that on the console there is no message like this:
HTML Report: (paste into browser to view) | Karate version:*.*.*
file:.../karate-summary.html
And the karate-summary.html file is not generated.
This problem is happening on the v1.1.0 and the v1.2.0.RC1 but it's working on the v1.0.0
So I don't know if this is a "feature" of the latest releases or is a "bug".
(It's important to say that if I delete the #ignore tag, it works)
Yes #ignore became a "built-in" tag in 1.1.0 - so if needed use some other tag instead of #ignore if you want to get the benefit of tags for selecting some tests to run etc.

How to ignore a scenario in called feature Karate? [duplicate]

This question already has an answer here:
Calling a scenario in another feature file by scenario name
(1 answer)
Closed 1 year ago.
#ignore tag will not work if we called the feature file from other feature. Is there any alternative how to ignore specific scenario in called feature?
Don't have multiple scenarios in called features. Re-use is normally needed for very specific needs, such as setting up a test. Also please read this: https://stackoverflow.com/a/54126724/143475
That said, you can see if the "call by tag" approach helps:
https://github.com/karatelabs/karate#call-tag-selector
And refer: https://stackoverflow.com/a/59971678/143475

Can I customize error reports in Gatling? [duplicate]

This question already has an answer here:
How can I print/get the errors on gatling report? [duplicate]
(1 answer)
Closed 1 year ago.
Using Karate-Gatling, the default reports I get only log errors as
path/to/feature/myFeature.feature:19 method get
If I read the feature file, I can find the offending line and determine the cause of the error. However I would like to have this information in the report itself (so my colleagues and I don't have to go fishing through the features).
Is there a way to add a custom error log into the Gatling report? Possibly replace the location (path/to/feature/myFeature.feature:19 method get) with a custom message?
No. You can consider contributing code. There may be an opportunity to emit the Karate HTML reports only on errors. But right now, for performance reasons, all the reporting is disabled when in "gatling mode".

How to capture screenshot in case of error in a called feature? [duplicate]

This question already has an answer here:
Attaching screenshots to json report
(1 answer)
Closed 1 year ago.
I am trying to capture a screenshot after any step failure in a called feature. I tried using
configure afterScenario = function(){ if (karate.info.errorMessage) driver.screenshot() }
for that but realized that the hooks don't work for the called feature files. Is there any other way to achieve this?
Can you first upgrade to 1.0.1 and confirm, Karate should automatically take a screenshot and add it to the report on an error.
Else please go through this thread for ideas: https://github.com/intuit/karate/issues/1465
It may require you to dig into Karate internals and contribute code, so if you are not prepared to do that - you can opt for other alternative solutions.

Different Karate Report using Gradle [duplicate]

This question already has answers here:
Test not getting picked during parallel run and no report getting generated
(2 answers)
Closed 1 year ago.
Am using Karate with Gradle.
The concern i have is that with gradle am only getting the default Junit report which does not gives a clear count picture as glimse and not that neat to read.
Can you help me with any other report which i can use for Karate with gradle? Maybe cucumber or some other report please
This should be your best reference: https://github.com/intuit/karate/wiki/Gradle
And refer the docs here: https://github.com/intuit/karate/tree/master/karate-demo#example-report - to get the Cucumber reports which are recommended.