Package com.auto.framework
Class AbstractTestCase
java.lang.Object
com.auto.framework.AbstractTestCase
- All Implemented Interfaces:
ITestCase
- Direct Known Subclasses:
MockServerTestCase
public abstract class AbstractTestCase extends java.lang.Object implements ITestCase
User: Priytam Jee Pandey
Date: 28/05/20
Time: 1:17 pm
email: mrpjpandey@gmail.com
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBASE_DIR_ROOTprotected AutoConfconfigHaltOnErrorRulehaltOnErrorRuleKeepLogRulekeepLogRulestatic intMAX_RUN_TIME_MINMockRequestResponseRulemockRequestResponseRuleTagsRuletagsRuleorg.junit.rules.TimeouttestGlobalTimeoutorg.junit.rules.TestNametestNameorg.junit.rules.TemporaryFoldertmpFolder -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTestCase(java.lang.String aApplication) -
Method Summary
Modifier and Type Method Description protected voidcleanComponents(boolean bForce)AutoConfgetConfig()protected AutoConf.ApplicationgetConfigForApp(java.lang.String appName)protected java.lang.StringgetCurrentApplication()protected AutoConf.ApplicationgetCurrentApplicationConfig()java.lang.StringgetResourcePath()java.lang.StringgetSandBoxDir()java.lang.StringgetTestGroup()java.lang.StringgetTestName()voidinit()protected abstract voidinitComponents()protected voidinitConfiguration()protected voidinitTestEnvironment()booleanisRunning()protected voidonAllComponents(java.util.function.Consumer<ITestComponent> fFunction)protected voidonAllComponents(java.util.function.Consumer<ITestComponent> fFunction, java.util.function.Function<ITestComponent,java.lang.Integer> orderFunc)protected voidprepareComponentsForExecution()protected voidrecordStartupTime(ITestComponent comp, long l)protected voidreportTestExecutionInfo()protected voidstartComponents()protected voidstopComponents()voidtearDown()protected voidtearDownComponents()protected voidtearDownComponentsSpecific()
-
Field Details
-
MAX_RUN_TIME_MIN
public static int MAX_RUN_TIME_MIN -
BASE_DIR_ROOT
public static final java.lang.String BASE_DIR_ROOT -
tmpFolder
public org.junit.rules.TemporaryFolder tmpFolder -
testGlobalTimeout
public org.junit.rules.Timeout testGlobalTimeout -
testName
public org.junit.rules.TestName testName -
mockRequestResponseRule
-
haltOnErrorRule
-
keepLogRule
-
tagsRule
-
config
-
-
Constructor Details
-
AbstractTestCase
protected AbstractTestCase(java.lang.String aApplication)
-
-
Method Details
-
init
public final void init() -
initConfiguration
protected void initConfiguration() -
initTestEnvironment
protected void initTestEnvironment() -
getCurrentApplication
protected java.lang.String getCurrentApplication() -
getCurrentApplicationConfig
-
prepareComponentsForExecution
protected void prepareComponentsForExecution() -
initComponents
protected abstract void initComponents() -
getConfig
-
getTestName
public java.lang.String getTestName()- Specified by:
getTestNamein interfaceITestCase
-
getTestGroup
public java.lang.String getTestGroup()- Specified by:
getTestGroupin interfaceITestCase
-
getSandBoxDir
public java.lang.String getSandBoxDir()- Specified by:
getSandBoxDirin interfaceITestCase
-
isRunning
public boolean isRunning() -
tearDown
public final void tearDown() -
tearDownComponents
protected void tearDownComponents() -
reportTestExecutionInfo
protected void reportTestExecutionInfo() -
tearDownComponentsSpecific
protected void tearDownComponentsSpecific() -
stopComponents
protected void stopComponents() -
startComponents
protected void startComponents() -
recordStartupTime
-
cleanComponents
protected void cleanComponents(boolean bForce) -
onAllComponents
-
onAllComponents
protected void onAllComponents(java.util.function.Consumer<ITestComponent> fFunction, java.util.function.Function<ITestComponent,java.lang.Integer> orderFunc) -
getResourcePath
public java.lang.String getResourcePath() -
getConfigForApp
-