org.apache.sling.testing.tools.junit

## Class RemoteLogDumper

- java.lang.Object
- - org.junit.rules.TestWatcher
  - - org.apache.sling.testing.tools.junit.RemoteLogDumper

All Implemented Interfaces:
  org.junit.rules.TestRule

    public class RemoteLogDumper
    extends org.junit.rules.TestWatcher

The RemoteLogDumper Rule fetches logs which are generated due to execution of test from the remote server and dumps them locally upon test failure. This simplifies determining failure cause by providing all required data locally. This would be specially useful when running test in CI server where server logs gets cluttered with all other test executions

         public class LoginTestIT {

         @Rule
         public TestRule logDumper = new RemoteLogDumper();

         @Test
         public void remoteLogin() {
              //Make calls to remote server
              assertEquals("testA", name.getMethodName());
         }

         }

### Field Summary

Fields
`static String` `TEST_CLASS`
`static String` `TEST_NAME`

### Constructor Summary

Constructors
Constructor and Description
`RemoteLogDumper()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `failed(Throwable e, org.junit.runner.Description description)`
`protected void` `finished(org.junit.runner.Description description)`
`protected void` `starting(org.junit.runner.Description description)`

### Methods inherited from class org.junit.rules.TestWatcher

`apply, skipped, succeeded`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TEST_CLASS

    public static final String TEST_CLASS

See Also:
  Constant Field Values

#### TEST_NAME

    public static final String TEST_NAME

See Also:
  Constant Field Values

### Constructor Detail

#### RemoteLogDumper

    public RemoteLogDumper()

### Method Detail

#### finished

    protected void finished(org.junit.runner.Description description)

Overrides:
  `finished` in class `org.junit.rules.TestWatcher`

#### starting

    protected void starting(org.junit.runner.Description description)

Overrides:
  `starting` in class `org.junit.rules.TestWatcher`

#### failed

    protected void failed(Throwable e,
                          org.junit.runner.Description description)

Overrides:
  `failed` in class `org.junit.rules.TestWatcher`