ScalatraTests

org.scalatra.test.ScalatraTests

Provides a framework-agnostic way to test your Scalatra app. You probably want to extend this with either org.scalatra.test.scalatest.ScalatraSuite or org.scalatra.test.specs.ScalatraSpecification.

Cookies are crudely supported within session blocks. No attempt is made to match domains, paths, or max-ages; the request sends a Cookie header to match whatever Set-Cookie call it received on the previous response.

Attributes

Graph
Supertypes
trait Client
trait Container
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def addFilter(filter: Class[_ <: Filter], path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def addFilter(filter: Class[_ <: Filter], path: String): FilterHolder

Attributes

Inherited from:
JettyContainer
def addFilter(filter: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: Class[_ <: HttpServlet], path: String): ServletHolder

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String, name: String): Unit

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String): Unit

Attributes

Inherited from:
JettyContainer
def baseUrl: String

Attributes

Inherited from:
EmbeddedJettyContainer
def body: String

Attributes

Inherited from:
Client
def bodyBytes: Array[Byte]

Attributes

Inherited from:
Client
def connect[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def contextPath: String

Attributes

Inherited from:
EmbeddedJettyContainer
def createBody(name: String, content: Any): UploadableBody

Attributes

Inherited from:
HttpComponentsClient
protected def createClient: CloseableHttpClient

Attributes

Inherited from:
HttpComponentsClient
def delete[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def get[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def get[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def head[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def head[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def header: header.type

Attributes

Inherited from:
Client
def localPort: Option[Int]

The port of the currently running Jetty. May differ from port if port is 0.

The port of the currently running Jetty. May differ from port if port is 0.

Attributes

Returns

Some port if Jetty is currently listening, or None if it is not.

Inherited from:
EmbeddedJettyContainer
def mount(app: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String, name: String): Unit

Attributes

Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String): Unit

Attributes

Inherited from:
JettyContainer
def mount(klass: Class[_], path: String): Holder[_ >: Servlet & Filter <: Servlet | Filter]

Attributes

Inherited from:
JettyContainer
def options[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def port: Int

Sets the port to listen on. 0 means listen on any available port.

Sets the port to listen on. 0 means listen on any available port.

Attributes

Inherited from:
EmbeddedJettyContainer
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client

Returns the current response within the scope of the submit method.

Returns the current response within the scope of the submit method.

Attributes

Inherited from:
Client
def session[A](f: => A): A

Attributes

Inherited from:
HttpComponentsClient
def skipDefaultServlet: Boolean

Attributes

Inherited from:
JettyContainer
def start(): Unit

Attributes

Inherited from:
EmbeddedJettyContainer
def status: Int

Attributes

Inherited from:
Client
def stop(): Unit

Attributes

Inherited from:
EmbeddedJettyContainer
def submit[A](method: String, path: String, queryParams: Iterable[(String, String)], headers: Iterable[(String, String)], body: Array[Byte])(f: => A): A

Attributes

Inherited from:
HttpComponentsClient
protected def submitMultipart[A](method: String, path: String, params: Iterable[(String, String)], headers: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
HttpComponentsClient
def trace[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
protected def withResponse[A](res: ClientResponse)(f: => A): A

Attributes

Inherited from:
Client

Inherited fields

protected val httpComponentsRequestConfig: RequestConfig

Can be overridden RequestConfig

Can be overridden RequestConfig

Attributes

Inherited from:
HttpComponentsClient
var resourceBasePath: String

Attributes

Inherited from:
Container
lazy val server: Server

Attributes

Inherited from:
EmbeddedJettyContainer
lazy val servletContextHandler: ServletContextHandler

Attributes

Inherited from:
EmbeddedJettyContainer

Implicits

Inherited implicits

implicit def stringToByteArray(str: String): Array[Byte]

Attributes

Inherited from:
ImplicitConversions