title: Unable to autorun sql scripts via the @Sql annotation
body: <p>I absolutely need to use non-static methods with annotations <strong>@BeforeAll</strong> and <strong>@AfterAll</strong>. But these annotations work on non-static methods only if we have the</p>
  <p><strong>@TestInstance(TestInstance.Lifecycle.PER_CLASS)</strong></p>
  <pre class="lang-java prettyprint-override"><code>@ActiveProfiles(&quot;test&quot;)
  @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  public abstract class ApplicationTests extends ContainerConfig{
  
      @Autowired
      protected TestRestTemplate testRestTemplate;
  
      @Autowired
      protected BasicUserRepository basicUserRepository;
      
  }
  
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>/**
  * If you prefer JUnit Jupiter
  * performed all testing methods in a single test instance,
  * annotate your test class with @testInstance(Lifecycle.PER_CLASS) .
  * When using this mode, a new test instance is created
  * will be created once for each test class, that is, all nodes of the test class
  * of a tree (that is, of this class) they will use the same object, that is,
  * an object of this class, and methods, will be called on this object and use the state,
  * which this object has.
  * Therefore, be careful if your test nodes will change the properties of this
  * an object during the processing of its tests.
  * In this case, you can use the @BeforeAll and @AfterAll annotations over non-static
  * methods
  */
  @TestInstance(TestInstance.Lifecycle.PER_CLASS)
  @Sql(scripts = &quot;/sql/sql-data.sql&quot;)
  class UserControllerTest extends ApplicationTests  {
  
      private String NAME_USER;
  
      @BeforeAll
      void setUp() {
  
          List&lt;BasicUser&gt; userList = super.basicUserRepository.findAll();
          NAME_USER = userList
                  .stream()
                  .map(BasicUser::getUsername)
                  .findFirst()
                  .orElse(&quot;&quot;);
  
          if (NAME_USER.isEmpty()) {
              throw new RuntimeException(&quot;Not Found users.&quot;);
          }
      }
  
      @Test
      void findOne() {
  
          String uri = &quot;/users/{username}&quot;;
  
          DetailedUserDto userDto =
                  super.testRestTemplate
                          .getForObject(uri,
                                  DetailedUserDto.class,
                                  NAME_USER);
  
          Long id = userDto.getId();
          String name = userDto.getUsername();
          Set&lt;String&gt; permissions = userDto.getPermissions();
          int sizeEmptyCollection = 0;
          assertTrue(permissions.size() &gt; sizeEmptyCollection);
  
          int emptyId = 0;
          assertTrue(id &gt; emptyId);
      }
  
      @AfterAll
      void clearDb() {
          basicUserRepository.deleteAll();
      }
  }
  </code></pre>
  <p>But when using <strong>@TestInstance(testInstance.Lifecycle.PER_CLASS)</strong>, autorun of sql scripts does not work, via annotation <strong>@Sql</strong>.</p>
  <p>Why does it occure and how can i correct that ?</p>