NoSuchElementExceptions mark test as broken #2746
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Allure uses From Allure Report documentation:
From the test design perspective, in your case: If you check that certain actions should produce assertThat(availableDays).hasSize(1); The other case is when it is usually non-empty, and the collection itself is not the part for the tested functionality (e.g. you test that appointment reservation works, and you prepared the data with some available days), you may assume |
Beta Was this translation helpful? Give feedback.
-
Thanks. In theory I do not need to assert all part of a product while running a single test, because we depend on many upstream services, and it may end up in redundant assertions; I thought, if I had added manually at least a custom message this would indicate this is me, so I expect it could fail and being rerun. Also, it sounds like only AssertionError matters here and other exceptions won't be needed ,as anyway it will lead to status 'broken' what will make rerun being impossible (why would I need to use any others exceptions at all?..). Can I use at least custom exceptions what will extend java.lang.AssertionError to make test fail? |
Beta Was this translation helpful? Give feedback.
-
Ideally, I would like to have a control on what could be considered as expected error and behaves as AssertionError. __ Thanks. |
Beta Was this translation helpful? Give feedback.
Yes, you can