接口 TestContext

  • 所有超级接口:
    AttributeAccessor, Serializable
    所有已知实现类:
    DefaultTestContext

    public interface TestContext
    extends AttributeAccessor, Serializable
    TestContext encapsulates the context in which a test is executed, agnostic of the actual testing framework in use.

    As of Spring Framework 5.0, concrete implementations are highly encouraged to implement a copy constructor in order to allow the immutable state and attributes of a TestContext to be used as a template for additional contexts created for parallel test execution. The copy constructor must accept a single argument of the type of the concrete implementation. Any implementation that does not provide a copy constructor will likely fail in an environment that executes tests concurrently.

    从以下版本开始:
    2.5
    作者:
    Sam Brannen
    另请参阅:
    TestContextManager, TestExecutionListener