org.apache.maven.surefire.testng
Class TestNGProvider

java.lang.Object
  extended by org.apache.maven.surefire.providerapi.AbstractProvider
      extended by org.apache.maven.surefire.testng.TestNGProvider
All Implemented Interfaces:
SurefireProvider

public class TestNGProvider
extends AbstractProvider

Author:
Kristian Rosenvold

Constructor Summary
TestNGProvider(ProviderParameters booterParameters)
           
 
Method Summary
 java.util.Iterator getSuites()
          Determines the number of forks.
 RunResult invoke(java.lang.Object forkTestSet)
          Runs a forked test
 java.lang.Boolean isRunnable()
           
 
Methods inherited from class org.apache.maven.surefire.providerapi.AbstractProvider
cancel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestNGProvider

public TestNGProvider(ProviderParameters booterParameters)
Method Detail

isRunnable

public java.lang.Boolean isRunnable()

invoke

public RunResult invoke(java.lang.Object forkTestSet)
                 throws TestSetFailedException,
                        ReporterException
Description copied from interface: SurefireProvider
Runs a forked test

Parameters:
forkTestSet - An item from the iterator in #getSuites. Will be null for forkmode never or always. When this is non-null, the forked process will run only that test and probably not scan the classpath
Returns:
A result of the invocation
Throws:
TestSetFailedException - When testset fails
ReporterException - When reporting fails

getSuites

public java.util.Iterator getSuites()
Description copied from interface: SurefireProvider
Determines the number of forks. Called when forkmode is different from "never" or "always", allows the provider to define how to behave for the fork.

Returns:
An iterator that will trigger one fork per item


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.