title: JUnit5 assertion counting in tests
body: <p>Is there a way to determine the count of assertions called in tests? I am using  the <a href="https://junit.org/junit5/docs/current/user-guide/#launcher-api" rel="nofollow noreferrer">JUnit 5 Platform Launcher</a> and can count PASSes, FAILs in each Test Identifier, but cannot count assertions. This is important in results analytics and reporting since not every test is of the same "density," not by a long shot.</p>
  
  <p>I can provide a wrapper around each assert that increments a count or store a hard-coded sum in a test annotation, but the former introduces a contract that must be upheld just for a simple hack in JUnit 5 or can be ignored and the latter involves a lot of manual counting. Appreciated.</p>
  
  <pre><code>import static org.junit.jupiter.api.Assertions.assertEquals;
  ...
  int index = 0;
  while (index &lt; testValueCount){
      assertTrue(testValue[index]&gt;0);               // Want to capture testValueCount assertions here, not 1 (or none)
      ++index;
  }
  </code></pre>