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. case class FakeRequest[A](method: String, uri: String, headers: Headers, body: A, remoteAddress: String = "127.0.0.1", version: String = "HTTP/1.1", id: Long = 666, tags: Map[String, String] = Map.empty[String, String], secure: Boolean = false, clientCertificateChain: Option[Seq[X509Certificate]] = None) extends Request[A] with Product with Serializable

    Permalink

    Fake HTTP request implementation.

    Fake HTTP request implementation.

    A

    The body type.

    method

    The request HTTP method.

    uri

    The request uri.

    headers

    The request HTTP headers.

    body

    The request body.

    remoteAddress

    The client IP.

  5. trait FutureAwaits extends AnyRef

    Permalink
  6. trait PlayRunners extends HttpVerbs

    Permalink

    Helper functions to run tests.

  7. trait PlaySpecification extends Specification 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.

  8. type Port = Int

    Permalink

    Provided as an implicit by WithServer and WithBrowser.

  9. trait ResultExtractors extends AnyRef

    Permalink
  10. trait RouteInvokers extends EssentialActionCaller

    Permalink
  11. 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.

  12. case class TestServer(port: Int, application: Application = GuiceApplicationBuilder().build(), sslPort: Option[Int] = None, serverProvider: Option[ServerProvider] = None) extends Product with Serializable

    Permalink

    A test web server.

    A test web server.

    port

    HTTP port to bind on.

    application

    The Application to load in this server.

    sslPort

    HTTPS port to bind on.

    serverProvider

    *Experimental API; subject to change* The type of server to use. If not provided, uses Play's default provider.

  13. abstract class WithApplication extends Around with Scope

    Permalink

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

  14. abstract class WithApplicationLoader extends Around with Scope

    Permalink

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

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

  16. abstract class WithServer extends Around with Scope

    Permalink

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

  17. trait Writeables extends AnyRef

    Permalink
  18. trait WsTestClient extends AnyRef

    Permalink
  19. case class FakeApplication(path: File = new java.io.File("."), classloader: ClassLoader = ..., additionalConfiguration: Map[String, _] = Map.empty, withGlobal: Option[GlobalSettings] = None, withRoutes: PartialFunction[(String, String), Handler] = PartialFunction.empty) extends Application with Product with Serializable

    Permalink

    A Fake application.

    A Fake application.

    path

    The application path

    classloader

    The application classloader

    additionalConfiguration

    Additional configuration

    withRoutes

    A partial function of method name and path to a handler for handling the request

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use GuiceApplicationBuilder instead.

Value Members

  1. object FakeRequest extends Serializable

    Permalink

    Helper utilities to build FakeRequest values.

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

    Permalink
  3. object PlayRunners

    Permalink
  4. object TestBrowser extends Serializable

    Permalink

    Helper utilities to build TestBrowsers

  5. object TestServer extends Serializable

    Permalink
  6. object WebDriverFactory

    Permalink
  7. object WsTestClient extends WsTestClient

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped