Enum Class TestResourceScope

java.lang.Object
java.lang.Enum<TestResourceScope>
io.quarkus.test.common.TestResourceScope
All Implemented Interfaces:
Serializable, Comparable<TestResourceScope>, Constable

public enum TestResourceScope extends Enum<TestResourceScope>
Defines how Quarkus behaves with regard to the application of the resource to this test and the testsuite in general
  • Enum Constant Details

    • RESTRICTED_TO_CLASS

      public static final TestResourceScope RESTRICTED_TO_CLASS
      Means that Quarkus will run the test in complete isolation, i.e. it will restart every time it finds such a resource.

      Restarting Quarkus for this test means that the test resources will be restarted. This includes the global test resources and the Dev Services.

      Use with caution as it might slow down your test suite significantly.

    • MATCHING_RESOURCES

      public static final TestResourceScope MATCHING_RESOURCES
      Means that Quarkus will not restart when running consecutive tests that use the same set of resources.

      Note that when a restart is needed, all the resources will be restarted. This includes the global test resources and the Dev Services.

      Quarkus groups the tests by test resources to reduce the number of restarts.

    • GLOBAL

      public static final TestResourceScope GLOBAL
      Means the resource applies to all tests in the test suite.
  • Method Details

    • values

      public static TestResourceScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TestResourceScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null