Class ConditionalFilter

  • All Implemented Interfaces:
    ExecutionFilter

    @Component("tapirConditionalFilter")
    public class ConditionalFilter
    extends java.lang.Object
    implements ExecutionFilter
    The ConditionalFilter filters test suites, classes and steps from the tapir execution model based on Conditional annotations. The elements, whose conditions are tested negative, are filtered out.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldFilterClass​(TestClass testClass, java.lang.Object testInstance)
      Checks if the given testClass should be filtered.
      boolean shouldFilterStep​(TestStep testStep, java.lang.Object testInstance)
      Checks if the given testStep should be filtered.
      boolean shouldFilterSuite​(TestSuite testSuite, java.lang.Object testInstance)
      Checks if the given testSuite should be filtered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConditionalFilter

        public ConditionalFilter()
    • Method Detail

      • shouldFilterSuite

        public boolean shouldFilterSuite​(TestSuite testSuite,
                                         java.lang.Object testInstance)
        Description copied from interface: ExecutionFilter
        Checks if the given testSuite should be filtered.
        Specified by:
        shouldFilterSuite in interface ExecutionFilter
        Parameters:
        testSuite - the test suite which might be filtered
        testInstance - the test suite instance
        Returns:
        true, if the test suite should be excluded from the execution plan, otherwise false
      • shouldFilterClass

        public boolean shouldFilterClass​(TestClass testClass,
                                         java.lang.Object testInstance)
        Description copied from interface: ExecutionFilter
        Checks if the given testClass should be filtered.
        Specified by:
        shouldFilterClass in interface ExecutionFilter
        Parameters:
        testClass - the test class which might be filtered
        testInstance - the test class instance
        Returns:
        true, if the test class should be excluded from the execution plan, otherwise false
      • shouldFilterStep

        public boolean shouldFilterStep​(TestStep testStep,
                                        java.lang.Object testInstance)
        Description copied from interface: ExecutionFilter
        Checks if the given testStep should be filtered.
        Specified by:
        shouldFilterStep in interface ExecutionFilter
        Parameters:
        testStep - the test step which might be filtered
        testInstance - the test class instance
        Returns:
        true, if the test step should be excluded from the execution plan, otherwise false