Package play.test

Class TestServer

java.lang.Object
play.api.test.TestServer
play.test.TestServer
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class TestServer extends play.api.test.TestServer
A test web server.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestServer(int port, Application application)
    A test web server.
    TestServer(int port, Application application, int sslPort)
    A test web server with HTTPS support
  • Method Summary

    Modifier and Type
    Method
    Description
    The HTTP port that the server is running on.
    The HTTPS port that the server is running on.

    Methods inherited from class play.api.test.TestServer

    _1, _2, _3, application, apply, apply, apply$default$2, apply$default$3, apply$default$4, canEqual, config, copy, copy$default$1, copy$default$2, copy$default$3, equals, fromProduct, hashCode, isRunning, productArity, productElement, productElementName, productPrefix, runningAddress, runningHttpPort, runningHttpsPort, server, server_$eq, serverProvider, start, stop, toString, unapply

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface scala.Product

    productElementNames, productIterator
  • Constructor Details

    • TestServer

      public TestServer(int port, Application application)
      A test web server.
      Parameters:
      port - HTTP port to bind on.
      application - The Application to load in this server.
    • TestServer

      public TestServer(int port, Application application, int sslPort)
      A test web server with HTTPS support
      Parameters:
      port - HTTP port to bind on
      application - The Application to load in this server
      sslPort - HTTPS port to bind on
  • Method Details

    • getRunningHttpPort

      public OptionalInt getRunningHttpPort()
      The HTTP port that the server is running on.
    • getRunningHttpsPort

      public OptionalInt getRunningHttpsPort()
      The HTTPS port that the server is running on.