org.jboss.cdi.tck.impl.testng
Class SingleTestClassMethodInterceptor

java.lang.Object
  extended by org.jboss.cdi.tck.impl.testng.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.
    1. Author:
      Stuart Douglas, Martin Kouba

      Field Summary
      static String TEST_CLASS_PROPERTY
                 
       
      Constructor Summary
      SingleTestClassMethodInterceptor()
                 
       
      Method Summary
       List<org.testng.IMethodInstance> intercept(List<org.testng.IMethodInstance> methods, org.testng.ITestContext context)
                 
       
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
       

      Field Detail

      TEST_CLASS_PROPERTY

      public static final String TEST_CLASS_PROPERTY
      See Also:
      Constant Field Values
      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


      Copyright © 2008-2012 Seam Framework. All Rights Reserved.