Package org.jboss.arquillian.spi

Examples of org.jboss.arquillian.spi.TestRunner


         // [TODO] Remove this hack when it becomes possible to pass data to the enrichers
         ResourceCallbackHandlerAssociation.setCallbackHandler(this);

         // Get the TestRunner
         ClassLoader serviceClassLoader = getTestClassLoader().getServiceClassLoader();
         TestRunner runner = TestRunners.getTestRunner(serviceClassLoader);
         Class<?> testClass = getTestClassLoader().loadTestClass(className);

         ClassLoader oldThreadContextCL = SecurityActions.getThreadContextClassLoader();
         try
         {
            DynamicServiceLoader.setClassLoaderAssociation(serviceClassLoader);
            SecurityActions.setThreadContextClassLoader(SecurityActions.getClassLoader(testClass));
            TestResult testResult = runner.execute(testClass, methodName);
            return testResult;
         }
         finally
         {
            SecurityActions.setThreadContextClassLoader(oldThreadContextCL);
View Full Code Here


            throw new IllegalArgumentException(PARA_METHOD_NAME + " must be specified");
         }
        
         Class<?> testClass = SecurityActions.getThreadContextClassLoader().loadClass(className);
        
         TestRunner runner = TestRunners.getTestRunner();
        
         TestResult testResult = runner.execute(testClass, methodName);

         if(OUTPUT_MODE_SERIALIZED.equalsIgnoreCase(outputMode))
         {
            writeObject(testResult, response);
         }
View Full Code Here

            throw new IllegalArgumentException(PARA_METHOD_NAME + " must be specified");
         }
        
         Class<?> testClass = SecurityActions.getThreadContextClassLoader().loadClass(className);
        
         TestRunner runner = TestRunners.getTestRunner();
        
         TestResult testResult = runner.execute(testClass, methodName);

         if(OUTPUT_MODE_SERIALIZED.equalsIgnoreCase(outputMode))
         {
            writeObject(testResult, response);
         }
View Full Code Here

            throw new IllegalArgumentException(PARA_METHOD_NAME + " must be specified");
         }
        
         Class<?> testClass = SecurityActions.getThreadContextClassLoader().loadClass(className);
        
         TestRunner runner = TestRunners.getTestRunner();
        
         TestResult testResult = runner.execute(testClass, methodName);

         if(OUTPUT_MODE_SERIALIZED.equalsIgnoreCase(outputMode))
         {
            writeObject(testResult, response);
         }
View Full Code Here

         // [TODO] Remove this hack when it becomes possible to pass data to the enrichers
         ResourceCallbackHandlerAssociation.setCallbackHandler(this);

         // Get the TestRunner
         ClassLoader serviceClassLoader = getTestClassLoader().getServiceClassLoader();
         TestRunner runner = TestRunners.getTestRunner(serviceClassLoader);
         Class<?> testClass = getTestClassLoader().loadTestClass(className);

         ClassLoader oldThreadContextCL = SecurityActions.getThreadContextClassLoader();
         try
         {
            DynamicServiceLoader.setClassLoaderAssociation(serviceClassLoader);
            SecurityActions.setThreadContextClassLoader(SecurityActions.getClassLoader(testClass));
            testResult = runner.execute(testClass, methodName);
         }
         finally
         {
            SecurityActions.setThreadContextClassLoader(oldThreadContextCL);
            DynamicServiceLoader.setClassLoaderAssociation(null);
View Full Code Here

   private TestResult runTestMethodInternal(String className, String methodName)
   {
      try
      {
         TestRunner runner = TestRunners.getTestRunner(JMXTestRunner.class.getClassLoader());
         Class<?> testClass = testClassLoader.loadTestClass(className);
        
         TestResult testResult = runner.execute(testClass, methodName);
         return testResult;
      }
      catch (Throwable th)
      {
         return new TestResult(Status.FAILED, th);
View Full Code Here

            throw new IllegalArgumentException(PARA_METHOD_NAME + " must be specified");
         }
        
         Class<?> testClass = SecurityActions.getThreadContextClassLoader().loadClass(className);
        
         TestRunner runner = TestRunners.getTestRunner();
        
         TestResult testResult = runner.execute(testClass, methodName);

         if(OUTPUT_MODE_SERIALIZED.equalsIgnoreCase(outputMode))
         {
            writeObject(testResult, response);
         }
View Full Code Here

         // This hack associates the MBeanServer that this runner is registered with
         // with the current Thread so that other components (e.g. OSGiTestEnricher)
         // are gurantied to use the same MBeanServer. This issue showed up in AS7.
         mbeanServerAssociation.set(mbeanServer);
        
         TestRunner runner = TestRunners.getTestRunner(JMXTestRunner.class.getClassLoader());
         Class<?> testClass = testClassLoader.loadTestClass(className);
        
         TestResult testResult = runner.execute(testClass, methodName);
         return testResult;
      }
      catch (Throwable th)
      {
         return new TestResult(Status.FAILED, th);
View Full Code Here

            throw new IllegalArgumentException(PARA_METHOD_NAME + " must be specified");
         }
        
         Class<?> testClass = SecurityActions.getThreadContextClassLoader().loadClass(className);
        
         TestRunner runner = TestRunners.getTestRunner();
         runner.setExecutionMode(ExecutionMode.CONTAINER);
        
         TestResult testResult = runner.execute(testClass, methodName);

         if(OUTPUT_MODE_SERIALIZED.equalsIgnoreCase(outputMode))
         {
            writeObject(testResult, response);
         }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.TestRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.