Package org.camunda.bpm
Class AbstractWebIntegrationTest
- java.lang.Object
-
- org.camunda.bpm.AbstractWebIntegrationTest
-
- Direct Known Subclasses:
AbstractWebappUiIntegrationTest
,CsrfPreventionIT
,DateSerializationIT
,ErrorPageIT
,ExceptionLoggerIT
,HttpHeaderSecurityIT
,PluginsRootResourceIT
,RestIT
,RestJaxRs2IT
,SessionCookieSameSiteIT
,SessionCookieSecurityIT
public abstract class AbstractWebIntegrationTest extends java.lang.Object
- Author:
- Daniel Meyer, Roman Smirnov
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
appBasePath
protected java.lang.String
appUrl
protected com.sun.jersey.client.apache4.ApacheHttpClient4
client
protected static java.lang.String
COOKIE_HEADER
protected java.lang.String
csrfToken
protected static java.lang.String
HOST_NAME
protected java.lang.String
httpPort
protected static java.lang.String
JSESSIONID_IDENTIFIER
protected static org.openqa.selenium.chrome.ChromeDriverService
service
protected java.lang.String
sessionId
protected static java.lang.String
TASKLIST_PATH
protected TestProperties
testProperties
protected TestUtil
testUtil
protected static java.lang.String
X_XSRF_TOKEN_HEADER
protected static java.lang.String
XSRF_TOKEN_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description AbstractWebIntegrationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
before()
void
createClient(java.lang.String ctxPath)
protected java.lang.String
createCookieHeader()
protected java.lang.String
createCookieHeader(java.lang.String csrf, java.lang.String session)
void
destroyClient()
protected java.lang.String
getCookie(java.util.List<java.lang.String> cookieValues, java.lang.String cookieName)
protected java.util.List<java.lang.String>
getCookieHeaders(com.sun.jersey.api.client.ClientResponse response)
protected java.lang.String
getCookieValue(com.sun.jersey.api.client.ClientResponse response, java.lang.String cookieName)
protected java.lang.String
getCookieValue(java.util.List<java.lang.String> cookies, java.lang.String cookieName)
protected java.lang.String
getRestCtxPath()
protected void
getTokens()
protected java.lang.String
getWebappCtxPath()
protected java.lang.String
getXsrfCookieValue(com.sun.jersey.api.client.ClientResponse response)
protected java.lang.String
getXsrfTokenHeader(com.sun.jersey.api.client.ClientResponse response)
protected void
preventRaceConditions()
-
-
-
Field Detail
-
TASKLIST_PATH
protected static final java.lang.String TASKLIST_PATH
- See Also:
- Constant Field Values
-
COOKIE_HEADER
protected static final java.lang.String COOKIE_HEADER
- See Also:
- Constant Field Values
-
X_XSRF_TOKEN_HEADER
protected static final java.lang.String X_XSRF_TOKEN_HEADER
- See Also:
- Constant Field Values
-
JSESSIONID_IDENTIFIER
protected static final java.lang.String JSESSIONID_IDENTIFIER
- See Also:
- Constant Field Values
-
XSRF_TOKEN_IDENTIFIER
protected static final java.lang.String XSRF_TOKEN_IDENTIFIER
- See Also:
- Constant Field Values
-
HOST_NAME
protected static final java.lang.String HOST_NAME
- See Also:
- Constant Field Values
-
appBasePath
protected java.lang.String appBasePath
-
appUrl
protected java.lang.String appUrl
-
testUtil
protected TestUtil testUtil
-
testProperties
protected TestProperties testProperties
-
service
protected static org.openqa.selenium.chrome.ChromeDriverService service
-
client
protected com.sun.jersey.client.apache4.ApacheHttpClient4 client
-
httpPort
protected java.lang.String httpPort
-
csrfToken
protected java.lang.String csrfToken
-
sessionId
protected java.lang.String sessionId
-
-
Method Detail
-
before
public void before() throws java.lang.Exception
- Throws:
java.lang.Exception
-
destroyClient
public void destroyClient()
-
createClient
public void createClient(java.lang.String ctxPath) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTokens
protected void getTokens()
-
getCookieHeaders
protected java.util.List<java.lang.String> getCookieHeaders(com.sun.jersey.api.client.ClientResponse response)
-
getCookie
protected java.lang.String getCookie(java.util.List<java.lang.String> cookieValues, java.lang.String cookieName)
-
createCookieHeader
protected java.lang.String createCookieHeader()
-
createCookieHeader
protected java.lang.String createCookieHeader(java.lang.String csrf, java.lang.String session)
-
getXsrfTokenHeader
protected java.lang.String getXsrfTokenHeader(com.sun.jersey.api.client.ClientResponse response)
-
getXsrfCookieValue
protected java.lang.String getXsrfCookieValue(com.sun.jersey.api.client.ClientResponse response)
-
getCookieValue
protected java.lang.String getCookieValue(com.sun.jersey.api.client.ClientResponse response, java.lang.String cookieName)
-
getCookieValue
protected java.lang.String getCookieValue(java.util.List<java.lang.String> cookies, java.lang.String cookieName)
-
preventRaceConditions
protected void preventRaceConditions() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
getWebappCtxPath
protected java.lang.String getWebappCtxPath()
-
getRestCtxPath
protected java.lang.String getRestCtxPath()
-
-