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](managed: ZManaged[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 managed 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: TestAspectAtLeastR[TestConsole]

    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: TestAspectAtLeastR[ZTestEnv]

    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 DefaultRunnableSpec but not in RunnableSpec. 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[ZTestEnv with 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 with ZTestEnv]

    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. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  39. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  40. val identity: TestAspectPoly

    An aspect that returns the tests unchanged

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

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

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

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

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

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

  45. val ignore: TestAspectAtLeastR[Annotations]

    An aspect that marks tests as ignored.

  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. 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.

  48. val jsOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on ScalaJS.

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

  50. val jvmOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on the JVM.

  51. val mac: TestAspectAtLeastR[Annotations]

    Runs only on Mac operating systems.

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

  53. val nativeOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on ScalaNative.

  54. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  55. def nonFlaky(n: Int): TestAspectAtLeastR[ZTestEnv with 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.

  56. val nonFlaky: TestAspectAtLeastR[ZTestEnv with 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.

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

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

  58. val nondeterministic: TestAspectAtLeastR[Live with TestRandom]

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

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

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

  62. val parallel: TestAspectPoly

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

  63. def parallelN(n: Int): TestAspectPoly

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

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

    An aspect that repeats successful tests according to a schedule.

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

  66. def restore[R0 <: Restorable](implicit tag: zio.Tag[R0], ev: IsNotIntersection[R0]): TestAspectAtLeastR[R0]

    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.

  67. def restoreTestClock: TestAspectAtLeastR[TestClock]

    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.

  68. def restoreTestConsole: TestAspectAtLeastR[TestConsole]

    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.

  69. def restoreTestEnvironment: TestAspectAtLeastR[ZTestEnv]

    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.

  70. def restoreTestRandom: TestAspectAtLeastR[TestRandom]

    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.

  71. def restoreTestSystem: TestAspectAtLeastR[TestSystem]

    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.

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

  73. def retry[R0 <: ZTestEnv with 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.

  74. def runtimeConfig(runtimeConfigAspect: RuntimeConfigAspect): TestAspectPoly

    As aspect that runs each test with the specified RuntimeConfigAspect.

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

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

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

  78. val scala211Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.11.

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

  80. val scala212Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.12.

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

  82. val scala213Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.13.

  83. val scala2Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 2.

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

  85. val scala3Only: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Scala 3.

  86. val sequential: TestAspectPoly

    An aspect that executes the members of a suite sequentially.

  87. def setSeed(seed: => Long): TestAspectAtLeastR[TestRandom]

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

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

  89. val silent: TestAspectAtLeastR[TestConsole]

    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.

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

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

  91. val success: TestAspectPoly

    An aspect that converts ignored tests into test failures.

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

    Annotates tests with string tags.

  94. val timed: TestAspectAtLeastR[Live with Annotations]

    Annotates tests with their execution times.

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

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

    Runs only on Unix / Linux operating systems.

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

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

  100. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  101. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  102. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  103. val windows: TestAspectAtLeastR[Annotations]

    Runs only on Windows operating systems.

  104. object PerTest

Deprecated Value Members

  1. def dotty[LowerR, UpperR, LowerE, UpperE](that: TestAspect[LowerR, UpperR, LowerE, UpperE]): TestAspect[LowerR, UpperR, LowerE, UpperE]

    An aspect that applies the specified aspect on Dotty.

    An aspect that applies the specified aspect on Dotty.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use scala3

  2. val dottyOnly: TestAspectAtLeastR[Annotations]

    An aspect that only runs tests on Dotty.

    An aspect that only runs tests on Dotty.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use scala3Only

  3. val exceptDotty: TestAspectAtLeastR[Annotations]

    An aspect that runs tests on all versions except Dotty.

    An aspect that runs tests on all versions except Dotty.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use exceptScala3

Inherited from TimeoutVariants

Inherited from AnyRef

Inherited from Any

Ungrouped