Skip to content
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

Feature file steps not visible in html report #32

Open
umerhamdan10 opened this issue Mar 10, 2021 · 15 comments
Open

Feature file steps not visible in html report #32

umerhamdan10 opened this issue Mar 10, 2021 · 15 comments

Comments

@umerhamdan10
Copy link

My steps are not visible in report. I just see my feature file name and scenario name.

Any one face same issue? I just se json don't have any information about the steps but have the scenarion information.

Help will be appriciated
image

@NHP95
Copy link

NHP95 commented Mar 22, 2021

Same concern here, has it been designed this way? If so, can we do it on our own?

@hdorgeval
Copy link
Owner

Hi @NHP95 and @umerhamdan10, it would be great if you could explain how you use this reporter: are you using it in a custom integration of cucumber with testcafé or just testcafé ?

Thanks!

@umerhamdan10
Copy link
Author

I integrate cucumber with testcafe.

https://www.npmjs.com/package/testcafe-reporter-cucumber-json

@NHP95
Copy link

NHP95 commented Mar 23, 2021 via email

@umerhamdan10
Copy link
Author

I used testcafe and gherkin-testcafe for the step definitions https://www.npmjs.com/package/gherkin-testcafe

On Tue, Mar 23, 2021 at 10:06 PM umerhamdan10 @.***> wrote: I integrate cucumber with testcafe. https://www.npmjs.com/package/testcafe-reporter-cucumber-json — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#32 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEOMGY3ZMXDAXMPT2OPCOLTFCU5ZANCNFSM4Y6L4RBQ .

I am also using the same one

@hdorgeval
Copy link
Owner

Hi @umerhamdan10 and @NHP95 , I have given a response in this issue

I think you might also be interested in this thread : hdorgeval/testcafe-reporter-cucumber-json#29

@NHP95
Copy link

NHP95 commented Mar 24, 2021 via email

@hdorgeval
Copy link
Owner

Hi @NHP95, @umerhamdan10 , unfortunately there is no perfect and clean integration of Cucumber with TestCafé. TestCafé is an all-in-one tool (and it is a great tool) and not a library. This means it is not possible (at the time of writing this comment) to have a TestCafé feature file that is run by the cucumber runner. And because TestCafé has no notion of step inside a test function, you will not have any steps in the final json report.

This is why I suggested to infer these steps by injecting // Given ... // When ... // Then ... comments inside the test methods.

The JSON reporter is theoretically able to parse the source code of the test to extract these comments.

I would like to know if you really need something like this?

@umerhamdan10
Copy link
Author

Hi @hdorgeval, thank you for the reply and give the valuable information.

I did not get (This is why I suggested to infer these steps by injecting // Given ... // When ... // Then ... comments inside the test methods) this. How to do this.

Can you share example or your implementation.?

@hdorgeval
Copy link
Owner

Hi @umerhamdan10 , it would be great if you could provide a functional github repo that shows how you use testcafe together with cucumber and the reporter, so that I can search for the best solution to inject the steps inside the json file report.

Thanks!

@NHP95
Copy link

NHP95 commented Mar 28, 2021 via email

@MeghaKoshle
Copy link

Hi,
I'm also facing same issue!
I'm using testcafe, cucumber and multiple-cucumber-html-reporter.

[
report_issue

@hdorgeval
Copy link
Owner

Hi @MeghaKoshle thank you for your feedback.

I would be happy to provide a solution, but for this, it would be great if someone in this thread could provide a working public repo that demonstrate the problem.

The root cause of what you report is that at runtime all gherkin syntax is translated into Testcafé syntax, because the final runner is TestCafé and not Cucumber itself; and in TestCafé world there is no notion of step.

By providing a working public repo, I can see what kind of information, the reporter can gather at runtime and therefore I can see what kind of solution I could provide.

Regards

@goelabhinav
Copy link

goelabhinav commented Jun 16, 2021

122158685-6c365c80-ceb0-11eb-8609-8b46c50e9ea0
@hdorgeval could you please have a look at this? https://github.com/damianszczepanik/cucumber-reporting

I was looking for a report with feature steps like mentioned in the provided url.

@v-mwalk
Copy link

v-mwalk commented Jul 14, 2022

A slightly aging issue thread, but one that is very relevant to me in my current project at the moment.

I understand that TestCafe has no notion of Cucumber/Steps and so gherkin-testcafe is - I assume - effectively converting the Cucumber to Testcafe; which Testcafe is then executing. And, as Testcafe has no notion of steps your reporter, which is embedding into Testcafe aslo has no notion of steps.

You mention, above, 'injecting // Given ... // When ... // Then ... comments inside the test methods' which would solve the problem; which I assume multiple-cucumber-html-reporter would then put inside 'Test Info' stuff. That is what I've been trying to work out how to do but cant find a way; be able to have a line reporter.info("This is runnin g in step xyz");

So, in a gherkin-testcafe solution, how do I write text to your reporter for inclusion into the generated json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants