-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
The serenity report is marking failed tests as passed #3433
Comments
Try to create a test that reproduces the issue. |
Hi @wakaleo, I have the same error, I tracked the versions and it happens since 4.0.46 (same version of the gradle plugin), although it only happens in classes that implement Question interface, here is an example. Using version 4.0.30 Using version 4.0.46+ JVM: 17 and 21 |
A Question should not contain another assertion, it should return a value, e.g.
|
Is this a new behavior then? because in previous versions it didn't work like that, asserts were possible anywhere you had access to the actor... really the example you show is the simplest there can be, the validations of my test cases do not cover a single assert, even In the simplest scenario of just calling an endpoint, it should validate not only the status code but also the body, body fields, schema, etc... for this I should make a Question class for each assert? or how should it work? I think I'll use version 4.0.30 for eternity 😅 |
It's not an intentional change but having an assertion inside a question isn't a use case we would test - the purpose of a question is to query the state of the system, not to make an assertion - you make an assertion with the value returned by the question. Putting the assertion inside the question code may upset the exception handling logic. |
maybe related to #3443 ? |
This issue still persists with version 4.1.10. Am I doing something wrong? |
Yes, questions should not perform assertions, they should just query the state of the system and return a value. |
No assertions are happening here and am not even using actor based model . it is simple statement like: editButton.waitUntilVisible(); where it is failing.. I added a bit of implicit wait and it is ok .. looks like test was failing at this place but report was marked as green. However, in the console, the end summary did say 1 error.. |
There were flakes where the failed tests reran till they passed.. but this test is not even marked as flake and did not re-run. This is just 1 instance.. this is happening with waitUntilPresent, etc. Here is the logs at end of console: [WARNING] Tests run: 480, Failures: 0, Errors: 0, Skipped: 0, Flakes: 10 --- maven-failsafe-plugin:3.2.5:verify (default) @ od-qa-automation --- See the build is marked as SUCCESS ? |
If you are rerunning failed tests with JUnit that might be related - I never do that so don't know if it is supported. |
Re-running failed tests using failsafe plugin |
Serenity is not aware of rerun tests so will just record the latest result. |
As I mentioned before, this particular test was not rerun. It just ran once and marked as error. All failed n error tests do rerun. But such errors do not rerun. |
I can't reproduce this, so I presume there is some project-specific configuration issue going on. Can you investigate and propose a PR? |
What happened?
Serenity report has failures/errors. While on CI, there are only flakes and passed tests reported on console too. The failed tests are mainly to do with wait until visible, wait until displayed. these are not reported and it marks the report as GREEN when this happens.
Serenity version: 4.1.0
What did you expect to happen?
No response
Serenity BDD version
4.1.0
JDK version
17
Execution environment
No response
How to reproduce the bug.
Running 400+ tests parallel execution on Azure devops and 1 or 2 fails with element not displayed/visible. But test report is green. However, after downloading report , there are failures/errors.
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered: