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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidsucceeded(org.junit.runner.Description description) Get ready for writing in diagnosis file.voidWrite 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:
succeededin classorg.junit.rules.TestWatcher
-
failed
- Overrides:
failedin classorg.junit.rules.TestWatcher
-