Class SlingRemoteExecutionRule

  • All Implemented Interfaces:
    org.apache.sling.testing.tools.http.RequestCustomizer, org.junit.rules.MethodRule

    public class SlingRemoteExecutionRule
    extends java.lang.Object
    implements org.junit.rules.MethodRule, org.apache.sling.testing.tools.http.RequestCustomizer
    JUnit MethodRule that executes tests remotely if the SLING_REMOTE_TEST_URL property is set. Used to execute tests from an IDE and have then run on a remote Sling instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, java.lang.Object target)  
      void customizeRequest​(org.apache.sling.testing.tools.http.Request r)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SLING_REMOTE_TEST_URL

        public static final java.lang.String SLING_REMOTE_TEST_URL
        Name of the system property that activates remote test execution
        See Also:
        Constant Field Values
      • SLING_REMOTE_TEST_USERNAME

        public static final java.lang.String SLING_REMOTE_TEST_USERNAME
        See Also:
        Constant Field Values
      • SLING_REMOTE_TEST_PASSWORD

        public static final java.lang.String SLING_REMOTE_TEST_PASSWORD
        See Also:
        Constant Field Values
    • Constructor Detail

      • SlingRemoteExecutionRule

        public SlingRemoteExecutionRule()
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runners.model.FrameworkMethod method,
                                                       java.lang.Object target)
        Specified by:
        apply in interface org.junit.rules.MethodRule
      • customizeRequest

        public void customizeRequest​(org.apache.sling.testing.tools.http.Request r)
        Specified by:
        customizeRequest in interface org.apache.sling.testing.tools.http.RequestCustomizer