public class

FuncTestSuite

extends Object
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.FuncTestSuite

Class Overview

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 not test is returned more than once.

Summary

Public Constructors
FuncTestSuite()
Public Methods
FuncTestSuite addBundledPluginsTest(Class<?> testClass)
This will add the test class into the suite as a bundled plugins 2.0 test only.
FuncTestSuite addBundledPluginsTests(List<Class<?>> testClasses)
FuncTestSuite addTest(Class<?> testClass)
This will add the test class into the suite.
FuncTestSuite addTests(Collection<Class<?>> testClasses)
This will add a collection of test classes into the suite as a STANDARD, PROFESSIONAL and ENTERPRISE tests.
TestSuite createTest()
This gets the test suite based on the func test settings that you currently have.
TestSuite createTest(JIRAEnvironmentData environment)
This gets the suite of tests based on the passed environment.
Set<Class<?>> getBundledPlugins2Tests()
Set<Class<?>> getFuncTests()
static List<Class<?>> getTestClasses(String packageName, boolean recursive)
Returns all test classes in a package, excluding any that are marked with @Ignore.
Set<Class<?>> 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.
Set<Class<?>> getTpmLdapTests()
Protected Methods
TestSuiteBuilder createFuncTestBuilder()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FuncTestSuite ()

Public Methods

public FuncTestSuite addBundledPluginsTest (Class<?> testClass)

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)

public FuncTestSuite addBundledPluginsTests (List<Class<?>> testClasses)

public FuncTestSuite addTest (Class<?> testClass)

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)

public FuncTestSuite addTests (Collection<Class<?>> testClasses)

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)

public 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

public TestSuite createTest (JIRAEnvironmentData environment)

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

public Set<Class<?>> getBundledPlugins2Tests ()

Returns
  • the set of test classes that are deemed as test that should run for bundled plugins in insertion order.

public Set<Class<?>> getFuncTests ()

Returns
  • the set of test classes that are deemed as test that should run on JIRA ENTERPRISE edition, in insertion order.

public static List<Class<?>> getTestClasses (String packageName, boolean recursive)

Returns all test classes in a package, excluding any that are marked with @Ignore.

Parameters
packageName a String containing a package name
recursive a boolean indicating whether to search recursively
Returns
  • a List containing all test classes in a package, sorted by name

public Set<Class<?>> 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.

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

public Set<Class<?>> getTpmLdapTests ()

Protected Methods

protected TestSuiteBuilder createFuncTestBuilder ()