public abstract class AbstractUnitTestCase
extends com.pega.pegarules.priv.AbstractFUASupport
Modifier and Type | Class and Description |
---|---|
static class |
AbstractUnitTestCase.TestCaseCard
Class to represent the test case card information(metadata) and later
same can be used for assert
|
static class |
AbstractUnitTestCase.TestCondition
Class to represent the test case condition information(metadata) and
later same can be used for assert
|
static class |
AbstractUnitTestCase.TRACER_EVENTS_RTUC |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPARATOR_CONTAINS |
static java.lang.String |
COMPARATOR_ENDSWITH |
static java.lang.String |
COMPARATOR_EQUALS |
static java.lang.String |
COMPARATOR_EXISTS |
static java.lang.String |
COMPARATOR_HAS_ERRORS |
static java.lang.String |
COMPARATOR_HAS_NO_ERRORS |
static java.lang.String |
COMPARATOR_IS_NOT_NULL |
static java.lang.String |
COMPARATOR_ISEMPTY |
static java.lang.String |
COMPARATOR_ISFALSE |
static java.lang.String |
COMPARATOR_ISGREATERTHAN |
static java.lang.String |
COMPARATOR_ISGREATERTHANOREQUALTO |
static java.lang.String |
COMPARATOR_ISINLIST |
static java.lang.String |
COMPARATOR_ISLESSTHAN |
static java.lang.String |
COMPARATOR_ISLESSTHANOREQUALTO |
static java.lang.String |
COMPARATOR_ISLESSTHANOREQUALTOWITHOUTSPACES |
static java.lang.String |
COMPARATOR_ISNOTEMPTY |
static java.lang.String |
COMPARATOR_ISNOTINLIST |
static java.lang.String |
COMPARATOR_ISTRUE |
static java.lang.String |
COMPARATOR_NOT_EXISTS |
static java.lang.String |
COMPARATOR_NOTEQUALS |
static java.lang.String |
COMPARATOR_STARTSWITH |
static java.util.List<java.lang.String> |
comparatorsListForSkippingExprEval |
static java.lang.String |
COPYRIGHT |
static java.lang.String |
EMPTY_VALUE |
static java.lang.String[] |
EXTRA_RESULT_COLUMNS |
static java.lang.String |
RTUC_TRACER_TYPE |
static java.lang.String |
TEST_RESULT_CLEANUP_ERROR_FLAG |
static java.lang.String |
TEST_RESULT_CLEANUP_ERROR_MESSAGE |
static java.lang.String |
TEST_RESULT_RUN_STATUS |
static java.lang.String |
TEST_RESULT_SETUP_ERROR_FLAG |
static java.lang.String |
TEST_RESULT_SETUP_ERROR_MESSAGE |
static java.lang.String |
TEST_SUITE_RESULT_RUN_STATUS |
static java.lang.String |
VERSION |
Constructor and Description |
---|
AbstractUnitTestCase() |
Modifier and Type | Method and Description |
---|---|
ParameterPage |
createParameterPage(java.lang.String[][] parameters) |
void |
evaluateCardAndReport(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card)
This method examines the test case card and accomplish the required
assertions.
|
void |
evaluateCardAndReportForAssignedToCard(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForChildCaseCountCard(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForDecisionCard(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForList(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForPageCard(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForResultsCountCard(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
void |
evaluateCardAndReportForWorkStatus(ClipboardPage expectedOP,
AbstractUnitTestCase.TestCaseCard card,
ClipboardPage testCard,
ClipboardPage testCondPage,
ClipboardProperty tempListCondProp,
java.lang.String[] extraOutputProps,
ClipboardProperty resultCards) |
static java.lang.String |
findAndExecuteThisMethodWithNoParams(java.lang.Object context,
java.lang.String strExpressionFunctionName)
This method evaluates expression enetered by user and return value as a
string
Internally it calls method generated for the given expression while
saving the test case (i.e.
|
static ClipboardPage |
findPageObjectByCallingGeneratedMethod(java.lang.Object context,
java.lang.String strExpressionFunctionName,
ClipboardPage stepPage) |
static java.lang.String |
getEvaluatedExpression(java.lang.Object context,
java.lang.String strExpressionFunctionName,
ClipboardPage stepPage)
This method evaluates expression enetered by user and return value as a
string
Internally it calls method generated for the given expression while
saving the test case (i.e.
|
static AbstractUnitTestCase.TestCaseCard |
getTestCaseCard(java.lang.String assertType) |
void |
initRTSuite()
Performs all the required initialization of unit test case related tasks
like 1)getting localized messages 2)creating test case output object
|
void |
initRTUC()
Performs all the required initialization of unit test case related tasks
like 1)getting localized messages 2)creating test case output object
|
boolean |
isCleanupFailed()
returns the status of cleanup from results page (Data-TestCaseResults)
instance
|
boolean |
isHasTestFailed() |
boolean |
isSetupFailed()
returns the status of setup from results page (Data-TestCaseResults)
instance
|
void |
runCleanup(java.lang.String ruleType,
java.lang.String pyObjClass,
java.lang.String ruleName,
java.lang.String setupNo,
java.lang.String[][] parameters,
java.lang.String[] extraRuleKeys)
This method is deprecated from June 14,2016 onwards and is retained only
for backward compatibility.
|
void |
runCleanupNew(java.lang.String ruleType,
java.lang.String pyObjClass,
java.lang.String ruleName,
java.lang.String setupNo,
java.lang.String[] extraRuleKeys)
This method removes the data page and runs the data transform with the
given parametersIF there is an error while removing the data page or
running the cleanup data transform this method will set the test case run
status and clean up status as failure and sets the error message to the
"pyCleanupErrorMessage" property
|
void |
runSetup(java.lang.String ruleType,
java.lang.String pyObjClass,
java.lang.String ruleName,
java.lang.String setupNo,
java.lang.String[][] parameters,
java.lang.String[] extraRuleKeys)
This method runs the data page , data transform with the given
parameters.IF there is an error while running data page or data transform
this method will set the test case run status and set up status as
failure and sets the error message to the "pySetupErrorMessage" property
|
void |
runSetupNew(java.lang.String ruleType,
java.lang.String pyObjClass,
java.lang.String ruleName,
java.lang.String setupNo,
java.lang.String[] extraRuleKeys) |
void |
setCleanupFailed(java.lang.String setUpNum,
java.lang.String errorMsg,
java.lang.String stackTrace)
This method creates error page and appends it to the list of clean up
errors.
|
void |
setHasTestFailed(boolean hasTestFailed) |
void |
setSetupFailed(java.lang.String setUpNum,
java.lang.String errorMsg,
java.lang.String stackTrace)
This method creates setup error.
|
getPersonal, getTraceInfoForUnqualifiedVersion, hasPersonal, isTransient, setTransient
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fuaDestroy, fuaInit, getAspect, getDefinitionAppliesToClass, getDependentRuleInfos, getUsedRules
public static final java.lang.String VERSION
public static final java.lang.String COPYRIGHT
public static final java.lang.String[] EXTRA_RESULT_COLUMNS
public static final java.lang.String COMPARATOR_EQUALS
public static final java.lang.String COMPARATOR_NOTEQUALS
public static final java.lang.String COMPARATOR_CONTAINS
public static final java.lang.String COMPARATOR_STARTSWITH
public static final java.lang.String COMPARATOR_ENDSWITH
public static final java.lang.String COMPARATOR_ISEMPTY
public static final java.lang.String COMPARATOR_ISNOTEMPTY
public static final java.lang.String COMPARATOR_ISLESSTHAN
public static final java.lang.String COMPARATOR_ISGREATERTHAN
public static final java.lang.String COMPARATOR_ISLESSTHANOREQUALTO
public static final java.lang.String COMPARATOR_ISLESSTHANOREQUALTOWITHOUTSPACES
public static final java.lang.String COMPARATOR_ISGREATERTHANOREQUALTO
public static final java.lang.String COMPARATOR_EXISTS
public static final java.lang.String COMPARATOR_NOT_EXISTS
public static final java.lang.String COMPARATOR_IS_NOT_NULL
public static final java.lang.String COMPARATOR_HAS_ERRORS
public static final java.lang.String COMPARATOR_HAS_NO_ERRORS
public static final java.lang.String COMPARATOR_ISTRUE
public static final java.lang.String COMPARATOR_ISFALSE
public static final java.lang.String COMPARATOR_ISINLIST
public static final java.lang.String COMPARATOR_ISNOTINLIST
public static final java.lang.String TEST_RESULT_SETUP_ERROR_FLAG
public static final java.lang.String TEST_RESULT_SETUP_ERROR_MESSAGE
public static final java.lang.String TEST_RESULT_CLEANUP_ERROR_FLAG
public static final java.lang.String TEST_RESULT_CLEANUP_ERROR_MESSAGE
public static final java.lang.String TEST_RESULT_RUN_STATUS
public static final java.lang.String TEST_SUITE_RESULT_RUN_STATUS
public static final java.lang.String RTUC_TRACER_TYPE
public static final java.util.List<java.lang.String> comparatorsListForSkippingExprEval
public static final java.lang.String EMPTY_VALUE
public boolean isHasTestFailed()
public void setHasTestFailed(boolean hasTestFailed)
public void runSetup(java.lang.String ruleType, java.lang.String pyObjClass, java.lang.String ruleName, java.lang.String setupNo, java.lang.String[][] parameters, java.lang.String[] extraRuleKeys)
ruleType
- - Represents whether the rule to be executed is data page or
data transform etcpyObjClass
- - Clipboard page of this class type will be created to run the
data transformruleName
- - Represents the rule name to be runsetupNo
- - Indicates the Setup numberparameters
- - Parameters required to run the data page or data transformextraRuleKeys
- public void runSetupNew(java.lang.String ruleType, java.lang.String pyObjClass, java.lang.String ruleName, java.lang.String setupNo, java.lang.String[] extraRuleKeys)
public ParameterPage createParameterPage(java.lang.String[][] parameters)
parameters
- public void runCleanup(java.lang.String ruleType, java.lang.String pyObjClass, java.lang.String ruleName, java.lang.String setupNo, java.lang.String[][] parameters, java.lang.String[] extraRuleKeys)
ruleType
- - Represents whether the rule to be executed is data page or
data transform etcpyObjClass
- - Clipboard page of this class type will be created to run the
data transformruleName
- - Represents the rule name to be runsetupNo
- - Indicates the Setup numberparameters
- - Parameters required to remove the data page or run the data
transformextraRuleKeys
- public void runCleanupNew(java.lang.String ruleType, java.lang.String pyObjClass, java.lang.String ruleName, java.lang.String setupNo, java.lang.String[] extraRuleKeys)
ruleType
- - Represents whether the rule to be executed is data page or
data transform etcpyObjClass
- - Clipboard page of this class type will be created to run the
data transformruleName
- - Represents the rule name to be runsetupNo
- - Indicates the Setup numberextraRuleKeys
- public void initRTUC()
public void initRTSuite()
public void setSetupFailed(java.lang.String setUpNum, java.lang.String errorMsg, java.lang.String stackTrace)
setUpNum
- - Indicates the Setup step number which has failederrorMsg
- - Represents the error messagestackTrace
- - Represents the stack trace of the exceptionpublic void setCleanupFailed(java.lang.String setUpNum, java.lang.String errorMsg, java.lang.String stackTrace)
setUpNum
- - Indicates the Setup step number which has failederrorMsg
- - Represents the error messagestackTrace
- - Represents the stack trace of the exceptionpublic boolean isSetupFailed()
public boolean isCleanupFailed()
public static AbstractUnitTestCase.TestCaseCard getTestCaseCard(java.lang.String assertType)
public static java.lang.String getEvaluatedExpression(java.lang.Object context, java.lang.String strExpressionFunctionName, ClipboardPage stepPage)
context
- - Object of java class of the generated java file for test
case (generally passed as 'this' from calling method generated
by assembled codestrExpressionFunctionName
- - method name to be calledstepPage
- - Context where expression needs to be evaluatedpublic static java.lang.String findAndExecuteThisMethodWithNoParams(java.lang.Object context, java.lang.String strExpressionFunctionName)
context
- - Object of java class of the generated java file for test
case (generally passed as 'this' from calling method generated
by assembled codestrExpressionFunctionName
- - method name to be calledpublic static ClipboardPage findPageObjectByCallingGeneratedMethod(java.lang.Object context, java.lang.String strExpressionFunctionName, ClipboardPage stepPage)
public void evaluateCardAndReportForPageCard(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForChildCaseCountCard(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForWorkStatus(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForAssignedToCard(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForResultsCountCard(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForDecisionCard(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReportForList(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card, ClipboardPage testCard, ClipboardPage testCondPage, ClipboardProperty tempListCondProp, java.lang.String[] extraOutputProps, ClipboardProperty resultCards)
public void evaluateCardAndReport(ClipboardPage expectedOP, AbstractUnitTestCase.TestCaseCard card)
expectedOP
- - output page on which card related assertions should be madecard
- - meta data about the test case cardCopyright © 2018 Pegasystems Inc. All Rights Reserved.