Detect assertions in a called method

For several of our tests we’re getting a “Add at least one assertion to this test case.”.
The assertions are there just not in the method annotated with @Test. It’s present a few method-calls down the line.

I’d like to request an improvement that enables detection of assertion that are placed in called methods, regardless of how many calls down the line the assertion is.

Our use-case: Tests that only differ in setup and share code that does the assertion.


This suggestion is very interesting and we share the need for it. Although, this is a very hard problem that we tried to tackle at best for now. Indeed following the call graph to determine if there is an assertion in subsequent calls can prove to be tricky and complex, especially if you start hitting something which is outside the current source file.

As such, while the suggestion is very reasonable in its stake, it is very hard to answer to it with a ticket or timeframe that will promise you that this will be fixed soon.