Class XWikiExecutorTestMethodFilter

  • public class XWikiExecutorTestMethodFilter
    extends org.junit.runner.manipulation.Filter
    Filter to be applied on XWikiExecutorSuite's executed Runners (i.e. test classes).

    Each child runner (i.e. test method) of a test class is compared with a pattern to see if it shouldRun(Description) during this test execution.

    The "pattern" System Property is a regex that gets applied to values such as:


    Examples of valid patterns:

    run all tests from the matching test class(es) (that contain(s) "Test1" in its name)
    run all tests from 2 test classes
    run just matching method(s) from matching test class(es)
    run just matching methods from matching test classes (more than just 1 class)
    mix it; run just matching methods from the first matching class(es) and ALL tests from the second matching class(es)
    $Id: 4d7ad58e7e307a26fc14c0d4fdbc49511172b1d1 $
    • Field Detail

      • pattern

        protected String pattern
    • Constructor Detail

      • XWikiExecutorTestMethodFilter

        public XWikiExecutorTestMethodFilter​(String pattern)
        pattern - the pattern to use when filtering a runner's children (i.e. test methods).
    • Method Detail

      • getPattern

        public String getPattern()
        the pattern to use when filtering a Runner's children (i.e. test methods).
      • setPattern

        public void setPattern​(String pattern)
        pattern - the new pattern to use.
      • shouldRun

        public boolean shouldRun​(org.junit.runner.Description description)
        Specified by:
        shouldRun in class org.junit.runner.manipulation.Filter
      • describe

        public String describe()
        Specified by:
        describe in class org.junit.runner.manipulation.Filter