public class SecurityTest extends AbstractTestPropertyHolderWsdlModelItem<SecurityTestConfig> implements TestModelItem, TestRunnable
Modifier and Type | Field and Description |
---|---|
static String |
FAIL_ON_ERROR_PROPERTY |
static String |
FAIL_ON_SCANS_ERRORS_PROPERTY |
static String |
ICON_NAME |
static String |
SKIP_DATASOURCE_LOOP_PROPERTY |
static String |
STARTUP_SCRIPT_PROPERTY |
static String |
TEARDOWN_SCRIPT_PROPERTY |
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
SecurityTest(WsdlTestCase testCase,
SecurityTestConfig config) |
Modifier and Type | Method and Description |
---|---|
SecurityScan |
addNewSecurityScan(TestStep testStep,
String securityScanName)
Adds new securityScan for the specific TestStep by Security Scan Type
|
SecurityScan |
addSecurityScan(TestStep testStep,
SecurityScanFactory factory,
SecurityScanConfig newScanConfig)
Adds a securityScan for the specific TestStep
|
void |
addSecurityTestListener(SecurityTestListener listener) |
void |
addSecurityTestRunListener(SecurityTestRunListener listener) |
void |
addTestStepRunListener(TestStep testStep,
SecurityTestRunListener listener) |
boolean |
canAddSecurityScan(TestStep testStep,
String securityScanName)
Checks if we can add new SecurityScan for the specific TestStep (only one
type of SecurityScan for TestStep is allowed)
|
void |
clearSecurityTestStepResultMap() |
String |
findTestStepScanUniqueName(String testStepId,
String type) |
String[] |
getAvailableSecurityScanNames(TestStep testStep,
String[] securityScanNames)
Creates array of all available security scan names (those that have not
been added to test step).
|
List<? extends ModelItem> |
getChildren() |
boolean |
getFailOnError() |
boolean |
getFailSecurityTestOnScanErrors() |
int |
getSecurityScanCount() |
HashMap<String,List<SecurityScan>> |
getSecurityScansMap()
Returns a map of testids to security scans
|
SecurityTestRunListener[] |
getSecurityTestRunListeners() |
Map<TestStep,SecurityTestStepResult> |
getSecurityTestStepResultMap() |
boolean |
getSkipDataSourceLoops() |
String |
getStartupScript() |
int |
getStepSecurityApplicableScansCount(TestStepResult tsr) |
String |
getTearDownScript() |
WsdlTestCase |
getTestCase() |
SecurityTestRunListener[] |
getTestStepRunListeners(TestStep testStep) |
SecurityScan |
getTestStepSecurityScanAt(String testStepId,
int index) |
SecurityScan |
getTestStepSecurityScanByName(String testStepId,
String securityScanName) |
<T extends SecurityScan> |
getTestStepSecurityScanByType(String testStepId,
Class<T> securityScanType) |
List<SecurityScan> |
getTestStepSecurityScans(String testStepId) |
int |
getTestStepSecurityScansCount(String testStepId) |
boolean |
importSecurityScan(TestStep targetTestStep,
SecurityScan securityScanToClone,
boolean overwrite) |
boolean |
isRunning() |
SecurityScan |
moveTestStepSecurityScan(TestStep testStep,
SecurityScan securityScan,
int index,
int offset)
Moves specified SecurityScan of a TestStep in a list
|
void |
putSecurityTestStepResult(TestStep testStep,
SecurityTestStepResult securityTestStepResult)
Puts result of a SecurityTest on a TestStep level to a map, if map
previously contained value for specified TestStep it is being replaced
with the new result value
|
void |
release() |
void |
removeSecurityScan(TestStep testStep,
SecurityScan securityScan)
Remove securityScan for the specific TestStep
|
void |
removeSecurityScanWhenRemoveTestStep(TestStep testStep,
SecurityScan securityScan) |
void |
removeSecurityTestListener(SecurityTestListener listener) |
void |
removeSecurityTestRunListener(SecurityTestRunListener listener) |
void |
removeTestStepRunListener(TestStep testStep,
SecurityTestRunListener listener) |
void |
resetAllScansSkipFurtherRunning() |
void |
resetConfigOnMove(SecurityTestConfig securityTestConfig) |
SecurityTestRunner |
run(StringToObjectMap context,
boolean async) |
Object |
runStartupScript(SecurityTestRunContext runContext,
SecurityTestRunner runner)
Executes the startup Script
|
Object |
runTearDownScript(SecurityTestRunContext runContext,
SecurityTestRunner runner)
Executes the teardown Script
|
void |
setFailOnError(boolean failOnError) |
void |
setFailSecurityTestOnScanErrors(boolean failSecurityTestOnErrors) |
void |
setSkipDataSourceLoops(boolean skipDataSourceLoops) |
void |
setStartupScript(String script)
Sets the script to be used on startup
|
void |
setTearDownScript(String script)
Sets the script to be used on teardown
|
protected boolean |
skipTest(TestStep testStep) |
addPropertiesFromFile, addProperty, addTestPropertyListener, getModelItem, getProperties, getPropertiesLabel, getProperty, getPropertyAt, getPropertyCount, getPropertyHolderSupport, getPropertyList, getPropertyNames, getPropertyValue, hasProperty, moveProperty, removeProperty, removeTestPropertyListener, renameProperty, setPropertiesConfig, setPropertyValue
addExternalDependencies, afterLoad, beforeSave, dependsOn, getConfig, getDescription, getExternalDependencies, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemById, getWsdlModelItemByName, resolve, setConfig, setDescription, setIcon, setName, setSettings
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getProject, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, removePropertyChangeListener, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTestPropertyListener, getModelItem, getProperties, getPropertiesLabel, getProperty, getPropertyAt, getPropertyCount, getPropertyList, getPropertyNames, getPropertyValue, hasProperty, removeTestPropertyListener, setPropertyValue
getDescription, getIcon, getId, getName, getParent, getProject, getSettings
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
public static final String STARTUP_SCRIPT_PROPERTY
public static final String TEARDOWN_SCRIPT_PROPERTY
public static final String FAIL_ON_SCANS_ERRORS_PROPERTY
public static final String FAIL_ON_ERROR_PROPERTY
public static final String SKIP_DATASOURCE_LOOP_PROPERTY
public static final String ICON_NAME
public SecurityTest(WsdlTestCase testCase, SecurityTestConfig config)
public void release()
release
in interface Releasable
release
in class AbstractWsdlModelItem<SecurityTestConfig>
public SecurityScan addNewSecurityScan(TestStep testStep, String securityScanName)
testStep
- securityScanName
- public SecurityScan addSecurityScan(TestStep testStep, SecurityScanFactory factory, SecurityScanConfig newScanConfig)
testStep
- factory
- newScanConfig
- public void removeSecurityScan(TestStep testStep, SecurityScan securityScan)
testStep
- securityScan
- public void removeSecurityScanWhenRemoveTestStep(TestStep testStep, SecurityScan securityScan)
public HashMap<String,List<SecurityScan>> getSecurityScansMap()
public int getSecurityScanCount()
public int getStepSecurityApplicableScansCount(TestStepResult tsr)
public Map<TestStep,SecurityTestStepResult> getSecurityTestStepResultMap()
public void clearSecurityTestStepResultMap()
public void putSecurityTestStepResult(TestStep testStep, SecurityTestStepResult securityTestStepResult)
testStep
- securityTestStepResult
- public WsdlTestCase getTestCase()
public SecurityTestRunner run(StringToObjectMap context, boolean async)
run
in interface TestRunnable
public void setStartupScript(String script)
script
- public String getStartupScript()
public Object runStartupScript(SecurityTestRunContext runContext, SecurityTestRunner runner) throws Exception
runContext
- runner
- Exception
public void setTearDownScript(String script)
script
- public String getTearDownScript()
public Object runTearDownScript(SecurityTestRunContext runContext, SecurityTestRunner runner) throws Exception
runContext
- runner
- Exception
public List<SecurityScan> getTestStepSecurityScans(String testStepId)
public SecurityScan getTestStepSecurityScanByName(String testStepId, String securityScanName)
public <T extends SecurityScan> List<T> getTestStepSecurityScanByType(String testStepId, Class<T> securityScanType)
public SecurityScan getTestStepSecurityScanAt(String testStepId, int index)
public int getTestStepSecurityScansCount(String testStepId)
public SecurityScan moveTestStepSecurityScan(TestStep testStep, SecurityScan securityScan, int index, int offset)
testStep
- securityScan
- index
- offset
- specifies position to move to , negative value means moving up
while positive value means moving downpublic void addSecurityTestRunListener(SecurityTestRunListener listener)
public void removeSecurityTestRunListener(SecurityTestRunListener listener)
public SecurityTestRunListener[] getSecurityTestRunListeners()
public boolean getFailSecurityTestOnScanErrors()
public void setFailSecurityTestOnScanErrors(boolean failSecurityTestOnErrors)
public boolean getFailOnError()
public void setFailOnError(boolean failOnError)
public boolean getSkipDataSourceLoops()
public void setSkipDataSourceLoops(boolean skipDataSourceLoops)
public void addTestStepRunListener(TestStep testStep, SecurityTestRunListener listener)
public void removeTestStepRunListener(TestStep testStep, SecurityTestRunListener listener)
public SecurityTestRunListener[] getTestStepRunListeners(TestStep testStep)
public List<? extends ModelItem> getChildren()
getChildren
in interface ModelItem
getChildren
in class AbstractModelItem
public void resetConfigOnMove(SecurityTestConfig securityTestConfig)
public boolean canAddSecurityScan(TestStep testStep, String securityScanName)
testStep
- public String[] getAvailableSecurityScanNames(TestStep testStep, String[] securityScanNames)
testStep
- public boolean importSecurityScan(TestStep targetTestStep, SecurityScan securityScanToClone, boolean overwrite)
public void addSecurityTestListener(SecurityTestListener listener)
public void removeSecurityTestListener(SecurityTestListener listener)
public boolean isRunning()
protected boolean skipTest(TestStep testStep)
public void resetAllScansSkipFurtherRunning()
Copyright © 2019. All Rights Reserved.