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

Report generated with wrong number of test cases executed in case a step fails #3546

Open
eitzenbe opened this issue Sep 26, 2024 · 8 comments

Comments

@eitzenbe
Copy link
Contributor

eitzenbe commented Sep 26, 2024

What happened?

you can easily reproduce the problem via this minimal repo
https://github.com/zelite/serenity-cucumber-starter-master

It seems to be related to gluecode that uses the @step annotation like screenplay-rest e.g.

What did you expect to happen?

instead of 16 test cases it should have executed 2. for me it seems that every annotated step is counted as a test case

Serenity BDD version

4.2.4-SNAPSHOT from master and earlier version down to 4.1.x

JDK version

jdk 17

Execution environment

No response

How to reproduce the bug.

https://github.com/zelite/serenity-cucumber-starter-master

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)

@eitzenbe
Copy link
Contributor Author

taking the branch try_without_ensure_screenplay minimizes the steps further and reveals (at least from my point of view) that the structuring of steps is not consistent. e.g.in the generated json the last step "When do something" is not inside the datavariant step "1: do something with "hello" ({something="hello"})" but after it.....

@eitzenbe
Copy link
Contributor Author

@eitzenbe
Copy link
Contributor Author

Hmm added one more version on the branch trying to reproduce it with steps annotation but did not succeed, it might be related to screenplay then?

@eitzenbe
Copy link
Contributor Author

@wakaleo eager to fix this ;)

@eitzenbe
Copy link
Contributor Author

eitzenbe commented Oct 6, 2024

HI @wakaleo Happy to fix this but would love to get a hook on where in the code to start to work on this issue?

@wakaleo
Copy link
Member

wakaleo commented Oct 6, 2024

I would start by following the stack trace - it could be a JDK issue related to ByteBuddy:
image
image

I am not seeing any miscounted tests though...
image

@eitzenbe
Copy link
Contributor Author

eitzenbe commented Oct 7, 2024

Interesting, which JDK are you running? And can you share the related json file? And on which OS are you testing this?

@eitzenbe
Copy link
Contributor Author

eitzenbe commented Oct 7, 2024

And you did use the branch try_without_ensure_screenplay ?

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

2 participants