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

Junit5 is not recognising failed tests if the test display name is changed using @DisplayNameGeneration #3162

Closed
djhTesting opened this issue Jun 19, 2023 · 4 comments

Comments

@djhTesting
Copy link

djhTesting commented Jun 19, 2023

Hi, we have an issue where test results are correct in the serenity report, but when viewing junit tests in Azure all tests show as passed regardless of outcome.
It seems to work ok as long as the test display name is the same as the test method name, but as soon as you change the display name using @DisplayNameGeneration the problem occurs.

I think it is the same issue spotted here:
#2920
...but that has been closed.

I've managed to fix the issue locally by changing SerenityJUnit5Extension.java (https://github.com/serenity-bdd/serenity-core/blob/main/serenity-junit5/src/main/java/net/serenitybdd/junit5/SerenityJUnit5Extension.java) as below, does this look like the correct fix?
image

@djhTesting
Copy link
Author

Just been informed this has already been fixed - will repon if necessary

@djhTesting
Copy link
Author

OK reopening - the other fix mentioned is #3158 which is dealing with a slightly different issue, so maybe the fix above is still required?

@djhTesting djhTesting reopened this Jun 19, 2023
@wakaleo
Copy link
Member

wakaleo commented Jul 13, 2023

Can you try with 3.9.0?

@djhTesting
Copy link
Author

@wakaleo - tried with 3.9.1 and working fine now, thanks.

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