Package org.faktorips.runtime.test
Class AbstractIpsTestRunner
java.lang.Object
org.faktorips.runtime.test.AbstractIpsTestRunner
- All Implemented Interfaces:
IpsTestListener
- Direct Known Subclasses:
CmdLineIpsTestRunner
,SocketIpsTestRunner
Abstract class for all ips test runner implementation.
- Author:
- Joerg Ortmann
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
countTests
(String names) Counts all ips test cases in the given packages.
The format of the input string is:protected abstract List<IRuntimeRepository>
Creates the repositories.extractListFromString
(String input) protected ClassLoader
protected List<IRuntimeRepository>
Returns all stored repositories.
If the repositories currently not exists in memory create the repositories first.
The repository will be created by the to be implemented method:createRepositories()
getRepositoryListFromInputString
(String repositoryPackages) Returns a list of repository names from a given string of repositories.
The format of the input string is:Returns the repository packages namesgetTests()
Returns all tests.void
Run the all ips test cases in the given packages.
The format of the input string is:protected void
setAdditionalRepositoryPackages
(String additionalRepositoryPackages) Sets additional packages, will be used to create the ClassloaderRuntimeRepository which could be used in the runtime environment to obtain necessary objects.void
setClassLoader
(ClassLoader classLoader) Sets the classloader to find the test and instantiate the corresponding classes.void
setRepositoryPackages
(String repositoryPackages) Sets the repository packages namesstatic String
toStringFromList
(List<String> input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.faktorips.runtime.test.IpsTestListener
testFailureOccured, testFinished, testStarted
-
Constructor Details
-
AbstractIpsTestRunner
public AbstractIpsTestRunner()
-
-
Method Details
-
countTests
Counts all ips test cases in the given packages.
The format of the input string is:
{packageName in repository1}{packageName in repository2}{...}
- Throws:
Exception
- if an error occurs.
-
getTests
Returns all tests. -
getRepositories
Returns all stored repositories.
If the repositories currently not exists in memory create the repositories first.
The repository will be created by the to be implemented method:createRepositories()
- Throws:
Exception
- if an error occurs.
-
getClassLoader
-
setClassLoader
Sets the classloader to find the test and instantiate the corresponding classes. -
setRepositoryPackages
Sets the repository packages names -
getRepositoryPackages
Returns the repository packages names -
setAdditionalRepositoryPackages
Sets additional packages, will be used to create the ClassloaderRuntimeRepository which could be used in the runtime environment to obtain necessary objects. Format: {package1}{package2}{...}{packageN} -
run
Run the all ips test cases in the given packages.
The format of the input string is:
{packageName in repository1}{packageName in repository2}{...}
- Throws:
Exception
- if an error occurs.
-
getRepositoryListFromInputString
Returns a list of repository names from a given string of repositories.
The format of the input string is:
{repositoryName1}{repositoryName2}{...}
-
extractListFromString
-
toStringFromList
-
createRepositories
Creates the repositories. Where the test will be searched.- Throws:
Exception
-