Packages

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. Protected

Type Members

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def after[R0, E0](effect: ZIO[R0, E0, Any]): TestAspect[Nothing, R0, E0, Any]

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

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

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

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

    Annotates tests with the specified test annotation.

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

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

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

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

  9. def aroundAllWith[R0, E0, A0](before: ZIO[R0, E0, A0])(after: (A0) => ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

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

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

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

  11. def aroundWith[R0, E0, A0](before: ZIO[R0, E0, A0])(after: (A0) => ZIO[R0, Nothing, Any]): TestAspect[Nothing, R0, E0, Any]

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

  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def aspect[R0, E0](f: (ZIO[R0, TestFailure[E0], TestSuccess]) => ZIO[R0, TestFailure[E0], TestSuccess]): TestAspect[R0, R0, E0, E0]

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

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

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

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

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

  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  17. val debug: TestAspectPoly

    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.

  18. def diagnose(duration: zio.Duration): TestAspectAtLeastR[Live with Annotations]

    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.

  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. val eventually: TestAspectPoly

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

  22. val exceptJS: TestAspectAtLeastR[Annotations]

    An aspect that runs tests on all platforms except ScalaJS.

  23. val exceptJVM: TestAspectAtLeastR[Annotations]

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

  24. val exceptNative: TestAspectAtLeastR[Annotations]

    An aspect that runs tests on all platforms except ScalaNative.

  25. val exceptScala2: TestAspectAtLeastR[Annotations]

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

  26. val exceptScala211: TestAspectAtLeastR[Annotations]

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

  27. val exceptScala212: TestAspectAtLeastR[Annotations]

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

  28. val exceptScala213: TestAspectAtLeastR[Annotations]

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

  29. val exceptScala3: TestAspectAtLeastR[Annotations]

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

  30. def executionStrategy(exec: ExecutionStrategy): TestAspectPoly

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

  31. def failing[E0](assertion: (TestFailure[E0]) => Boolean): TestAspect[Nothing, Any, Nothing, E0]

    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.

  32. val failing: TestAspectPoly

    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.

  33. lazy val fibers: TestAspect[Nothing, Annotations, Nothing, Any]

    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.

  34. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  35. def flaky(n: Int): TestAspectAtLeastR[Annotations]

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

  36. val flaky: TestAspectAtLeastR[Annotations with TestConfig]

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

  37. val forked: TestAspectPoly

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

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

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

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

    As aspect that runs each test with the specified ZIOAspect.

  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  42. val identity: TestAspectPoly

    An aspect that returns the tests unchanged

  43. def ifEnv(env: String)(assertion: (String) => Boolean): TestAspectAtLeastR[Live with Annotations]

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

  44. def ifEnvNotSet(env: String): TestAspectAtLeastR[Live with Annotations]

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

  45. def ifEnvOption(env: String)(assertion: (Option[String]) => Boolean): TestAspectAtLeastR[Live with Annotations]

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

  46. def ifEnvSet(env: String): TestAspectAtLeastR[Live with Annotations]

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

  47. def ifProp(prop: String)(assertion: (String) => Boolean): TestAspectAtLeastR[Live with Annotations]

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

  48. def ifPropNotSet(env: String): TestAspectAtLeastR[Live with Annotations]

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

  49. def ifPropOption(prop: String)(assertion: (Option[String]) => Boolean): TestAspectAtLeastR[Live with Annotations]

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

  50. def ifPropSet(prop: String): TestAspectAtLeastR[Live with Annotations]

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

  51. val ignore: TestAspectAtLeastR[Annotations]

    An aspect that marks tests as ignored.

  52. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  53. def js[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    An aspect that applies the specified aspect on ScalaJS.

  54. val jsOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on ScalaJS.

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

    An aspect that applies the specified aspect on the JVM.

  56. val jvmOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on the JVM.

  57. val mac: TestAspectAtLeastR[Annotations]

    Runs only on Mac operating systems.

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

    An aspect that applies the specified aspect on ScalaNative.

  59. val nativeOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on ScalaNative.

  60. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  61. def nonFlaky(n: Int): TestAspectAtLeastR[Annotations]

    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.

  62. val nonFlaky: TestAspectAtLeastR[Annotations with TestConfig]

    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.

  63. def nonTermination(duration: zio.Duration): TestAspectAtLeastR[Live]

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

  64. val nondeterministic: TestAspectAtLeastR[Live]

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

  65. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  66. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  67. def os(f: (OS) => Boolean): TestAspectAtLeastR[Annotations]

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

  68. val parallel: TestAspectPoly

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

  69. def parallelN(n: Int): TestAspectPoly

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

  70. def repeat[R0 <: Annotations with Live](schedule: Schedule[R0, TestSuccess, Any]): TestAspectAtLeastR[R0]

    An aspect that repeats successful tests according to a schedule.

  71. def repeats(n: Int): TestAspectAtLeastR[TestConfig]

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

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

    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.

  73. def restoreTestClock: TestAspectPoly

    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.

  74. def restoreTestConsole: TestAspectPoly

    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.

  75. def restoreTestEnvironment: TestAspectPoly

    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.

  76. def restoreTestRandom: TestAspectPoly

    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.

  77. def restoreTestSystem: TestAspectPoly

    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.

  78. def retries(n: Int): TestAspectAtLeastR[TestConfig]

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

  79. def retry[R0 <: Annotations with Live, E0](schedule: Schedule[R0, TestFailure[E0], Any]): TestAspect[Nothing, R0, Nothing, E0]

    An aspect that retries failed tests according to a schedule.

  80. def samples(n: Int): TestAspectAtLeastR[TestConfig]

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

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

    An aspect that applies the specified aspect on Scala 2.

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

    An aspect that applies the specified aspect on Scala 2.11.

  83. val scala211Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.11.

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

    An aspect that applies the specified aspect on Scala 2.12.

  85. val scala212Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.12.

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

    An aspect that applies the specified aspect on Scala 2.13.

  87. val scala213Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.13.

  88. val scala2Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.

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

    An aspect that applies the specified aspect on Scala 3.

  90. val scala3Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 3.

  91. val sequential: TestAspectPoly

    An aspect that executes the members of a suite sequentially.

  92. def setSeed(seed: => Long): TestAspectPoly

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

  93. def shrinks(n: Int): TestAspectAtLeastR[TestConfig]

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

  94. val silent: TestAspectPoly

    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.

  95. def sized(n: Int): TestAspectAtLeastR[Sized]

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

  96. val success: TestAspectPoly

    An aspect that converts ignored tests into test failures.

  97. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  98. def tag(tag: String, tags: String*): TestAspectPoly

    Annotates tests with string tags.

  99. val timed: TestAspectAtLeastR[Live with Annotations]

    Annotates tests with their execution times.

  100. def timeout(duration: zio.Duration): TestAspectAtLeastR[Live]

    An aspect that times out tests using the specified duration.

    An aspect that times out tests using the specified duration.

    duration

    maximum test duration

  101. def timeoutWarning(duration: zio.Duration): TestAspectAtLeastR[Live]

    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
  102. def toString(): String
    Definition Classes
    AnyRef → Any
  103. val unix: TestAspectAtLeastR[Annotations]

    Runs only on Unix / Linux operating systems.

  104. def verify[R0, E0](condition: => ZIO[R0, E0, TestResult]): TestAspect[Nothing, R0, E0, Any]

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

  105. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  106. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  107. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  108. val windows: TestAspectAtLeastR[Annotations]

    Runs only on Windows operating systems.

  109. lazy val withLiveClock: TestAspectAtLeastR[Live]

    An aspect that runs tests with the live clock service.

  110. lazy val withLiveConsole: TestAspectAtLeastR[Live]

    An aspect that runs tests with the live console service.

  111. lazy val withLiveEnvironment: TestAspectAtLeastR[Live]

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

  112. lazy val withLiveRandom: TestAspectAtLeastR[Live]

    An aspect that runs tests with the live random service.

  113. lazy val withLiveSystem: TestAspectAtLeastR[Live]

    An aspect that runs tests with the live system service.

  114. object PerTest

Inherited from TimeoutVariants

Inherited from AnyRef

Inherited from Any

Ungrouped