PlayRunners

play.api.test.PlayRunners
See thePlayRunners companion object
trait PlayRunners extends HttpVerbs

Helper functions to run tests.

Attributes

Companion
object
Graph
Supertypes
trait HttpVerbs
class Object
trait Matchable
class Any
Known subtypes
object Helpers

Members list

Value members

Concrete methods

def inMemoryDatabase(name: String, options: Map[String, String]): Map[String, String]

Constructs a in-memory (h2) database configuration to add to an Application.

Constructs a in-memory (h2) database configuration to add to an Application.

Attributes

def running[T]()(block: Application => T): T
def running[T](app: Application)(block: => T): T

Executes a block of code in a running application.

Executes a block of code in a running application.

Attributes

def running[T](testServer: TestServer)(block: => T): T

Executes a block of code in a running server.

Executes a block of code in a running server.

Attributes

def running[T, WEBDRIVER <: WebDriver](testServer: TestServer, webDriver: Class[WEBDRIVER])(block: TestBrowser => T): T

Executes a block of code in a running server, with a test browser.

Executes a block of code in a running server, with a test browser.

Attributes

def running[T](testServer: TestServer, webDriver: WebDriver)(block: TestBrowser => T): T

Executes a block of code in a running server, with a test browser.

Executes a block of code in a running server, with a test browser.

Attributes

def runningWithPort[T](testServer: TestServer)(block: Int => T): T

Executes a block of code in a running server, with a port. If available the http port will be used first, before falling back to the https port.

Executes a block of code in a running server, with a port. If available the http port will be used first, before falling back to the https port.

Attributes

def runningWithPort[T, WEBDRIVER <: WebDriver](testServer: TestServer, webDriver: Class[WEBDRIVER])(block: (TestBrowser, Int) => T): T

Executes a block of code in a running server, with a test browser and a port.

Executes a block of code in a running server, with a test browser and a port.

Attributes

def runningWithPort[T](testServer: TestServer, webDriver: WebDriver)(block: (TestBrowser, Int) => T): T

Executes a block of code in a running server, with a test browser and a port. If available the http port will be used first, before falling back to the https port.

Executes a block of code in a running server, with a test browser and a port. If available the http port will be used first, before falling back to the https port.

Attributes

The port to use for a test server. Defaults to a random port. May be configured using the system property testserver.port

The port to use for a test server. Defaults to a random port. May be configured using the system property testserver.port

Attributes

Concrete fields

val FIREFOX: Class[FirefoxDriver]
val HTMLUNIT: Class[HtmlUnitDriver]

The base builder used in the running method.

The base builder used in the running method.

Attributes

Inherited fields

val DELETE: String

Attributes

Inherited from:
HttpVerbs
val GET: String

Attributes

Inherited from:
HttpVerbs
val HEAD: String

Attributes

Inherited from:
HttpVerbs
val OPTIONS: String

Attributes

Inherited from:
HttpVerbs
val PATCH: String

Attributes

Inherited from:
HttpVerbs
val POST: String

Attributes

Inherited from:
HttpVerbs
val PUT: String

Attributes

Inherited from:
HttpVerbs