Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalatest

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

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

    Definition Classes
    org
  • package concurrent

    Classes, traits, and objects related to testing asynchronous and multi-threaded behavior.

    Classes, traits, and objects related to testing asynchronous and multi-threaded behavior.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package diagrams

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    This package is released as the scalatest-diagrams module.

    Definition Classes
    scalatest
  • package enablers

    Classes, traits, and objects for typeclasses that enable ScalaTest's DSLs.

    Classes, traits, and objects for typeclasses that enable ScalaTest's DSLs.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package events

    Classes for events sent to the org.scalatest.Reporter to report the results of running tests.

    Classes for events sent to the org.scalatest.Reporter to report the results of running tests.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package exceptions

    Classes and traits for exceptions thrown by ScalaTest.

    Classes and traits for exceptions thrown by ScalaTest.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package featurespec

    Classes and traits for ScalaTest's FeatureSpec style.

    Classes and traits for ScalaTest's FeatureSpec style.

    This package is released as the scalatest-featurespec module.

    Definition Classes
    scalatest
  • package fixture

    Classes and traits supporting ScalaTest's "fixture" style traits, which allow you to pass fixture objects into tests.

    Classes and traits supporting ScalaTest's "fixture" style traits, which allow you to pass fixture objects into tests.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package flatspec

    Classes and traits for ScalaTest's FlatSpec style.

    Classes and traits for ScalaTest's FlatSpec style.

    This package is released as the scalatest-flatspec module.

    Definition Classes
    scalatest
  • package freespec

    Classes and traits for ScalaTest's FreeSpec style.

    Classes and traits for ScalaTest's FreeSpec style.

    This package is released as the scalatest-freespec module.

    Definition Classes
    scalatest
  • package funspec

    Classes and traits for ScalaTest's FunSpec style.

    Classes and traits for ScalaTest's FunSpec style.

    This package is released as the scalatest-funspec module.

    Definition Classes
    scalatest
  • package funsuite

    Classes and traits for ScalaTest's FunSuite style.

    Classes and traits for ScalaTest's FunSuite style.

    This package is released as the scalatest-funsuite module.

    Definition Classes
    scalatest
  • package matchers

    Classes and traits for matchers.

    Classes and traits for matchers.

    This package is released as part of the scalatest-matchers-core module.

    Definition Classes
    scalatest
  • package path

    ScalaTest's old path package that contains deprecated aliases for path style traits.

    ScalaTest's old path package that contains deprecated aliases for path style traits.

    Definition Classes
    scalatest
  • package prop
    Definition Classes
    scalatest
  • package propspec

    Classes and traits for ScalaTest's PropSpec style.

    Classes and traits for ScalaTest's PropSpec style.

    This package is released as the scalatest-propspec module.

    Definition Classes
    scalatest
  • package refspec

    Classes and traits for ScalaTest's RefSpec style.

    Classes and traits for ScalaTest's RefSpec style.

    This package is released as the scalatest-refspec module.

    Definition Classes
    scalatest
  • package tagobjects

    Singleton-object versions of ScalaTest's built-in tags.

    Singleton-object versions of ScalaTest's built-in tags.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package tags
    Definition Classes
    scalatest
  • CPU
  • ChromeBrowser
  • Disk
  • FirefoxBrowser
  • HtmlUnitBrowser
  • InternetExplorerBrowser
  • Network
  • Retryable
  • SafariBrowser
  • Slow
  • package time

    Classes, traits, and objects for ScalaTest's time DSL.

    Classes, traits, and objects for ScalaTest's time DSL.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package tools

    Tools for running ScalaTest.

    Tools for running ScalaTest.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package verbs

    Classes and traits that support ScalaTest DSLs.

    Classes and traits that support ScalaTest DSLs.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package words

    A deprecated package that contained support for ScalaTest DSLs.

    A deprecated package that contained support for ScalaTest DSLs.

    Definition Classes
    scalatest
  • package wordspec

    Classes and traits for ScalaTest's WordSpec style.

    Classes and traits for ScalaTest's WordSpec style.

    This package is released as the scalatest-wordspec module.

    Definition Classes
    scalatest

package tags

Type Members

  1. trait CPU extends Annotation

    Annotation used to tag a test, or suite of tests, as being CPU-intensive (i.e., consuming a lot of CPU time when it runs).

    Annotation used to tag a test, or suite of tests, as being CPU-intensive (i.e., consuming a lot of CPU time when it runs).

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    If you wish to mark an entire suite of tests as being CPU-intensive, you can annotate the test class with @CPU, like this:

    package org.scalatest.examples.flatspec.cpuall
    
    import org.scalatest._
    import tags.CPU
    
    @CPU
    class SetSpec extends FlatSpec {
    
      "An empty Set" should "have size 0" in {
        assert(Set.empty.size === 0)
      }
    
      it should "produce NoSuchElementException when head is invoked" in {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    When you mark a test class with a tag annotation, ScalaTest will mark each test defined in that class with that tag. Thus, marking the SetSpec in the above example with the @CPU tag annotation means that both tests in the class are CPU-intensive.

    Another use case for @CPU is to mark test methods as CPU-intensive in traits Spec and fixture.Spec. Here's an example:

    package org.scalatest.examples.spec.cpu
    
    import org.scalatest._
    import tags.CPU
    
    class SetSpec extends RefSpec {
    
      @CPU def `an empty Set should have size 0` {
        assert(Set.empty.size === 0)
      }
    
      def `invoking head on an empty Set should produce NoSuchElementException` {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    The main use case of annotating a test or suite of tests is to select or deselect them during runs by supplying tags to include and/or exclude. For more information, see the relevant section in the documentation of object Runner.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  2. trait ChromeBrowser extends Annotation

    Tag that indicates a Selenium test uses the Chrome browser.

    Tag that indicates a Selenium test uses the Chrome browser.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  3. trait Disk extends Annotation

    Annotation used to tag a test, or suite of tests, as being disk-intensive (i.e., consuming a large amount of disk-IO bandwidth when it runs).

    Annotation used to tag a test, or suite of tests, as being disk-intensive (i.e., consuming a large amount of disk-IO bandwidth when it runs).

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    If you wish to mark an entire suite of tests as being disk-intensive, you can annotate the test class with @Disk, like this:

    package org.scalatest.examples.flatspec.diskall
    
    import org.scalatest._
    import tags.Disk
    
    @Disk
    class SetSpec extends FlatSpec {
    
      "An empty Set" should "have size 0" in {
        assert(Set.empty.size === 0)
      }
    
      it should "produce NoSuchElementException when head is invoked" in {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    When you mark a test class with a tag annotation, ScalaTest will mark each test defined in that class with that tag. Thus, marking the SetSpec in the above example with the @Disk tag annotation means that both tests in the class are disk-intensive.

    Another use case for @Disk is to mark test methods as disk-intensive in traits Spec and fixture.Spec. Here's an example:

    package org.scalatest.examples.spec.disk
    
    import org.scalatest._
    import tags.Disk
    
    class SetSpec extends RefSpec {
    
      @Disk def `an empty Set should have size 0` {
        assert(Set.empty.size === 0)
      }
    
      def `invoking head on an empty Set should produce NoSuchElementException` {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    The main use case of annotating a test or suite of tests is to select or deselect them during runs by supplying tags to include and/or exclude. For more information, see the relevant section in the documentation of object Runner.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  4. trait FirefoxBrowser extends Annotation

    Tag that indicates a Selenium test uses the Firefox browser.

    Tag that indicates a Selenium test uses the Firefox browser.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  5. trait HtmlUnitBrowser extends Annotation

    Tag that indicates a Selenium test uses the HtmlUnit browser.

    Tag that indicates a Selenium test uses the HtmlUnit browser.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  6. trait InternetExplorerBrowser extends Annotation

    Tag that indicates a Selenium test uses the InternetExplorer browser.

    Tag that indicates a Selenium test uses the InternetExplorer browser.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  7. trait Network extends Annotation

    Annotation used to tag a test, or suite of tests, as being network-intensive (i.e., consuming a large amount of network bandwidth when it runs).

    Annotation used to tag a test, or suite of tests, as being network-intensive (i.e., consuming a large amount of network bandwidth when it runs).

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    If you wish to mark an entire suite of tests as being network-intensive, you can annotate the test class with @Network, like this:

    package org.scalatest.examples.flatspec.networkall
    
    import org.scalatest._
    import tags.Network
    
    @Network
    class SetSpec extends FlatSpec {
    
      "An empty Set" should "have size 0" in {
        assert(Set.empty.size === 0)
      }
    
      it should "produce NoSuchElementException when head is invoked" in {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    When you mark a test class with a tag annotation, ScalaTest will mark each test defined in that class with that tag. Thus, marking the SetSpec in the above example with the @Network tag annotation means that both tests in the class are network-intensive.

    Another use case for @Network is to mark test methods as network-intensive in traits Spec and fixture.Spec. Here's an example:

    package org.scalatest.examples.spec.network
    
    import org.scalatest._
    import tags.Network
    
    class SetSpec extends RefSpec {
    
      @Network def `an empty Set should have size 0` {
        assert(Set.empty.size === 0)
      }
    
      def `invoking head on an empty Set should produce NoSuchElementException` {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    The main use case of annotating a test or suite of tests is to select or deselect them during runs by supplying tags to include and/or exclude. For more information, see the relevant section in the documentation of object Runner.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  8. trait Retryable extends Annotation

    Tag annotation that indicates a test is a candidate for retrying on either failure, cancellation, or both.

    Tag annotation that indicates a test is a candidate for retrying on either failure, cancellation, or both.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    This tag annotation is intended to be used in conjunction with trait Retries, to identify tests that are candidates for retrying.

    If you wish to mark all tests in a test class as being candidates for retries, you can annotate the test class with @Retryable, like this:

    package org.scalatest.examples.flatspec.retryableall
    
    import org.scalatest._
    import tags.Retryable
    
    @Retryable
    class SetSpec extends FlatSpec with Retries {
    
      override def withFixture(test: NoArgTest) = {
        if (isRetryable(test))
          withRetry { super.withFixture(test) }
        else
          super.withFixture(test)
      }
    
      "An empty Set" should "have size 0" in {
        assert(Set.empty.size === 0)
      }
    
      it should "produce NoSuchElementException when head is invoked" in {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    When you mark a test class with a tag annotation, ScalaTest will mark each test defined in that class with that tag. Thus, marking the SetSpec in the above example with the @Retryable tag annotation means that both tests in the class are candidates for retrying.

    Another use case for @Retryable is to mark test methods as being candidates for retries in traits Spec and fixture.Spec. Here's an example:

    package org.scalatest.examples.spec.disk
    
    import org.scalatest._
    import tags.Disk
    
    class SetSpec extends RefSpec with Retries {
    
      override def withFixture(test: NoArgTest) = {
        if (isRetryable(test))
          withRetry { super.withFixture(test) }
        else
          super.withFixture(test)
      }
    
      @Retryable def `an empty Set should have size 0` {
        assert(Set.empty.size === 0)
      }
    
      def `invoking head on an empty Set should produce NoSuchElementException` {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    The main use case of annotating a test or suite of tests is to select or deselect them during runs by supplying tags to include and/or exclude. For more information, see the relevant section in the documentation of object Runner.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  9. trait SafariBrowser extends Annotation

    Tag that indicates a Selenium test uses the Safari browser.

    Tag that indicates a Selenium test uses the Safari browser.

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

  10. trait Slow extends Annotation

    Annotation used to tag a test, or suite of tests, as being slow (i.e., requiring a long time to run).

    Annotation used to tag a test, or suite of tests, as being slow (i.e., requiring a long time to run).

    Note: This is actually an annotation defined in Java, not a Scala trait. It must be defined in Java instead of Scala so it will be accessible at runtime. It has been inserted into Scaladoc by pretending it is a trait.

    If you wish to mark an entire suite of tests as being slow, you can annotate the test class with @Slow, like this:

    package org.scalatest.examples.flatspec.slowall
    
    import org.scalatest._
    import tags.Slow
    
    @Slow
    class SetSpec extends FlatSpec {
    
      "An empty Set" should "have size 0" in {
        assert(Set.empty.size === 0)
      }
    
      it should "produce NoSuchElementException when head is invoked" in {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    When you mark a test class with a tag annotation, ScalaTest will mark each test defined in that class with that tag. Thus, marking the SetSpec in the above example with the @Slow tag annotation means that both tests in are slow.

    Another use case for @Slow is to mark test methods as slow in traits Spec and fixture.Spec. Here's an example:

    package org.scalatest.examples.spec.slow
    
    import org.scalatest._
    import tags.Slow
    
    class SetSpec extends RefSpec {
    
      @Slow def `an empty Set should have size 0` {
        assert(Set.empty.size === 0)
      }
    
      def `invoking head on an empty Set should produce NoSuchElementException` {
        intercept[NoSuchElementException] {
          Set.empty.head
        }
      }
    }
    

    The main use case of annotating a test or suite of tests is to select or deselect them during runs by supplying tags to include and/or exclude. For more information, see the relevant section in the documentation of object Runner.

    Note that because reflection is not supported on Scala.js, this annotation will only work on the JVM, not on Scala.js.

Ungrouped