public abstract class SutController extends Object implements SutHandler
| Constructor and Description |
|---|
SutController() |
| Modifier and Type | Method and Description |
|---|---|
ExtraHeuristicsDto |
computeExtraHeuristics() |
void |
enableSqlHeuristics(boolean enabled) |
void |
execInsertionsIntoDatabase(List<InsertionDto> insertions)
Execute the given data insertions into the database (if any)
|
abstract List<AdditionalInfo> |
getAdditionalInfoList()
Get additional info for each action in the test.
|
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.
|
List<ExtraHeuristicsDto> |
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.
|
abstract SutInfoDto.OutputFormat |
getPreferredOutputFormat()
Specify the format in which the test cases should be generated
|
abstract ProblemInfo |
getProblemInfo()
Depending of which kind of SUT we are dealing with (eg, REST, GraphQL or SPA frontend),
there is different info that must be provided
|
DbSchemaDto |
getSqlDatabaseSchema()
Extra information about the SQL Database Schema, if any is present.
|
abstract List<TargetInfo> |
getTargetInfos(Collection<Integer> ids) |
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
|
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 |
newActionSpecificHandler(int actionIndex) |
abstract void |
newSearch()
Re-initialize all internal data to enable a completely new search phase
which should be independent from previous ones
|
void |
newTest()
Re-initialize some internal data needed before running a new test
|
abstract void |
newTestSpecificHandler() |
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 enableSqlHeuristics(boolean enabled)
public final void initSqlHandler()
public final void resetExtraHeuristics()
public final List<ExtraHeuristicsDto> getExtraHeuristics()
public final ExtraHeuristicsDto computeExtraHeuristics()
public final DbSchemaDto getSqlDatabaseSchema()
getConnection()public abstract void newSearch()
public final void newTest()
public final void newAction(int actionIndex)
public abstract void newTestSpecificHandler()
public abstract void newActionSpecificHandler(int actionIndex)
public abstract boolean isInstrumentationActivated()
public abstract boolean isSutRunning()
public abstract String getPackagePrefixesToCover()
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<AdditionalInfo> getAdditionalInfoList()
public abstract ProblemInfo getProblemInfo()
public abstract SutInfoDto.OutputFormat getPreferredOutputFormat()
Copyright © 2016–2019. All rights reserved.