Annotation Type DisplaySqlOfTestMethodBody


  • @Retention(RUNTIME)
    @Target({METHOD,TYPE})
    public @interface DisplaySqlOfTestMethodBody
    The DisplaySqlOfTestMethodBody annotation displays on the console the SQL statements produced during the execution of the test method body.

    Compared to DisplaySql, this annotation does not display SQL statements before (JUnit 4: @Before @BeforeClass) and after (JUnit 4: @After, @AfterClass) the execution of the test method body.

    We don't recommend committing this annotation. Indeed, the SQL statements would pollute the logs and may slow down the continuous integration build.

    Example:

          @DisplaySqlOfTestMethodBody
          public void obscure_sql_query_execution() {
              ..
          }