Class TestDescriptionInterceptor
- java.lang.Object
-
- org.apache.sling.testing.clients.interceptors.TestDescriptionInterceptor
-
- All Implemented Interfaces:
org.apache.http.HttpRequestInterceptor
public class TestDescriptionInterceptor extends java.lang.Object implements org.apache.http.HttpRequestInterceptorHttpClient interceptor that propagates the current test name as part HTTP request headers. Headers can then be logged, exported as MDC info etc. byTestNameLoggingFilter. Meant to help in correlating the server side logs with the test case being executed.- See Also:
http://www.slf4j.org/manual.html
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTEST_CLASS_HEADERstatic java.lang.StringTEST_NAME_HEADER
-
Constructor Summary
Constructors Constructor Description TestDescriptionInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext)
-
-
-
Field Detail
-
TEST_CLASS_HEADER
public static final java.lang.String TEST_CLASS_HEADER
- See Also:
- Constant Field Values
-
TEST_NAME_HEADER
public static final java.lang.String TEST_NAME_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
process
public void process(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext) throws org.apache.http.HttpException, java.io.IOException- Specified by:
processin interfaceorg.apache.http.HttpRequestInterceptor- Throws:
org.apache.http.HttpExceptionjava.io.IOException
-
-