public abstract class LongPollingBrowser extends AbstractBrowser
| Constructor and Description |
|---|
LongPollingBrowser(DriverConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
MultiTestMethod |
awaitNextTest()
Blocks until JUnit notifies this browser session that either a new test must be executed (ie: executeTest() is called), or there are no
more tests (ie: notifyNoMoreTests() is called).
|
protected abstract void |
doStart() |
void |
executeTest(MultiTestMethod method)
Notifies this browser that the specified test must be executed.
|
long |
getId() |
MultiTestMethod |
getMethodUnderExecution()
Returns the test is currently being executed by this browser.
|
Set<Class<? extends AsyncProcess>> |
getSharedDependencies()
Returns a list of AsyncProcess that the JUnit session must start before attempting to start this browser.
|
protected String |
getStartPageUri(long browserId,
boolean persistent) |
protected String |
getStartPageUrl(long browserId,
boolean persistent) |
protected void |
markAsDead() |
void |
markAsDead(Throwable throwable,
String userAgent) |
void |
notifyNoMoreTests()
Notifies this browser that there are no more tests to execute.
|
protected void |
registerWithLongPollingServer() |
void |
sendNoMoreTestFixture(com.sun.net.httpserver.HttpExchange exchange)
Writes to the HTTP response the HTML and/or javascript code that is necessary for the browser understand that there will be no more tests.
|
void |
sendTestFixture(MultiTestMethod meth,
com.sun.net.httpserver.HttpExchange exchange)
Writes to the HTTP response the HTML and/or javascript code that is necessary for the browser to execute the specified test.
|
void |
start()
Starts the browser session.
|
appendScriptTag, buildProcess, buildResult, getConfig, isRunningOnWindows, processSet, sendResponse, startProcess, startProcess, stoppublic LongPollingBrowser(DriverConfiguration config)
protected String getStartPageUri(long browserId, boolean persistent)
protected String getStartPageUrl(long browserId, boolean persistent)
protected void registerWithLongPollingServer()
public void start()
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorprotected abstract void doStart()
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic MultiTestMethod awaitNextTest()
public void executeTest(MultiTestMethod method)
method - The test to execute.public void notifyNoMoreTests()
public MultiTestMethod getMethodUnderExecution()
public void sendTestFixture(MultiTestMethod meth, com.sun.net.httpserver.HttpExchange exchange) throws Exception
meth - The test to send to the browserexchange - contains the HTTP response that must be written toExceptionpublic void sendNoMoreTestFixture(com.sun.net.httpserver.HttpExchange exchange)
throws IOException
exchange - contains the HTTP response that must be written toIOExceptionpublic Set<Class<? extends AsyncProcess>> getSharedDependencies()
Browserprotected void markAsDead()
public long getId()
Copyright © 2015. All Rights Reserved.