Enum Class Lifecycle

java.lang.Object
java.lang.Enum<Lifecycle>
com.code_intelligence.jazzer.junit.Lifecycle
All Implemented Interfaces:
Serializable, Comparable<Lifecycle>, Constable

public enum Lifecycle extends Enum<Lifecycle>
Possible values for the FuzzTest.lifecycle() option.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Fuzz tests with this lifecycle go through the JUnit test method lifecycle once for every test method execution during fuzzing, i.e., per-test lifecycle methods such as BeforeEach methods are executed before each individual invocation of the fuzz test method and every execution uses its own test class instance.
    Fuzz tests with this lifecycle only go through the JUnit test method lifecycle once during fuzzing, i.e., per-test lifecycle methods such as BeforeEach methods are executed once for each fuzz test.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Lifecycle
    Returns the enum constant of this class with the specified name.
    static Lifecycle[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PER_TEST

      public static final Lifecycle PER_TEST
      Fuzz tests with this lifecycle only go through the JUnit test method lifecycle once during fuzzing, i.e., per-test lifecycle methods such as BeforeEach methods are executed once for each fuzz test.

      This mode is usually more efficient than PER_EXECUTION, but is more likely to unintentionally preserve state between fuzz test executions, which can result in non-reproducible findings.

    • PER_EXECUTION

      public static final Lifecycle PER_EXECUTION
      Fuzz tests with this lifecycle go through the JUnit test method lifecycle once for every test method execution during fuzzing, i.e., per-test lifecycle methods such as BeforeEach methods are executed before each individual invocation of the fuzz test method and every execution uses its own test class instance.

      This mode is usually less efficient than PER_TEST, but makes it easier to write stateless fuzz tests that interoperate correctly with JUnit extensions used by test frameworks.

      The following lifecycle methods and extensions are currently supported:

      Note: Lifecycle methods for different test class instances may be invoked concurrently, which can lead to issues if these methods are using global resources (e.g. file locks).

  • Method Details

    • values

      public static Lifecycle[] 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 Lifecycle 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