package test

Contains test helpers.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. test
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait ApplicationFactories extends AnyRef

    Mixin with helpers for creating ApplicationFactory objects.

    Mixin with helpers for creating ApplicationFactory objects.

    Annotations
    @ApiMayChange()
  2. trait ApplicationFactory extends AnyRef

    Creates an Application.

    Creates an Application. Usually created by a helper in ApplicationFactories.

    Annotations
    @ApiMayChange()
  3. trait DefaultAwaitTimeout extends AnyRef
  4. class DefaultTestServerFactory extends TestServerFactory

    Creates a server for an application with a random HTTP port bound.

    Creates a server for an application with a random HTTP port bound. To change the HTTP port you can pass a testserver.port system property. The HTTPS port by default is not bound, but can be enabled by passing the testserver.httpsport system property. If it gets bound it will be using a self-signed certificate.

    Most logic in this class is in a protected method so that users can extend the class and override its logic.

    Annotations
    @ApiMayChange()
  5. trait EssentialActionCaller extends AnyRef
  6. case class FakeHeaders(data: Seq[(String, String)] = Seq.empty) extends Headers with Product with Serializable

    Fake HTTP headers implementation.

    Fake HTTP headers implementation.

    data

    Headers data.

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

    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.

  8. class FakeRequestFactory extends AnyRef

    Helper methods for building FakeRequest values.

  9. trait FutureAwaits extends AnyRef
  10. type HasApp = AnyRef { def app: play.api.Application }

    A structural type indicating there is an application.

  11. final class HttpServerEndpointRecipe extends ServerEndpointRecipe

    Provides a recipe for making an HTTP ServerEndpoint.

    Provides a recipe for making an HTTP ServerEndpoint.

    Annotations
    @ApiMayChange()
  12. final class HttpsServerEndpointRecipe extends ServerEndpointRecipe

    Provides a recipe for making an HTTPS ServerEndpoint.

    Provides a recipe for making an HTTPS ServerEndpoint.

    Annotations
    @ApiMayChange()
  13. trait Injecting extends AnyRef

    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.

  14. trait PlayRunners extends HttpVerbs

    Helper functions to run tests.

  15. type Port = Int

    Provided as an implicit by WithServer and WithBrowser.

  16. trait ResultExtractors extends AnyRef
  17. trait RouteInvokers extends EssentialActionCaller
  18. final case class RunningServer(app: Application, endpoints: ServerEndpoints, stopServer: AutoCloseable) extends Product with Serializable

    Contains information about a running TestServer.

    Contains information about a running TestServer. This object can be used by tests to find out about the running server, e.g. port information.

    We use a separate class to avoid including mutable state, such as methods for closing the server.

    Annotations
    @ApiMayChange()
  19. sealed trait ServerEndpointRecipe extends AnyRef

    A recipe for making a ServerEndpoint.

    A recipe for making a ServerEndpoint. Recipes are often used when describing which tests to run. The recipe can be used to start servers with the correct ServerEndpoints.

    Annotations
    @ApiMayChange()
    See also

    ServerEndpointRecipe.withEndpoint()

  20. trait StubBodyParserFactory extends AnyRef
  21. trait StubControllerComponentsFactory extends StubPlayBodyParsersFactory with StubBodyParserFactory with StubMessagesFactory
  22. trait StubMessagesFactory extends AnyRef
  23. trait StubPlayBodyParsersFactory extends AnyRef
  24. case class TestBrowser(webDriver: WebDriver, baseUrl: Option[String]) extends FluentAdapter with Product with Serializable

    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.

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

    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.

  26. trait TestServerFactory extends AnyRef

    Creates a server for an application.

    Creates a server for an application.

    Annotations
    @ApiMayChange()
  27. trait Writeables extends AnyRef

Value Members

  1. object ApplicationFactory extends ApplicationFactories
    Annotations
    @ApiMayChange()
  2. object DefaultTestServerFactory extends DefaultTestServerFactory
    Annotations
    @ApiMayChange()
  3. object FakeRequest extends FakeRequestFactory

    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.

  4. 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
  5. object NoTemporaryFileCreator extends TemporaryFileCreator

    A temporary file creator with no implementation.

  6. object PlayRunners
  7. object ServerEndpointRecipe
    Annotations
    @ApiMayChange()
  8. object TestBrowser extends Serializable

    Helper utilities to build TestBrowsers

  9. object TestServer extends Serializable
  10. object WebDriverFactory

Inherited from AnyRef

Inherited from Any

Ungrouped