Class FailureDiagnostics
java.lang.Object
org.junit.rules.TestWatcher
org.jenkinsci.test.acceptance.junit.FailureDiagnostics
- All Implemented Interfaces:
org.junit.rules.TestRule
@GlobalRule(priority=-2147483648)
@TestScope
public class FailureDiagnostics
extends org.junit.rules.TestWatcher
Attach diagnostic file related to a test failure.
The harness can attach any number of diagnostic files to be stored in /target/diagnostics/$TEST_NAME/. The same 'kind' of diagnostic information is expected to use the same file/subdir name.
- Author:
- ogondza
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
succeeded
(org.junit.runner.Description description) Get ready for writing in diagnosis file.void
Write string in diagnostic file.Methods inherited from class org.junit.rules.TestWatcher
apply, finished, skipped, skipped, starting
-
Constructor Details
-
FailureDiagnostics
-
-
Method Details
-
touch
Get ready for writing in diagnosis file. -
write
Write string in diagnostic file.- Parameters:
filename
- Name of the filecontent
- Content to write.
-
mkdirs
-
succeeded
protected void succeeded(org.junit.runner.Description description) - Overrides:
succeeded
in classorg.junit.rules.TestWatcher
-
failed
- Overrides:
failed
in classorg.junit.rules.TestWatcher
-