org.mule.tck.junit4
Class AbstractMuleTestCase
java.lang.Object
org.mule.tck.junit4.AbstractMuleTestCase
- Direct Known Subclasses:
- AbstractBadConfigTestCase, AbstractBasePropertyConfigurationTestCase, AbstractMuleContextTestCase, AbstractPreProcessorTestCase, AbstractSchemaValidationTestCase, AnnotationsScannerTestCase, ApplicationContextsTestCase, ArrayUtilsTestCase, BatchConstraintTestCase, BeanUtilsTestCase, CachedJndiNameResolverTestCase, CaseInsensitiveHashMapTestCase, ClasspathAnnotationsScannerTestCase, ClasspathScannerTestCase, ClassUtilsTestCase, CollectionTransformerTestCase, CollectionUtilsTestCase, ComponentDefinitionParserTestCase, CompressionTestCase, ConsumableFilterTestCase, CookieHelperTestCase, CountersTestCase, DataTypesTestCase, DateUtilsTestCase, DefaultMessageCollectionTestCase, DefaultMuleClassPathConfigTestCase, DefaultMuleContextBuilderTestCase, DefaultMuleContextFactoryTestCase, DefaultMuleDeployerTestCase, DefaultProtocolTestCase, DefaultRouterResultsHandlerTestCase, DescriptorParserTestCase, EmailMessageToStringTestCase, EmbeddedMuleTestCase, EndpointTestCase, EndpointURIBuilderTestCase, EntryPointResolverMethodCacheTestCase, EqualsFilterTestCase, ExceptionHelperTestCase, ExceptionTypeFilterTestCase, ExceptionUtilsTestCase, ExpiryMonitorTestCase, ExpressionKeyGeneratorTestCase, FilenameRegexFilterTestCase, FilenameUtilsTestCase, FileUtilsTestCase, FirewallTestCase, FixedHostRmiClienSocketFactoryTestCase, FlagsMappingTestCase, FTPServerClientTest, GenericsUtilsTestCase, HelloSampleTestCase, HttpsClientMessageDispatcherTestCase, InMemoryStoreTestCase, IOUtilsTestCase, IsXmlFilterTestCase, JarUtilsTestCase, JbpmUnitTestCase, JmsExceptionReaderTestCase, JmsMessageUtilsTestCase, JmxMissingIdTestCase, JsonDataTestCase, KeyedPoolMessageDispatcherFactoryAdapterTestCase, LazyTransformedInputStreamTestCase, LingerExperimentMule2067TestCase, MailUtilsTestCase, MapCombinerTestCase, MapPayloadExpressionEvaluatorTestCase, MapUtilsTestCase, MessagesTestCase, MonitoredObjectStoreTestCase, MuleConfigurationTestCase, MuleHostConfigurationTestCase, MuleReceiverServletTestCase, MuleServerTestCase, MulticasterTestCase, MultiPartInputStreamTestCase, NamedThreadFactoryTestCase, NotificationManagerTestCase, NullPayloadTestCase, NumberUtilsTestCase, ObjectStoreCachingStrategyTestCase, ObjectUtilsTestCase, OgnlExpressionEvaluatorTestCase, OutputPayloadInterceptorTestCase, PbeEncryptionStrategyTestCase, PreferredComparatorTestCase, PreferredObjectSelectorTestCase, PropertiesUtilsTestCase, PropertyOverridesTestCase, ProxyServiceConfigurationTestCase, QNamePropertyEditorTestCase, RegExFilterTestCase, RequestContextTestCase, ReuseExperimentMule2067TestCase, ReversibleXMLStreamReaderTest, RmiRegistryAgentTestCase, SchemaValidationMule2225TestCase, SchemaValidationTestCase, ScriptingConfigErrorTestCase, SecretKeyEncryptionStrategyTestCase, SftpClientTestCase, SimplePasswordJmxAuthenticatorTestCase, SocketTimingExperimentTestCase, SpiUtilsTestCase, SqlExceptionReaderTestCase, StatusCodeMappingsTestCase, StringMessageUtilsTestCase, StringUtilsTestCase, SystemUtilsTestCase, TemplateParserTestCase, TimedSocketTestCase, TimerTestCase, TlsConfigurationTestCase, TlsPropertiesSocketTestCase, TransactionConstraintTestCase, TransactionCoordinationTestCase, TransformerChainingTestCase, URIBuilderTestCase, URIBuilderTestCase, UUIDTestCase, VoidResultTestCase, WaitableBooleanTestCase, WaitPolicyTestCase, WildcardFilterTestCase, XmlMessageProtocolTestCase, XmlUtilsTestCase, XPathExpressionEvaluatorTestCase, XPathFilterTestCase, XStreamFactoryTestCase, XStreamTransformerConfigurationTestCase
public abstract class AbstractMuleTestCase
- extends Object
AbstractMuleTestCase
is a base class for Mule test cases. This
implementation provides services to test code for creating mock and test
objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TEST_TIMEOUT_SECS
public static final int DEFAULT_TEST_TIMEOUT_SECS
- See Also:
- Constant Field Values
TEST_TIMEOUT_SYSTEM_PROPERTY
public static final String TEST_TIMEOUT_SYSTEM_PROPERTY
- See Also:
- Constant Field Values
logger
protected final transient Log logger
name
public org.junit.rules.TestName name
globalTimeout
public org.junit.rules.TestRule globalTimeout
AbstractMuleTestCase
public AbstractMuleTestCase()
createTestTimeoutRule
protected org.junit.rules.TestRule createTestTimeoutRule()
- Creates the timeout rule that will be used to run the test.
- Returns:
- the rule used to check for test execution timeouts.
isTestIncludedInExclusionFile
protected boolean isTestIncludedInExclusionFile(AbstractMuleTestCase test)
- Reads the mule-exclusion file for the current test class and
- Parameters:
test
-
getTimeoutSystemProperty
protected int getTimeoutSystemProperty()
- Defines the number of seconds that a test has in order to run before
throwing a timeout. If the property if not defined then uses the
DEFAULT_MULE_TEST_TIMEOUT_SECS
constant.
- Returns:
- the timeout value expressed in seconds
isDisabledInThisEnvironment
protected boolean isDisabledInThisEnvironment()
- Subclasses can override this method to skip the execution of the entire test class.
- Returns:
true
if the test class should not be run.
isExcluded
protected boolean isExcluded()
- Indicates whether this test has been explicitly disabled through the configuration
file loaded by TestInfo.
- Returns:
- whether the test has been explicitly disabled
isDisabledInThisEnvironment
protected boolean isDisabledInThisEnvironment(String testMethodName)
- Should this test run?
- Parameters:
testMethodName
- name of the test method
- Returns:
- whether the test should execute in the current environment
isOffline
public boolean isOffline(String method)
getTestTimeoutSecs
public int getTestTimeoutSecs()
- Defines the timeout in seconds that will be used to run the test.
- Returns:
- the timeout in seconds
initializeMuleTest
public final void initializeMuleTest()
getTestHeader
protected String getTestHeader()
isFailOnTimeout
protected boolean isFailOnTimeout()
- Indicates whether the test should fail when a timeout is reached.
This feature was added to support old test cases that depend on 3rd-party
resources such as a public web service. In such cases it may be desirable
to not fail the test upon timeout but rather to simply log a warning.
- Returns:
- true if it must fail on timeout and false otherwise. Default value
is true.
clearRequestContext
public final void clearRequestContext()
clearExcludedFlag
public static final void clearExcludedFlag()
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.