title: In JUnit 5, how to run code before all tests
body: <p>The <code>@BeforeAll</code> annotation marks a method to run before all tests in a <em>class</em>.</p>
  
  <p><a href="http://junit.org/junit5/docs/current/user-guide/#writing-tests-annotations" rel="noreferrer">http://junit.org/junit5/docs/current/user-guide/#writing-tests-annotations</a></p>
  
  <p>But is there a way to run some code before <em>all</em> tests, in all classes? </p>
  
  <p>I want to ensure that tests use a certain set of database connections, and the global one-time setup of these connections must occur <strong>before</strong> running <strong>any</strong> tests.</p>