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.StringappBasePathprotected java.lang.StringappUrlprotected com.sun.jersey.client.apache4.ApacheHttpClient4clientprotected static java.lang.StringCOOKIE_HEADERprotected java.lang.StringcsrfTokenprotected static java.lang.StringHOST_NAMEprotected java.lang.StringhttpPortprotected static java.lang.StringJSESSIONID_IDENTIFIERprotected static org.openqa.selenium.chrome.ChromeDriverServiceserviceprotected java.lang.StringsessionIdprotected static java.lang.StringTASKLIST_PATHprotected TestPropertiestestPropertiesprotected TestUtiltestUtilprotected static java.lang.StringX_XSRF_TOKEN_HEADERprotected static java.lang.StringXSRF_TOKEN_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description AbstractWebIntegrationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbefore()voidcreateClient(java.lang.String ctxPath)protected java.lang.StringcreateCookieHeader()protected java.lang.StringcreateCookieHeader(java.lang.String csrf, java.lang.String session)voiddestroyClient()protected java.lang.StringgetCookie(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.StringgetCookieValue(com.sun.jersey.api.client.ClientResponse response, java.lang.String cookieName)protected java.lang.StringgetCookieValue(java.util.List<java.lang.String> cookies, java.lang.String cookieName)protected java.lang.StringgetRestCtxPath()protected voidgetTokens()protected java.lang.StringgetWebappCtxPath()protected java.lang.StringgetXsrfCookieValue(com.sun.jersey.api.client.ClientResponse response)protected java.lang.StringgetXsrfTokenHeader(com.sun.jersey.api.client.ClientResponse response)protected voidpreventRaceConditions()
-
-
-
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()
-
-