Class FluentTestRunnerAdapter

    • Constructor Detail

      • FluentTestRunnerAdapter

        public FluentTestRunnerAdapter()
        Creates a new test runner adapter.
      • FluentTestRunnerAdapter

        public FluentTestRunnerAdapter​(FluentControlContainer driverContainer)
        Creates a test runner adapter, with a custom driver container.
        Parameters:
        driverContainer - driver container
      • FluentTestRunnerAdapter

        public FluentTestRunnerAdapter​(SharedMutator sharedMutator)
        Creates a test runner adapter, with a custom shared mutator.
        Parameters:
        sharedMutator - shared mutator.
      • FluentTestRunnerAdapter

        public FluentTestRunnerAdapter​(FluentControlContainer driverContainer,
                                       SharedMutator sharedMutator)
        Creates a test runner adapter, with a customer driver container and a customer shared mutator.
        Parameters:
        driverContainer - driver container
        sharedMutator - shared mutator
      • FluentTestRunnerAdapter

        public FluentTestRunnerAdapter​(FluentControlContainer driverContainer,
                                       Class clazz,
                                       SharedMutator sharedMutator)
        Creates a test runner adapter, with a customer driver container and a customer shared mutator. It is possible to pass class from which the FluentConfiguration annotation will be loaded.
        Parameters:
        driverContainer - driver container
        clazz - class from which FluentConfiguration annotation will be loaded
        sharedMutator - shared mutator
    • Method Detail

      • afterClass

        public static void afterClass​(Class<?> testClass)
        Invoked when a test class has finished (whatever the success of failing status)
        Parameters:
        testClass - test class to terminate
      • getTestClass

        protected Class<?> getTestClass()
        Returns:
        Class of currently running test
      • getTestMethodName

        protected String getTestMethodName()
        Returns:
        method name (as String) of currently running test
      • getClassAnnotation

        protected <T extends Annotation> T getClassAnnotation​(Class<T> annotation)
        Allows to access Class level annotation of currently running test
        Type Parameters:
        T - the class annotation
        Parameters:
        annotation - interface you want to access
        Returns:
        Annotation instance
        Throws:
        AnnotationNotFoundException - when annotation you want to access couldn't be find
      • getMethodAnnotation

        protected <T extends Annotation> T getMethodAnnotation​(Class<T> annotation)
        Allows to access method level annotation of currently running test
        Type Parameters:
        T - the method annotation
        Parameters:
        annotation - interface you want to access
        Returns:
        Annotation instance
        Throws:
        AnnotationNotFoundException - of annotation you want to access couldn't be found
        MethodNotFoundException - if test method couldn't be found - if it occurs that's most likely FL bug
      • starting

        protected void starting()
        Invoked when a test method is starting.
      • starting

        protected void starting​(String testName)
        Invoked when a test method is starting.
        Parameters:
        testName - Test name
      • starting

        protected void starting​(Class<?> testClass)
        Invoked when a test method is starting.
        Parameters:
        testClass - Test class
      • starting

        protected void starting​(Class<?> testClass,
                                String testName)
        Invoked when a test method is starting.
        Parameters:
        testClass - Test class
        testName - Test name
      • finished

        protected void finished()
        Invoked when a test method has finished (whatever the success of failing status)
      • finished

        protected void finished​(String testName)
        Invoked when a test method has finished (whatever the success of failing status)
        Parameters:
        testName - Test name
      • finished

        protected void finished​(Class<?> testClass)
        Invoked when a test method has finished (whatever the success of failing status)
        Parameters:
        testClass - Test class
      • finished

        protected void finished​(Class<?> testClass,
                                String testName)
        Invoked when a test method has finished (whatever the success of failing status)
        Parameters:
        testClass - Test class
        testName - Test name
      • failed

        protected void failed()
        Invoked when a test method has failed (before finished)
      • failed

        protected void failed​(String testName)
        Invoked when a test method has failed (before finished)
        Parameters:
        testName - Test name
      • failed

        protected void failed​(Class<?> testClass)
        Invoked when a test method has failed (before finished)
        Parameters:
        testClass - Test class
      • failed

        protected void failed​(Class<?> testClass,
                              String testName)
        Invoked when a test method has failed (before finished)
        Parameters:
        testClass - Test class
        testName - Test name
      • failed

        protected void failed​(Throwable e,
                              Class<?> testClass,
                              String testName)
        Invoked when a test method has failed (before finished)
        Parameters:
        e - Throwable thrown by the failing test.
        testClass - Test class
        testName - Test name