package test
- Alphabetic
- By Inheritance
- test
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait DefaultAwaitTimeout extends AnyRef
- trait EssentialActionCaller extends AnyRef
-
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.
-
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.
-
class
FakeRequestFactory extends AnyRef
Helper methods for building FakeRequest values.
- trait FutureAwaits extends AnyRef
-
type
HasApp = AnyRef { def app: play.api.Application }
A structural type indicating there is an application.
-
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. -
trait
PlayRunners extends HttpVerbs
Helper functions to run tests.
-
trait
PlaySpecification extends SpecificationLike with PlayRunners with HeaderNames with Status with HttpProtocol with DefaultAwaitTimeout with ResultExtractors with Writeables with RouteInvokers with FutureAwaits with HttpVerbs
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.
-
type
Port = Int
Provided as an implicit by WithServer and WithBrowser.
- trait ResultExtractors extends AnyRef
- trait RouteInvokers extends EssentialActionCaller
- trait StubBodyParserFactory extends AnyRef
- trait StubControllerComponentsFactory extends StubPlayBodyParsersFactory with StubBodyParserFactory with StubMessagesFactory
- trait StubMessagesFactory extends AnyRef
- trait StubPlayBodyParsersFactory extends AnyRef
-
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.
-
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.
-
abstract
class
WithApplication extends Around with Scope
Used to run specs within the context of a running application.
-
abstract
class
WithApplicationLoader extends Around with Scope
Used to run specs within the context of a running application loaded by the given
ApplicationLoader
. -
abstract
class
WithBrowser[WEBDRIVER <: WebDriver] extends Around with Scope
Used to run specs within the context of a running server, and using a web browser
-
abstract
class
WithServer extends Around with Scope
Used to run specs within the context of a running server.
- trait Writeables extends AnyRef
-
trait
WsTestClient extends AnyRef
A standalone test client that is useful for running standalone integration tests.
Value Members
-
object
CSRFTokenHelper
Exposes methods to make using requests with CSRF tokens easier.
-
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.
- 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
-
object
NoMaterializer extends Materializer
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.
-
object
NoTemporaryFileCreator extends TemporaryFileCreator
A temporary file creator with no implementation.
- object PlayRunners
-
object
TestBrowser extends Serializable
Helper utilities to build TestBrowsers
- object TestServer extends Serializable
- object WebDriverFactory
- object WsTestClient extends WsTestClient