Class FuncTestSuite
java.lang.Object
com.atlassian.jira.functest.framework.FuncTestSuite
- Direct Known Subclasses:
FuncTestSuiteStreams
A base class for JIRA functional test suites. It handles TestCase classes and ensures that a test instance is never
added more than once. It also keeps track of the various JIRA editions and what test should run within them.
Under the covers it uses LinkedHashSets which means the test are maintained in "insertion order" but no test is returned more than once.
- Since:
- v4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBundledPluginsTest
(Class<?> testClass) This will add the test class into the suite as a bundled plugins 2.0 test only.addBundledPluginsTests
(List<Class<?>> testClasses) This will add the test class into the suite.addTests
(Collection<Class<?>> testClasses) This will add a collection of test classes into the suite as a STANDARD, PROFESSIONAL and ENTERPRISE tests.protected TestSuiteBuilder
junit.framework.TestSuite
This gets the test suite based on the func test settings that you currently have.junit.framework.TestSuite
createTest
(JIRAEnvironmentData environment) This gets the suite of tests based on the passed environment.getTestClasses
(String packageName, boolean recursive) Returns all test classes in a package, excluding any that are marked with @Ignore.getTests
(JIRAEnvironmentData environmentData) Returns a set of test classes that are deemed as test that should run on based on the JIRA edition inside the JIRAEnvironmentData object.
-
Constructor Details
-
FuncTestSuite
public FuncTestSuite()
-
-
Method Details
-
createTest
public junit.framework.TestSuite createTest()This gets the test suite based on the func test settings that you currently have.- Returns:
- a suite of test classes to run
-
createTest
This gets the suite of tests based on the passed environment.- Parameters:
environment
- the environment to used to select the tests.- Returns:
- a Test suite of classes to run
-
getTests
Returns a set of test classes that are deemed as test that should run on based on the JIRA edition inside the JIRAEnvironmentData object.- Parameters:
environmentData
- the edition to use is in here- Returns:
- the of test classes that are deemed as test that should run on based on the JIRA edition, in insertion order
-
createFuncTestBuilder
-
getFuncTests
- Returns:
- the set of test classes that are deemed as test that should run on JIRA ENTERPRISE edition, in insertion order.
-
getBundledPlugins2Tests
- Returns:
- the set of test classes that are deemed as test that should run for bundled plugins in insertion order.
-
getTpmLdapTests
-
addBundledPluginsTests
-
addBundledPluginsTest
This will add the test class into the suite as a bundled plugins 2.0 test only.- Parameters:
testClass
- the test case class to add- Returns:
- this (in order to create a fluent style)
-
addTest
This will add the test class into the suite.- Parameters:
testClass
- the test case class to add- Returns:
- this (in order to create a fluent style)
-
addTests
This will add a collection of test classes into the suite as a STANDARD, PROFESSIONAL and ENTERPRISE tests.- Parameters:
testClasses
- a collection of test case classes- Returns:
- this (in order to create a fluent style)
-
getTestClasses
Returns all test classes in a package, excluding any that are marked with @Ignore.- Parameters:
packageName
- a String containing a package namerecursive
- a boolean indicating whether to search recursively- Returns:
- a List containing all test classes in a package, sorted by name
-