Package

play.api

test

Permalink

package test

Contains test helpers.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. test
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait DefaultAwaitTimeout extends AnyRef

    Permalink
  2. trait EssentialActionCaller extends AnyRef

    Permalink
  3. case class FakeHeaders(data: Seq[(String, String)] = Seq.empty) extends Headers with Product with Serializable

    Permalink

    Fake HTTP headers implementation.

    Fake HTTP headers implementation.

    data

    Headers data.

  4. class FakeRequest[+A] extends Request[A]

    Permalink

    A Request with a few extra methods that are useful for testing.

    A Request with a few extra methods that are useful for testing.

    A

    the body content type.

  5. class FakeRequestFactory extends AnyRef

    Permalink

    Helper methods for building FakeRequest values.

  6. trait FutureAwaits extends AnyRef

    Permalink
  7. type HasApp = AnyRef { def app: play.api.Application }

    Permalink

    A structural type indicating there is an application.

  8. trait Injecting extends AnyRef

    Permalink

    A trait declared on a class that contains an def app: Application, and can provide instances of a class.

    A trait declared on a class that contains an def app: Application, and can provide instances of a class. Useful in integration tests.

  9. trait PlayRunners extends HttpVerbs

    Permalink

    Helper functions to run tests.

  10. trait PlaySpecification extends SpecificationLike with PlayRunners with HeaderNames with Status with HttpProtocol with DefaultAwaitTimeout with ResultExtractors with Writeables with RouteInvokers with FutureAwaits with HttpVerbs

    Permalink

    Play specs2 specification.

    Play specs2 specification.

    This trait excludes some of the mixins provided in the default specs2 specification that clash with Play helpers methods. It also mixes in the Play test helpers and types for convenience.

  11. type Port = Int

    Permalink

    Provided as an implicit by WithServer and WithBrowser.

  12. trait ResultExtractors extends AnyRef

    Permalink
  13. trait RouteInvokers extends EssentialActionCaller

    Permalink
  14. trait StubBodyParserFactory extends AnyRef

    Permalink
  15. trait StubControllerComponentsFactory extends StubPlayBodyParsersFactory with StubBodyParserFactory with StubMessagesFactory

    Permalink
  16. trait StubMessagesFactory extends AnyRef

    Permalink
  17. trait StubPlayBodyParsersFactory extends AnyRef

    Permalink
  18. case class TestBrowser(webDriver: WebDriver, baseUrl: Option[String]) extends FluentAdapter with Product with Serializable

    Permalink

    A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).

    A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).

    webDriver

    The WebDriver instance to use.

  19. case class TestServer(config: ServerConfig, application: Application, serverProvider: Option[ServerProvider]) extends Product with Serializable

    Permalink

    A test web server.

    A test web server.

    config

    The server configuration.

    application

    The Application to load in this server.

    serverProvider

    The type of server to use. If not provided, uses Play's default provider.

  20. abstract class WithApplication extends Around with Scope

    Permalink

    Used to run specs within the context of a running application.

  21. abstract class WithApplicationLoader extends Around with Scope

    Permalink

    Used to run specs within the context of a running application loaded by the given ApplicationLoader.

  22. abstract class WithBrowser[WEBDRIVER <: WebDriver] extends Around with Scope

    Permalink

    Used to run specs within the context of a running server, and using a web browser

  23. abstract class WithServer extends Around with Scope

    Permalink

    Used to run specs within the context of a running server.

  24. trait Writeables extends AnyRef

    Permalink
  25. trait WsTestClient extends AnyRef

    Permalink

    A standalone test client that is useful for running standalone integration tests.

Value Members

  1. object CSRFTokenHelper

    Permalink

    Exposes methods to make using requests with CSRF tokens easier.

  2. object FakeRequest extends FakeRequestFactory

    Permalink

    Object with helper methods for building FakeRequest values.

    Object with helper methods for building FakeRequest values. This object uses a play.api.mvc.request.DefaultRequestFactory with default configuration to build the requests.

  3. object Helpers extends PlayRunners with HeaderNames with Status with MimeTypes with HttpProtocol with DefaultAwaitTimeout with ResultExtractors with Writeables with EssentialActionCaller with RouteInvokers with FutureAwaits with StubControllerComponentsFactory

    Permalink
  4. object NoMaterializer extends Materializer

    Permalink

    In 99% of cases, when running tests against the result body, you don't actually need a materializer since it's a strict body.

    In 99% of cases, when running tests against the result body, you don't actually need a materializer since it's a strict body. So, rather than always requiring an implicit materializer, we use one if provided, otherwise we have a default one that simply throws an exception if used.

  5. object NoTemporaryFileCreator extends TemporaryFileCreator

    Permalink

    A temporary file creator with no implementation.

  6. object PlayRunners

    Permalink
  7. object TestBrowser extends Serializable

    Permalink

    Helper utilities to build TestBrowsers

  8. object TestServer extends Serializable

    Permalink
  9. object WebDriverFactory

    Permalink
  10. object WsTestClient extends WsTestClient

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped