org

# scalatest

#### package scalatest

ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

Visibility

1. Public
2. All

### Type Members

1. #### trait AbstractSuite extends AnyRef

   Trait that defines abstract methods that are implemented in `Suite` that can be overriden in stackable modification traits.

2. #### trait Assertions extends AnyRef

   Trait that contains ScalaTest's basic assertion methods.

3. #### trait BeforeAndAfter extends AbstractSuite

   Trait that can be mixed into suites that need code executed before and after running each test.

4. #### trait BeforeAndAfterAll extends AbstractSuite

   Trait that can be mixed into suites that need methods invoked before and after executing the suite.

5. #### trait BeforeAndAfterEach extends AbstractSuite

   Trait that can be mixed into suites that need methods invoked before and after running each test.

6. #### trait Distributor extends AnyRef

   Trait whose instances facilitate parallel execution of `Suite`s.

7. #### class DuplicateTestNameException extends StackDepthException

   Exception that indicates an attempt was made to register a test that had the same name as a test already registered in the same suite.

8. #### trait FailureOf extends AnyRef

   Trait that contains the `failureOf` method, which captures an exception thrown by a passed code block and returns it wrapped in a `Some`, or returns `None` if no exception is thrown.

9. #### trait FeatureSpec extends Suite

   A suite of tests in which each test represents one scenario of a feature.

10. #### class Filter extends (Set[String], Map[String, Set[String]]) ⇒ List[(String, Boolean)]

    Filter whose `apply` method determines which of the passed tests to run and ignore based on tags to include and exclude passed as as class parameters.

11. #### trait FlatSpec extends Suite with ShouldVerb with MustVerb with CanVerb

    Trait that facilitates a “behavior-driven” style of development (BDD), in which tests are combined with text that specifies the behavior the tests verify.

12. #### trait FreeSpec extends Suite

    Trait that facilitates a “behavior-driven” style of development (BDD), in which tests are nested inside text clauses denoted with the dash operator (`-`).

13. #### trait FunSuite extends Suite

    A suite of tests in which each test is represented as a function value.

14. #### trait GivenWhenThen extends AnyRef

    Trait that contains methods named `given`, `when`, `then`, and `and`, which take a string message and implicit `Informer`, and forward the message to the informer.

15. #### trait Informer extends (String) ⇒ Unit

    Trait to which custom information about a running suite of tests can be reported.

16. #### trait ModifiableMessage [T <: Throwable] extends AnyRef

    Trait implemented by exception types that can modify their detail message.

17. #### class NotAllowedException extends StackDepthException

    Exception that indicates something was attempted in test code that is not allowed.

18. #### trait OneInstancePerTest extends AbstractSuite

    Trait that facilitates a style of testing in which each test is run in its own instance of the suite class to isolate each test from the side effects of the other tests in the suite.

19. #### trait ParallelTestExecution extends OneInstancePerTest

    Trait that causes that the tests of any suite it is mixed into to be run in parallel if a `Distributor` is passed to `runTests`.

20. #### class PendingNothing extends AnyRef

    Type that is used as the return type of the `pending` method in class `Suite`, which always completes abruptly with a `TestPendingException`.

21. #### trait PrivateMethodTester extends AnyRef

    Trait that facilitates the testing of private methods.

22. #### trait PropSpec extends Suite

    A suite of property-based tests.

23. #### trait Reporter extends AnyRef

    Trait whose instances collect the results of a running suite of tests and presents those results in some way to the user.

24. #### trait Rerunner extends AnyRef

    Trait whose instances can rerun tests or other entities (such as suites).

25. #### trait ResourcefulReporter extends Reporter

    Subtrait of `Reporter` that contains a `dispose` method for releasing any finite, non-memory resources, such as file handles, held by the `Reporter`.

26. #### trait SequentialNestedSuiteExecution extends AbstractSuite

    Trait that causes that the nested suites of any suite it is mixed into to be run sequentially even if a `Distributor` is passed to `runNestedSuites`.

27. #### trait SeveredStackTraces extends AbstractSuite

    Trait that causes `StackDepth` exceptions thrown by a running test (such as `TestFailedException`s) to have the exception's stack trace severed at the stack depth.

28. #### trait Shell extends AnyRef

    Trait whose instances provide a `run` method and configuration fields that implement the ScalaTest shell: its DSL for the Scala interpreter.

29. #### trait Spec extends Suite

    Trait that facilitates a “behavior-driven” style of development (BDD), in which tests are combined with text that specifies the behavior the tests verify.

30. #### class Specs extends Suite

    A `Suite` class that takes zero to many (likely specification-style) `Suite`s, which will be returned from its `nestedSuites` method.

31. #### trait StackDepth extends AnyRef

    Trait that encapsulates the information required of an exception thrown by ScalaTest's assertions and matchers, which includes a stack depth at which the failing line of test code resides.

32. #### class StackDepthException extends RuntimeException with StackDepth

    Exception class that encapsulates information about the stack depth at which the line of code that failed resides, so that information can be presented to the user that makes it quick to find the failing line of code.

33. #### trait Stopper extends AnyRef

    Trait whose instances can indicate whether a stop has been requested.

34. #### trait Suite extends Assertions with AbstractSuite

    A suite of tests.

35. #### class Suites extends Suite

    A `Suite` class that takes zero to many `Suite`s, which will be returned from its `nestedSuites` method.

36. #### class Tag extends AnyRef

    Class whose subclasses can be used to tag tests in types `FunSuite`, `Spec`, `FlatSpec`, `WordSpec`, `FeatureSpec`, and their sister traits in the `org.scalatest.fixture` package.

37. #### class TestFailedException extends StackDepthException with ModifiableMessage[TestFailedException]

    Exception that indicates a test failed.

38. #### class TestPendingException extends RuntimeException

    Exception thrown to indicate a test is pending.

39. #### class TestRegistrationClosedException extends StackDepthException

    Exception that indicates an action that is only allowed during a suite's test registration phase, such as registering a test to run or ignore, was attempted after registration had already closed.

40. #### class Tracker extends AnyRef

    Class that tracks the progress of a series of `Ordinal`s produced by invoking `next` and `nextNewOldPair` on the current `Ordinal`.

41. #### trait WordSpec extends Suite with ShouldVerb with MustVerb with CanVerb

    Trait that facilitates a “behavior-driven” style of development (BDD), in which tests are combined with text that specifies the behavior the tests verify.

42. #### trait BeforeAndAfterAllFunctions extends AbstractSuite

    Trait `BeforeAndAfterAllFunctions` has been deprecated and will be removed in a future version of ScalaTest. Please use trait `BeforeAndAfterAll` instead.

43. #### trait BeforeAndAfterEachFunctions extends AbstractSuite

    Trait `BeforeAndAfterEachFunctions` has been deprecated and will be removed in a future version of ScalaTest. Please use trait `BeforeAndAfter` instead.

44. #### class SuperSuite extends Suites

    SuperSuite has been deprecated and will be removed in a future release of ScalaTest. Please change any uses of `SuperSuite` to a corresponding use of `Suites` or `Specs` instead.

### Value Members

1. #### object Assertions extends Assertions

   Companion object that facilitates the importing of `Assertions` members as an alternative to mixing it in.

2. #### object Distributor extends AnyRef

   Companion object to Distributor that holds a deprecated implicit conversion.

3. #### object FailureOf extends FailureOf

   Companion object that facilitates the importing of `FailureOf`'s method as an alternative to mixing it in.

4. #### object Filter extends AnyRef

5. #### object GivenWhenThen extends GivenWhenThen

   Companion object that facilitates the importing of `GivenWhenThen` members as an alternative to mixing it in.

6. #### object PrivateMethodTester extends PrivateMethodTester

   Companion object that facilitates the importing of `PrivateMethodTester` members as an alternative to mixing it in.

7. #### object Reporter extends AnyRef

   Companion object to Reporter that holds a deprecated implicit conversion.

8. #### object Rerunner extends AnyRef

   Companion object to Rerunner that holds a deprecated implicit conversion.

9. #### object Specs extends AnyRef

   Companion object to class `Specs` that offers an `apply` factory method for creating a `Specs` instance.

10. #### object Stopper extends AnyRef

    Companion object to Stopper that holds a deprecated implicit conversion.

11. #### object Suites extends AnyRef

    Companion object to class `Suites` that offers an `apply` factory method for creating a `Suites` instance.

12. #### object Tag extends AnyRef

    Companion object for `Tag`, which offers a factory method.

13. #### lazy val color : Shell

    Returns a copy of this `Shell` with `colorPassed` configuration parameter set to `true`.

    Returns a copy of this `Shell` with `colorPassed` configuration parameter set to `true`.

    Definition Classes
      package

14. #### package concurrent

15. #### lazy val durations : Shell

    Returns a copy of this `Shell` with `durationsPassed` configuration parameter set to `true`.

    Returns a copy of this `Shell` with `durationsPassed` configuration parameter set to `true`.

    Definition Classes
      package

16. #### package events

17. #### package fixture

18. #### lazy val fullstacks : Shell

    Returns a copy of this `Shell` with `fullStacksPassed` configuration parameter set to `true`.

    Returns a copy of this `Shell` with `fullStacksPassed` configuration parameter set to `true`.

    Definition Classes
      package

19. #### package junit

20. #### package matchers

21. #### package mock

22. #### lazy val nocolor : Shell

    Returns a copy of this `Shell` with `colorPassed` configuration parameter set to `false`.

    Returns a copy of this `Shell` with `colorPassed` configuration parameter set to `false`.

    Definition Classes
      package

23. #### lazy val nodurations : Shell

    Returns a copy of this `Shell` with `durationsPassed` configuration parameter set to `false`.

    Returns a copy of this `Shell` with `durationsPassed` configuration parameter set to `false`.

    Definition Classes
      package

24. #### lazy val nostacks : Shell

    Returns a copy of this `Shell` with `shortStacksPassed` configuration parameter set to `false`.

    Returns a copy of this `Shell` with `shortStacksPassed` configuration parameter set to `false`.

    Definition Classes
      package

25. #### lazy val nostats : Shell

    Returns a copy of this `Shell` with `statsPassed` configuration parameter set to `false`.

    Returns a copy of this `Shell` with `statsPassed` configuration parameter set to `false`.

    Definition Classes
      package

26. #### package prop

27. #### def run (suite: Suite, testName: String = null, configMap: Map[String, Any] = Map()): Unit

    Run the passed suite, optionally passing in a test name and config map.

    Run the passed suite, optionally passing in a test name and config map.

    This method will invoke `execute` on the passed `suite`, passing in the specified (or default) `testName` and `configMap` and the configuration values passed to this `Shell`'s constructor (`colorPassed`, `durationsPassed`, `shortStacksPassed`, `fullStacksPassed`, and `statsPassed`).

    Definition Classes
      package

28. #### lazy val shortstacks : Shell

    Returns a copy of this `Shell` with `shortStacksPassed` configuration parameter set to `true`.

    Returns a copy of this `Shell` with `shortStacksPassed` configuration parameter set to `true`.

    Definition Classes
      package

29. #### lazy val stats : Shell

    Returns a copy of this `Shell` with `statsPassed` configuration parameter set to `true`.

    Returns a copy of this `Shell` with `statsPassed` configuration parameter set to `true`.

    Definition Classes
      package

30. #### package testng

31. #### package tools

32. #### package verb