Class HarRecorder
java.lang.Object
org.junit.rules.TestWatcher
org.jenkinsci.test.acceptance.recorder.HarRecorder
- All Implemented Interfaces:
org.junit.rules.TestRule
The system property RECORD_BROWSER_TRAFFIC can be set to either off, failuresOnly or always to control when browser
traffic should be recorded when launching tests.
Traffic is recorded as a HAR (HAR file format) file based on all network interactions between the
browser and the Jenkins instance and then add it as JUnit attachment to the test result.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
static com.browserup.bup.BrowserUpProxy
getProxy
(InetAddress networkAddress, String testName) Create a proxy to record the HAR listening on the specified addressstatic boolean
protected void
starting
(org.junit.runner.Description description) protected void
succeeded
(org.junit.runner.Description description) Methods inherited from class org.junit.rules.TestWatcher
apply, finished, skipped, skipped
-
Constructor Details
-
HarRecorder
-
-
Method Details
-
getProxy
public static com.browserup.bup.BrowserUpProxy getProxy(InetAddress networkAddress, String testName) Create a proxy to record the HAR listening on the specified address- Parameters:
networkAddress
- the specific address to bind to, ornull
to bind on all addresses
-
isCaptureHarEnabled
public static boolean isCaptureHarEnabled() -
succeeded
protected void succeeded(org.junit.runner.Description description) - Overrides:
succeeded
in classorg.junit.rules.TestWatcher
-
failed
- Overrides:
failed
in classorg.junit.rules.TestWatcher
-
starting
protected void starting(org.junit.runner.Description description) - Overrides:
starting
in classorg.junit.rules.TestWatcher
-