org.apache.maven.surefire.providerapi
Interface SurefireProvider

All Known Implementing Classes:
JUnit3Provider, JUnit4Provider, JUnitCoreProvider, TestNGProvider

public interface SurefireProvider

Interface to be implemented by all Surefire providers. NOTE: This class is part of the proposed public api for surefire providers for 2.7. It may still be subject to changes, even for minor revisions. The api covers this interface and all the types reachable from it. And nothing else.

Called in one of three ways: Forkmode = never: getSuites is not called, invoke is called with null parameter Forkmode = once: getSuites is not called, invoke is called with null parameter Forkmode anything else: getSuites is called, invoke is called on new provider instance for each item in getSuites response.

Author:
Kristian Rosenvold

Method Summary
 Iterator getSuites()
          Called when forkmode is pertest, allows the provider to define what "pertest" will be.
 RunResult invoke(Object forkTestSet)
          The test that will be invoked through a fork; used only for forkmode=pertest, when the classpath scanning happens on the plugin-side.
 

Method Detail

getSuites

Iterator getSuites()
Called when forkmode is pertest, allows the provider to define what "pertest" will be.

Returns:
An iterator that will trigger one fork per item

invoke

RunResult invoke(Object forkTestSet)
                 throws TestSetFailedException,
                        ReporterException
The test that will be invoked through a fork; used only for forkmode=pertest, when the classpath scanning happens on the plugin-side. When this is set, the forked process will run only that test and not scan the classpath

Parameters:
forkTestSet - An item from the iterator in #getSuites
Returns:
A result of the invocation
Throws:
ReporterException - When reporting fails
TestSetFailedException - When testset fails


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