Class SingleTestClassMethodInterceptor

  • All Implemented Interfaces:
    org.testng.IMethodInterceptor, org.testng.ITestNGListener

    public class SingleTestClassMethodInterceptor
    extends Object
    implements org.testng.IMethodInterceptor
    This IMethodInterceptor fixes one or the other problem with CDI TCK test suite execution:
    1. Run tests from single test class - it seems that Maven Surefire plugin is not able to run single test that is located outside src/test dir. If test class system property is set all test methods that don't belong to specified test class are excluded.
    2. Avoid randomly mixed test method execution - causing test archive deployments collisions. If test class system property is not set group test methods by test class.
      Author:
      Stuart Douglas, Martin Kouba
      • Constructor Detail

        • SingleTestClassMethodInterceptor

          public SingleTestClassMethodInterceptor()
      • Method Detail

        • intercept

          public List<org.testng.IMethodInstance> intercept​(List<org.testng.IMethodInstance> methods,
                                                            org.testng.ITestContext context)
          Specified by:
          intercept in interface org.testng.IMethodInterceptor