public abstract class SutController extends Object implements SutHandler
| Constructor and Description |
|---|
SutController() |
| Modifier and Type | Method and Description |
|---|---|
void |
execInsertionsIntoDatabase(List<InsertionDto> insertions)
Execute the given data insertions into the database (if any)
|
abstract Connection |
getConnection()
If the system under test (SUT) uses a SQL database, we need to have a
configured connection to access it.
|
String |
getControllerHost() |
int |
getControllerPort() |
int |
getControllerServerPort() |
abstract String |
getDatabaseDriverName()
If the system under test (SUT) uses a SQL database, we need to specify
the driver used to connect, eg.
|
abstract List<String> |
getEndpointsToSkip()
When testing a REST API, there might be some endpoints that are not
so important to test.
|
ExtraHeuristicDto |
getExtraHeuristics() |
abstract List<AuthenticationDto> |
getInfoForAuthentication()
Provide a list of valid authentication credentials, or
null if
none is necessary |
abstract String |
getPackagePrefixesToCover()
a "," separated list of package prefixes or class names.
|
DbSchemaDto |
getSqlDatabaseSchema()
Extra information about the SQL Database Schema, if any is present.
|
abstract List<TargetInfo> |
getTargetInfos(Collection<Integer> ids) |
abstract String |
getUrlOfSwaggerJSON()
Provide the URL of where the swagger.json can be found
|
void |
handleSql(String sql)
Calculate heuristics based on intercepted SQL commands
|
void |
initSqlHandler()
This is needed only during test generation (not execution),
and it is automatically called by the EM controller after
the SUT is started.
|
abstract boolean |
isInstrumentationActivated()
Check if bytecode instrumentation is on.
|
abstract boolean |
isSutRunning()
Check if the system under test (SUT) is running and fully initialized
|
abstract void |
newAction(int actionIndex)
As some heuristics are based on which action (eg HTTP call, or click of button)
in the test sequence is executed, and their order, we need to keep track of which
action does cover what.
|
abstract void |
newSearch()
Re-initialize all internal data to enable a completely new search phase
which should be independent from previous ones
|
abstract void |
newTest()
Re-initialize some internal data needed before running a new test
|
void |
resetExtraHeuristics() |
void |
setControllerHost(String controllerHost) |
void |
setControllerPort(int controllerPort) |
boolean |
startTheControllerServer()
Start the controller as a RESTful server.
|
boolean |
stopTheControllerServer() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetStateOfSUT, startSut, stopSutpublic final boolean startTheControllerServer()
public final boolean stopTheControllerServer()
public final int getControllerServerPort()
public final int getControllerPort()
public final void setControllerPort(int controllerPort)
public final String getControllerHost()
public final void setControllerHost(String controllerHost)
public void execInsertionsIntoDatabase(List<InsertionDto> insertions)
SutHandlerexecInsertionsIntoDatabase in interface SutHandlerpublic final void handleSql(String sql)
sql - public final void initSqlHandler()
public final void resetExtraHeuristics()
public final ExtraHeuristicDto getExtraHeuristics()
public final DbSchemaDto getSqlDatabaseSchema()
getConnection()public abstract void newSearch()
public abstract void newTest()
public abstract void newAction(int actionIndex)
public abstract boolean isInstrumentationActivated()
public abstract boolean isSutRunning()
public abstract String getPackagePrefixesToCover()
public abstract String getUrlOfSwaggerJSON()
public abstract List<AuthenticationDto> getInfoForAuthentication()
null if
none is necessarypublic abstract Connection getConnection()
null if the SUT does not use any SQL databasepublic abstract String getDatabaseDriverName()
org.h2.Driver.
This is needed for when we intercept SQL commands with P6Spynull if the SUT does not use any SQL databasepublic abstract List<TargetInfo> getTargetInfos(Collection<Integer> ids)
public abstract List<String> getEndpointsToSkip()
Copyright © 2016–2018. All rights reserved.