title: When do before() and after() get invoked within a ScalaTest class with BeforeAndAfter trait
body: <p>Consider the following minimal viable self contained testcase for <code>BeforeAndAfter</code> and <code>BeforeAndAfterAll</code>:</p>
  
  <pre><code>import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
  
  class BeforeAndAfterTestTest extends FunSuite with BeforeAndAfter with BeforeAndAfterAll {
  
    override protected def beforeAll(): Unit = println("beforeAll")
  
    override protected def afterAll(): Unit = println("afterAll")
  
    override protected def before(fun: =&gt; Any)(implicit pos: Position): Unit = {
      println("before")
    }
  
    override protected def after(fun: =&gt; Any)(implicit pos: Position): Unit = {
      println("after")
    }
  
    test("hello1") { println("hello1") }
  
    test("hello2") { println("hello2") }
  }
  </code></pre>
  
  <p>The result of running this through <code>scalatest</code> is:</p>
  
  <p><a href="https://i.stack.imgur.com/ZRRFW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZRRFW.png" alt="enter image description here"></a></p>
  
  <p>So :</p>
  
  <ul>
  <li>The <code>before/afterAll</code> <em>do</em> execute</li>
  <li>The <code>before/after</code> do <em>not</em></li>
  </ul>
  
  <p>What is needed to have the <code>before</code> and <code>after</code> methods get invoked?</p>