-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with skipped tests in summary and html report #464
Comments
@vmchukky this is one of those features that I added primarily for the mocks / test-doubles and it is why it is not advertised. I don't think your proposed fix to line 77 will work because of line 93 - we are already hacking cucumber here. someone called @svarunbe also reported something but never followed up: before making any change here I would like to ensure it doesn't break anything else. so you are free to work on this PR and submit if you can prove via test cases that this is working as expected. this is one of those areas I'd really like to see working examples of all the cases working. you have a workaround - which is to move the conditional code into a "called" feature and then treat it as a block. |
@ptrthomas thank you for your feedback.
Am not sure, I have verified the fix. Line 93 would skip steps past
I completely agree. I have created a sample test case to show the difference in reports (both summary as well as html), will be attaching it to this issue. Attached are the screenshots showing differences with current 0.8.0 and proposed fix on top of 0.8.0. And in both cases we can see the steps (after abort() are skipped, otherwise ( Report generated when no abort Please check and post your comments. |
I couldn't attach the sample skeleton test project. But here is the one test file that I added to the skeleton project created by mvn.
|
@vmchukky 2 things. the above is a lot to go through, so I'd like an end to end sample or a PR: https://github.com/intuit/karate/wiki/Community-News also, we need to ensure the Cucumber HTML reports are un-affected. the other issue talked about jenkins failing the build which I could not understand at all. this is not a priority for me, so any effort from you or the community is going to make a difference. |
@ptrthomas sure, I will try to work on it and raise a PR with a test case. On a separate note: I am happy to see (from community news) that you will be presenting at Dev Conf in Bangalore (https://devconfin2018.sched.com/event/F749/karate-microservices-test-automation-made-simple), hoping to meet you in person. |
@vmchukky sounds great ! thanks for your patience :) you can imagine I really don't want to introduce a change that can break how Jenkins and CI works today - and the main problem here is - the code is already a hack to work around cucumber., I just don't feel good about the way |
@ptrthomas here is the PR #466 with proposed changes and corresponding unit test as well as functional test (attached to the PR comment). Please review it at your convenience. |
re-opening and will close with next major version release. thanks to @vmchukky for the PR - this fix is actually available in version 0.8.0.1 which was just released. |
0.9.0 released |
@ptrthomas seems like the issue with Karate.abort() still exist in V0.9.2. |
@Adarshkrishna9099 unlikely. open a new issue and make sure you follow this process please: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue |
I have been using karate for automated tests (starting with 0.6.0, in September 2017) and am very happy with this excellent tool. I pulled the latest 0.8.0 (for #418) and noticed couple of things that I would like to bring to your notice. Let me start of by saying this issue is related to
karate.abort()
and related summary/html reports (the undocumented / secret unreleased feature) and can be treated asenhancement
. I did look at the open issues and feel this issue was not raised before.Now here is the issue I would like to discuss before sending a PR. For the hypothetical test given below:
The two issues are
Please note that the steps are actually skipped (as expected), but the report doesn't reflect these skipped steps. Let me point two one line changes that I was thinking about
Change needed in https://github.com/intuit/karate/blob/master/karate-core/src/main/java/com/intuit/karate/cucumber/KarateHtmlReporter.java#L236
And https://github.com/intuit/karate/blob/master/karate-core/src/main/java/com/intuit/karate/cucumber/KarateRuntime.java#L77 need to be modified as
This is the first time I was looking at karate source tree (so far I have been a passive user), so please bear with me if I missed the reason for proposed karate.abort() and feel free to shoot down the issue/suggested code change.
The text was updated successfully, but these errors were encountered: