Class FluentTestRunnerAdapter

All Implemented Interfaces:
IFluentAdapter, TestRunnerAdapter, Configuration, ConfigurationMutator, ConfigurationProperties, InputControl, AlertControl, CapabilitiesControl, ComponentInstantiator, CssControl, EventsControl, FluentControl, FluentInjectControl, NavigationControl, PerformanceTimingControl, JavascriptControl, SearchControl<FluentWebElement>, SeleniumDriverControl, SnapshotControl, AwaitControl, ChromiumControl
Direct Known Subclasses:
FluentCucumberTest, FluentTest, FluentTest, FluentTestNg

public class FluentTestRunnerAdapter extends FluentAdapter implements TestRunnerAdapter
FluentLenium Test Runner Adapter.

Extends this class to provide FluentLenium support to your Test class.

  • Constructor Details

    • 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 Details

    • getTestClass

      public Class<?> getTestClass()
      Specified by:
      getTestClass in interface TestRunnerAdapter
      Returns:
      Class of currently running test
    • getTestMethodName

      public String getTestMethodName()
      Specified by:
      getTestMethodName in interface TestRunnerAdapter
      Returns:
      method name (as String) of currently running test
    • getClassAnnotation

      public <T extends Annotation> T getClassAnnotation (Class<T> annotation)
      Description copied from interface: TestRunnerAdapter
      Allows to access Class level annotation of currently running test
      Specified by:
      getClassAnnotation in interface TestRunnerAdapter
      Type Parameters:
      T - the class annotation
      Parameters:
      annotation - interface you want to access
      Returns:
      Annotation instance
    • getMethodAnnotation

      public <T extends Annotation> T getMethodAnnotation (Class<T> annotation)
      Description copied from interface: TestRunnerAdapter
      Allows to access method level annotation of currently running test
      Specified by:
      getMethodAnnotation in interface TestRunnerAdapter
      Type Parameters:
      T - the method annotation
      Parameters:
      annotation - interface you want to access
      Returns:
      Annotation instance
    • 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
    • classDriverCleanup

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