Object/Class

zio.test

TestAspect

Related Docs: class TestAspect | package test

Permalink

object TestAspect extends TimeoutVariants

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestAspect
  2. TimeoutVariants
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class PerTest[+LowerR, -UpperR, +LowerE, -UpperE] extends TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object PerTest

    Permalink
  5. def after[R0, E0](effect: ZIO[R0, E0, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that runs the specified effect after every test.

  6. def afterAll[R0](effect: ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, Nothing, Any]

    Permalink

    Constructs an aspect that runs the specified effect after all tests.

  7. def annotate[V](key: TestAnnotation[V], value: V): TestAspectPoly

    Permalink

    Annotates tests with the specified test annotation.

  8. def around[R0, E0](before: ZIO[R0, E0, Any], after: ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    A less powerful variant of around where the result of before is not required by after.

  9. def aroundAll[R0, E0](before: ZIO[R0, E0, Any], after: ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    A less powerful variant of aroundAll where the result of before is not required by after.

  10. def aroundAllWith[R0, E0, A0](before: ZIO[R0, E0, A0])(after: (A0) ⇒ ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that evaluates all tests between two effects, before and after, where the result of before can be used in after.

  11. def aroundTest[R0, E0](scoped: ZIO[Scope with R0, TestFailure[E0], (TestSuccess) ⇒ ZIO[R0, TestFailure[E0], TestSuccess]]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that evaluates every test inside the context of the scoped function.

  12. def aroundWith[R0, E0, A0](before: ZIO[R0, E0, A0])(after: (A0) ⇒ ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that evaluates every test between two effects, before and after, where the result of before can be used in after.

  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def aspect[R0, E0](f: (ZIO[R0, TestFailure[E0], TestSuccess]) ⇒ ZIO[R0, TestFailure[E0], TestSuccess]): TestAspect[R0, R0, E0, E0]

    Permalink

    Constructs a simple monomorphic aspect that only works with the specified environment and error type.

  15. def before[R0, E0](effect: ZIO[R0, E0, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that runs the specified effect before every test.

  16. def beforeAll[R0, E0](effect: ZIO[R0, E0, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect that runs the specified effect a single time before all tests.

  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. val debug: TestAspectPoly

    Permalink

    An aspect that runs each test with the TestConsole instance in the environment set to debug mode so that console output is rendered to standard output in addition to being written to the output buffer.

  19. def diagnose(duration: zio.Duration): TestAspectPoly

    Permalink

    An aspect that runs each test on a separate fiber and prints a fiber dump if the test fails or has not terminated within the specified duration.

  20. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  22. val eventually: TestAspectPoly

    Permalink

    An aspect that retries a test until success, without limit.

  23. val exceptJS: TestAspectPoly

    Permalink

    An aspect that runs tests on all platforms except ScalaJS.

  24. val exceptJVM: TestAspectPoly

    Permalink

    An aspect that runs tests on all platforms except the JVM.

  25. val exceptNative: TestAspectPoly

    Permalink

    An aspect that runs tests on all platforms except ScalaNative.

  26. val exceptScala2: TestAspectPoly

    Permalink

    An aspect that runs tests on all versions except Scala 2.

  27. val exceptScala211: TestAspectPoly

    Permalink

    An aspect that runs tests on all versions except Scala 2.11.

  28. val exceptScala212: TestAspectPoly

    Permalink

    An aspect that runs tests on all versions except Scala 2.12.

  29. val exceptScala213: TestAspectPoly

    Permalink

    An aspect that runs tests on all versions except Scala 2.13.

  30. val exceptScala3: TestAspectPoly

    Permalink

    An aspect that runs tests on all versions except Scala 3.

  31. def executionStrategy(exec: ExecutionStrategy): TestAspectPoly

    Permalink

    An aspect that sets suites to the specified execution strategy, but only if their current strategy is inherited (undefined).

  32. def failing[E0](assertion: (TestFailure[E0]) ⇒ Boolean): TestAspect[Nothing, Any, Nothing, E0]

    Permalink

    An aspect that makes a test that failed for the specified failure pass.

    An aspect that makes a test that failed for the specified failure pass. Note that the test will fail for other failures and also if it passes correctly.

  33. val failing: TestAspectPoly

    Permalink

    An aspect that makes a test that failed for any reason pass.

    An aspect that makes a test that failed for any reason pass. Note that if the test passes this aspect will make it fail.

  34. lazy val fibers: TestAspectPoly

    Permalink

    An aspect that records the state of fibers spawned by the current test in TestAnnotation.fibers.

    An aspect that records the state of fibers spawned by the current test in TestAnnotation.fibers. Applied by default in ZIOSpecAbstract. This aspect is required for the proper functioning * of TestClock.adjust.

  35. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. def flaky(n: Int): TestAspectPoly

    Permalink

    An aspect that retries a test until success, with the specified limit, for use with flaky tests.

  37. val flaky: TestAspectPoly

    Permalink

    An aspect that retries a test until success, with a default limit, for use with flaky tests.

  38. val forked: TestAspectPoly

    Permalink

    An aspect that runs each test on its own separate fiber.

  39. def fromLayer[R0, E0](layer: ZLayer[R0, E0, Any]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Constructs an aspect from a layer that does not produce any services.

  40. def fromZIOAspect[LowerR, UpperR, LowerE, UpperE](zioAspect: ZIOAspect[LowerR, UpperR, TestFailure[LowerE], TestFailure[UpperE], TestSuccess, TestSuccess]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    As aspect that runs each test with the specified ZIOAspect.

  41. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  42. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  43. val identity: TestAspectPoly

    Permalink

    An aspect that returns the tests unchanged

  44. def ifEnv(env: String)(assertion: (String) ⇒ Boolean): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified environment variable satisfies the specified assertion.

  45. def ifEnvNotSet(env: String): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified environment variable is not set.

  46. def ifEnvOption(env: String)(assertion: (Option[String]) ⇒ Boolean): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified optional environment variable satisfies the specified assertion.

  47. def ifEnvSet(env: String): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified environment variable is set.

  48. def ifProp(prop: String)(assertion: (String) ⇒ Boolean): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified Java property satisfies the specified assertion.

  49. def ifPropNotSet(env: String): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified Java property is not set.

  50. def ifPropOption(prop: String)(assertion: (Option[String]) ⇒ Boolean): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified optional Java property satisfies the specified assertion.

  51. def ifPropSet(prop: String): TestAspectPoly

    Permalink

    An aspect that only runs a test if the specified Java property is set.

  52. val ignore: TestAspectPoly

    Permalink

    An aspect that marks tests as ignored.

  53. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  54. def js[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on ScalaJS.

  55. val jsOnly: TestAspectPoly

    Permalink

    An aspect that only runs tests on ScalaJS.

  56. def jvm[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on the JVM.

  57. val jvmOnly: TestAspectPoly

    Permalink

    An aspect that only runs tests on the JVM.

  58. val mac: TestAspectPoly

    Permalink

    Runs only on Mac operating systems.

  59. def native[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on ScalaNative.

  60. val nativeOnly: TestAspectPoly

    Permalink

    An aspect that only runs tests on ScalaNative.

  61. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  62. def nonFlaky(n: Int): TestAspectPoly

    Permalink

    An aspect that repeats the test a specified number of times, ensuring it is stable ("non-flaky").

    An aspect that repeats the test a specified number of times, ensuring it is stable ("non-flaky"). Stops at the first failure.

  63. val nonFlaky: TestAspectPoly

    Permalink

    An aspect that repeats the test a default number of times, ensuring it is stable ("non-flaky").

    An aspect that repeats the test a default number of times, ensuring it is stable ("non-flaky"). Stops at the first failure.

  64. def nonTermination(duration: zio.Duration): TestAspectPoly

    Permalink

    Constructs an aspect that requires a test to not terminate within the specified time.

  65. val nondeterministic: TestAspectPoly

    Permalink

    Sets the seed of the TestRandom instance in the environment to a random value before each test.

  66. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  67. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  68. def os(f: (OS) ⇒ Boolean): TestAspectPoly

    Permalink

    An aspect that runs only on operating systems accepted by the specified predicate.

  69. val parallel: TestAspectPoly

    Permalink

    An aspect that executes the members of a suite in parallel.

  70. def parallelN(n: Int): TestAspectPoly

    Permalink

    An aspect that executes the members of a suite in parallel, up to the specified number of concurrent fibers.

  71. def repeat[R0](schedule: Schedule[R0, TestSuccess, Any]): TestAspectAtLeastR[R0]

    Permalink

    An aspect that repeats successful tests according to a schedule.

  72. def repeats(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the number of times to repeat tests to ensure they are stable set to the specified value.

  73. def restore(restorable: UIO[Restorable]): TestAspectPoly

    Permalink

    An aspect that restores a given Restorable's state to its starting state after the test is run.

    An aspect that restores a given Restorable's state to its starting state after the test is run. Note that this is only useful when repeating tests.

  74. def restoreTestClock: TestAspectPoly

    Permalink

    An aspect that restores the TestClock's state to its starting state after the test is run.

    An aspect that restores the TestClock's state to its starting state after the test is run. Note that this is only useful when repeating tests.

  75. def restoreTestConsole: TestAspectPoly

    Permalink

    An aspect that restores the TestConsole's state to its starting state after the test is run.

    An aspect that restores the TestConsole's state to its starting state after the test is run. Note that this is only useful when repeating tests.

  76. def restoreTestEnvironment: TestAspectPoly

    Permalink

    An aspect that restores all state in the standard provided test environments (TestClock, TestConsole, TestRandom, and TestSystem) to their starting state after the test is run.

    An aspect that restores all state in the standard provided test environments (TestClock, TestConsole, TestRandom, and TestSystem) to their starting state after the test is run. Note that this is only useful when repeating tests.

  77. def restoreTestRandom: TestAspectPoly

    Permalink

    An aspect that restores the TestRandom's state to its starting state after the test is run.

    An aspect that restores the TestRandom's state to its starting state after the test is run. Note that this is only useful when repeating tests.

  78. def restoreTestSystem: TestAspectPoly

    Permalink

    An aspect that restores the TestSystem's state to its starting state after the test is run.

    An aspect that restores the TestSystem's state to its starting state after the test is run. Note that this is only useful when repeating tests.

  79. def retries(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the number of times to retry flaky tests set to the specified value.

  80. def retry[R0, E0](schedule: Schedule[R0, TestFailure[E0], Any]): TestAspect[Nothing, R0, Nothing, E0]

    Permalink

    An aspect that retries failed tests according to a schedule.

  81. def samples(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the number of sufficient samples to check for a random variable set to the specified value.

  82. def scala2[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on Scala 2.

  83. def scala211[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on Scala 2.11.

  84. val scala211Only: TestAspectPoly

    Permalink

    An aspect that only runs tests on Scala 2.11.

  85. def scala212[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on Scala 2.12.

  86. val scala212Only: TestAspectPoly

    Permalink

    An aspect that only runs tests on Scala 2.12.

  87. def scala213[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on Scala 2.13.

  88. val scala213Only: TestAspectPoly

    Permalink

    An aspect that only runs tests on Scala 2.13.

  89. val scala2Only: TestAspectPoly

    Permalink

    An aspect that only runs tests on Scala 2.

  90. def scala3[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    Permalink

    An aspect that applies the specified aspect on Scala 3.

  91. val scala3Only: TestAspectPoly

    Permalink

    An aspect that only runs tests on Scala 3.

  92. val sequential: TestAspectPoly

    Permalink

    An aspect that executes the members of a suite sequentially.

  93. def setSeed(seed: ⇒ Long): TestAspectPoly

    Permalink

    Sets the seed of the TestRandom instance in the environment to the specified value before each test.

  94. def shrinks(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the maximum number of shrinkings to minimize large failures set to the specified value.

  95. val silent: TestAspectPoly

    Permalink

    An aspect that runs each test with the TestConsole instance in the environment set to silent mode so that console output is only written to the output buffer and not rendered to standard output.

  96. val silentLogging: TestAspectPoly

    Permalink

    As aspect that runs each test with the default console logger removed so that logs are only written to the output buffer and not rendered to standard output.

  97. def size(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the size set to the specified value.

  98. val success: TestAspectPoly

    Permalink

    An aspect that converts ignored tests into test failures.

  99. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  100. def tag(tag: String, tags: String*): TestAspectPoly

    Permalink

    Annotates tests with string tags.

  101. val timed: TestAspectPoly

    Permalink

    Annotates tests with their execution times.

  102. def timeout(duration: zio.Duration): TestAspectPoly

    Permalink

    An aspect that times out tests using the specified duration.

    An aspect that times out tests using the specified duration.

    duration

    maximum test duration

  103. def timeoutWarning(duration: zio.Duration): TestAspectPoly

    Permalink

    A test aspect that prints a warning to the console when a test takes longer than the specified duration.

    A test aspect that prints a warning to the console when a test takes longer than the specified duration.

    Definition Classes
    TimeoutVariants
  104. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  105. val unix: TestAspectPoly

    Permalink

    Runs only on Unix / Linux operating systems.

  106. def verify[R0, E0](condition: ⇒ ZIO[R0, E0, TestResult]): TestAspect[Nothing, R0, E0, Any]

    Permalink

    Verifies the specified post-condition after each test is run.

  107. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  110. val windows: TestAspectPoly

    Permalink

    Runs only on Windows operating systems.

  111. def withConfigProvider(configProvider: ConfigProvider): TestAspectPoly

    Permalink

    An aspect that runs tests with the specified config provider.

  112. lazy val withLiveClock: TestAspectPoly

    Permalink

    An aspect that runs tests with the live clock service.

  113. lazy val withLiveConsole: TestAspectPoly

    Permalink

    An aspect that runs tests with the live console service.

  114. lazy val withLiveEnvironment: TestAspectPoly

    Permalink

    An aspect that runs tests with the live default ZIO services.

  115. lazy val withLiveRandom: TestAspectPoly

    Permalink

    An aspect that runs tests with the live random service.

  116. lazy val withLiveSystem: TestAspectPoly

    Permalink

    An aspect that runs tests with the live system service.

Deprecated Value Members

  1. def sized(n: Int): TestAspectPoly

    Permalink

    An aspect that runs each test with the size set to the specified value.

    An aspect that runs each test with the size set to the specified value.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.2) use size

Inherited from TimeoutVariants

Inherited from AnyRef

Inherited from Any

Ungrouped